大网数据广告活动
服务器运维问答

Multiple MX Records handling

· 52CE 我爱测

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…

问题原文

原帖链接 · 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.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2020-10-14)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。