DNS A 超时是否会导致电子邮件永久失败?

DNS A 超时是否会导致电子邮件永久失败?

偶尔,当将电子邮件发送给使用该系统作为电子邮件服务器的收件人时,电子邮件无法送达outlook.com。他们的 MX 记录解析正常,但他们的 A 记录(类似于example-com.mail.protection.outlook.com)超时。

在这里使用sendmail,我不是专家。我继承了配置,对设置不太了解。但有一件事我知道,那就是它已经好几年没编辑过了,而且没有出现任何问题的迹象。

我不知道是否是故意的,但是dig example-com.mail.protection.outlook.com15 秒后响应超时,然后稍后挖掘就成功了。

我们正在使用我们自己的 BIND DNS 服务器进行缓存,该服务器至少在很长时间内没有重新配置。

看来我们的 sendmail 系统在收到 host not found 后就放弃了example-com.mail.protection.outlook.com。这种永久性故障是否合适?是否应该改为暂时故障?标准是什么?是 outlook.com 出错了还是我们的 sendmail 出错了?

编辑

供您参考,以下是来自的相关日志条目maillog,其中屏蔽的敏感信息example.com代表接收服务器,而example.net代表我们自己的domain

Jun 16 09:28:28 myhostname sendmail[8613]: [ID 801593 mail.info] s5GDSOZ4008613: from=websusr, size=16975, class=0, nrcpts=2, msgid=<[email protected]>, relay=websusr@localhost
Jun 16 09:28:28 myhostname sendmail[8617]: [ID 801593 mail.info] s5GDSSIP008617: from=<[email protected]>, size=17222, class=0, nrcpts=2, msgid=<[email protected]>, proto=ESMTP, daemon=MTA-v4, relay=localhost [127.0.0.1]
Jun 16 09:28:28 myhostname sendmail[8613]: [ID 801593 mail.info] s5GDSOZ4008613: to="John Doe" <[email protected]>, ctladdr=websusr (60001/60001), delay=00:00:04, xdelay=00:00:00, mailer=relay, pri=76975, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (s5GDSSIP008617 Message accepted for delivery)
Jun 16 09:32:09 myhostname sendmail[8618]: [ID 801593 mail.info] s5GDSSIP008617: to=<[email protected]>, ctladdr=<[email protected]> (60001/60001), delay=00:03:41, xdelay=00:03:40, mailer=esmtp, pri=77440, relay=example-com.mail.eo.outlook.com., dsn=5.1.2, stat=Host unknown (Name server: example-com.mail.eo.outlook.com.: host not found)
Jun 16 09:32:09 myhostname sendmail[8618]: [ID 801593 mail.info] s5GDSSIP008617: s5GDW9IP008618: DSN: Host unknown (Name server: example-com.mail.eo.outlook.com.: host not found)

还有刚才的输出dig,虽然此刻问题没有发生,但它允许您查看记录mx

>dig example.com mx

; <<>> DiG 9.3.2 <<>> example.com mx
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 1448
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 4, ADDITIONAL: 0

;; QUESTION SECTION:
;example.com.                 IN      MX

;; ANSWER SECTION:
example.com.          3461    IN      MX      0 example-com.mail.protection.outlook.com.
example.com.          3461    IN      MX      10 example-com.mail.eo.outlook.com.

;; AUTHORITY SECTION:
example.com.          86261   IN      NS      ns1.example.org.
example.com.          86261   IN      NS      ns2.example.org.

;; Query time: 0 msec
;; SERVER: 10.0.0.109#53(10.0.0.109)
;; WHEN: Thu Jul  3 09:32:08 2014
;; MSG SIZE  rcvd: 215

>dig example-com.mail.protection.outlook.com

; <<>> DiG 9.3.2 <<>> example-com.mail.protection.outlook.com
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 1734
;; flags: qr rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 2, ADDITIONAL: 6

;; QUESTION SECTION:
;example-com.mail.protection.outlook.com. IN A

;; ANSWER SECTION:
example-com.mail.protection.outlook.com. 10 IN A 207.46.163.170
example-com.mail.protection.outlook.com. 10 IN A 207.46.163.215
example-com.mail.protection.outlook.com. 10 IN A 207.46.163.138

