问题原文
原帖链接 · pato.llaguno · CC BY-SA 4.0
I have an app hosted in AWS, my mail service is not on AWS, I'm using a hosting in hostgator due to pricing since I need 500+ simple mail accounts.
My DNS points to my email service and it works correctly.
The part I'm lost in is that I'm trying to receive emails in a specific address so that my app can process it. Is there a way so that some addresses are sent to a secondary MX record, or if the address is not found in the first will it go look at the second? Or the second priority MX record is only if the first in offline?
已采纳解答
原帖链接 · Stuggi · CC BY-SA 4.0
MX records are used according to priority value in the records.
The record with the lowest priority is used first, then the higher ones until one responds. If there are multiple records with the same priority, one is randomly selected (this is how you generally do load balancing if you have multiple mail servers accepting incoming connections).
The MX records only dictates which mail servers are responsible for a specific domain, it doesn't deal with individual recipients. So a sending server will only use secondary records if the primary server doesn't respond to its connection attempts, not if the primary server rejects the message.
What you're trying to achieve is only doable at the DNS level if you use a subdomain for messages destined for your application. That way you can have the MX records for example.com point to your mail servers and the MX records for app.example.com to point towards your application.
If you need to use the same domain for both, you'll need to configure your mail server to forward e-mail messages to your application. This can usually be done a couple of different ways depending on the mail server/hosting provider.
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
