CentOS 5.x | SendMail 8.14
我有一个配置为最后一跳的 sendmail 服务器。它执行 DNS 查找出站邮件并尝试将其传送到收件人邮件主机。
由于某些原因,服务器在向一个收件人域发送邮件时遇到延迟,并且日志表明它正在无序尝试某些收件人 MX 记录。
例子:
recipientfoo.com MX preference = 10 mail.cloudfoo.com
recipientfoo.com MX preference = 20 backup.recipientfoo.com
recipientfoo.com MX preference = 30 backup2.recipientfoo.com
在这种情况下,我希望首先看到对 mail.cloudfoo.com 的初始尝试...但这不是我在日志中看到的内容。在 /var/log/maillog 中,我看到:
maillog.1:4 月 10:08:28 serverfoo sendmail[12345]:r5ND75SPa012345:来自=,大小=1345,类 0,nrcpts=1,msgid=,proto=ESMTP,守护进程=MTA,中继=mail.senderfoo.com [192.168.1.10]
maillog.1:4 月 10:08:49 serverfoo sendmail[12500]:r5ND75SPa012345:to=,delay:00:00:21,xdelay=00:00:21 mailer=esmtp,pri=157967,relay=backup2.recipientfoo.com。[1.1.1.1],dsn=4.0.0,stat=Deferred:与 backup2.recipientfoo.com 的连接超时。
maillog.1:4 月 10:17:14 serverfoo sendmail[23455]:r5ND75SPa012345:to=,delay:00:08:46,xdelay=00:00:00 mailer=esmtp,pri=153398,relay=backup2.recipientfoo.com。[1.1.1.1],dsn=4.0.0,stat=Deferred:与 backup2.recipientfoo.com 的连接超时。
maillog.1:4 月 11:18:21 serverfoo sendmail[1246]:r5ND75SPa012345:to=,delay:01:09:53,xdelay=00:00:00 mailer=esmtp,pri=151198,relay=backup2.recipientfoo.com。[1.1.1.1],dsn=4.0.0,stat=Deferred:与 backup2.recipientfoo.com 的连接超时。
maillog.1:4 月 12:17:00 serverfoo sendmail[12560]:r5ND75SPa012345:to=,delay:02:08:32,xdelay=00:00:00 mailer=esmtp,pri=322498,relay=mail.cloudfoo.com。[3.3.3.3],dsn=2.0.0,stat=sent([InternalId=123456789] 排队等待投递的邮件)
(为保护无辜者,详细信息已被编辑)
根据 DNS 记录,它应该首先尝试 mail.cloudfoo.com...但我在日志中没有看到它。我如何确认 SendMail 在传递邮件时看到的具体 MX 优先级?
更新 2
作为测试,我故意阻止实验室服务器的防火墙访问,并尝试向雅虎上的测试帐户发送消息。
一探究竟:
[root@foobox ~]# mailq
/var/spool/mqueue (2 requests)
-----Q-ID----- --Size-- -----Q-Time----- ------------Sender/Recipient-----------
r3O3cqEm011098 51218 Tue Apr 23 20:38 MAILER-DAEMON
(Deferred: Connection refused by alt4.gmail-smtp-in.l.google.)
<[email protected]>
r3NMd1Em011926 48807 Tue Apr 23 15:39 <[email protected]>
(Deferred: Connection refused by mta5.am0.yahoodns.net.)
<[email protected]>
Total requests: 2
[root@foobox ~]# sendmail -v -d17.9 [email protected]
Running /var/spool/mqueue/r3NMd1Em011926 (sequence 1 of 1)
hostsignature(yahoo.com.)
mxrand(mta6.am0.yahoodns.net) = 20
mxrand(mta7.am0.yahoodns.net) = 89
mxrand(mta5.am0.yahoodns.net) = 140
hostsignature(): getmxrr() returned 3, mxhosts[0]=mta6.am0.yahoodns.net.
hostsignature(yahoo.com.) = mta6.am0.yahoodns.net.,mta7.am0.yahoodns.net.,mta5.am0.yahoodns.net.
hostsignature(yahoo.com.)
hostsignature(): stab(yahoo.com.) found mta6.am0.yahoodns.net.,mta7.am0.yahoodns.net.,mta5.am0.yahoodns.net.
<[email protected]>... Connecting to mta7.am0.yahoodns.net. via esmtp...
<[email protected]>... Connecting to mta5.am0.yahoodns.net. via esmtp...
<[email protected]>... Connecting to mta6.am0.yahoodns.net. via esmtp...
<[email protected]>... Deferred: Connection refused by mta6.am0.yahoodns.net.
它正确地识别了 MX 首选项,但我不明白为什么详细输出显示它连接到 mta7 和 mta5(两者都具有更高的 MX 值)。这是什么意思?