;; AUTHORITY SECTION:
mail.protection.outlook.com. 1800 IN    NS      ns1-proddns.glbdns.o365filtering.com.
mail.protection.outlook.com. 1800 IN    NS      ns2-proddns.glbdns.o365filtering.com.

;; ADDITIONAL SECTION:
ns1-proddns.glbdns.o365filtering.com. 30 IN A   207.46.100.42
ns1-proddns.glbdns.o365filtering.com. 30 IN A   207.46.163.143
ns1-proddns.glbdns.o365filtering.com. 30 IN A   207.46.163.176
ns2-proddns.glbdns.o365filtering.com. 30 IN A   207.46.163.176
ns2-proddns.glbdns.o365filtering.com. 30 IN A   207.46.100.42
ns2-proddns.glbdns.o365filtering.com. 30 IN A   207.46.163.143

;; Query time: 464 msec
;; SERVER: 10.0.0.109#53(10.0.0.109)
;; WHEN: Thu Jul  3 09:33:30 2014
;; MSG SIZE  rcvd: 276

>dig example-com.mail.eo.outlook.com

; <<>> DiG 9.3.2 <<>> example-com.mail.eo.outlook.com
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 940
;; flags: qr rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 2, ADDITIONAL: 12

;; QUESTION SECTION:
;example-com.mail.eo.outlook.com. IN  A

;; ANSWER SECTION:
example-com.mail.eo.outlook.com. 10 IN A      207.46.163.138
example-com.mail.eo.outlook.com. 10 IN A      207.46.163.170
example-com.mail.eo.outlook.com. 10 IN A      207.46.163.247

;; AUTHORITY SECTION:
mail.eo.outlook.com.    5450    IN      NS      ns1-prodeodns.glbdns.o365filtering.com.
mail.eo.outlook.com.    5450    IN      NS      ns2-prodeodns.glbdns.o365filtering.com.

;; ADDITIONAL SECTION:
ns1-prodeodns.glbdns.o365filtering.com. 30 IN A 157.55.234.42
ns1-prodeodns.glbdns.o365filtering.com. 30 IN A 157.56.112.42
ns1-prodeodns.glbdns.o365filtering.com. 30 IN A 207.46.100.42
ns1-prodeodns.glbdns.o365filtering.com. 30 IN A 207.46.163.143
ns1-prodeodns.glbdns.o365filtering.com. 30 IN A 207.46.163.176
ns1-prodeodns.glbdns.o365filtering.com. 30 IN A 65.55.169.42
ns2-prodeodns.glbdns.o365filtering.com. 30 IN A 65.55.169.42
ns2-prodeodns.glbdns.o365filtering.com. 30 IN A 157.55.234.42
ns2-prodeodns.glbdns.o365filtering.com. 30 IN A 157.56.112.42
ns2-prodeodns.glbdns.o365filtering.com. 30 IN A 207.46.100.42
ns2-prodeodns.glbdns.o365filtering.com. 30 IN A 207.46.163.143
ns2-prodeodns.glbdns.o365filtering.com. 30 IN A 207.46.163.176

;; Query time: 248 msec
;; SERVER: 10.0.0.109#53(10.0.0.109)
;; WHEN: Thu Jul  3 09:33:45 2014
;; MSG SIZE  rcvd: 368

>

答案1

如果 DNS 解析超时并且 DNS 服务器根本没有返回响应,或者返回的是 SERVFAIL,则应该将该消息排队并稍后重试。

如果 DNS 解析返回 NXDOMAIN(名称不存在),则应立即返回该消息。

RFC 5321,第 5.1 节

查找首先尝试查找与名称关联的 MX 记录。如果找到 CNAME 记录,则将结果名称视为初始名称进行处理。如果返回不存在域错误,则必须将这种情况报告为错误。如果返回临时错误,则必须将消息排队并稍后重试(请参阅第 4.5.4.1 节)。

就你的情况而言,你应该查看 DNS 服务器为何会间歇性地出现故障。你还应该检查 sendmail 的日志,以准确查明它在尝试进行 DNS 解析时看到了什么。

相关内容