我有两台配置相同的 OpenBSD 机器,它们使用 sendmail 来传递邮件。除了在每台机器上设置一个别名外,我基本上没有对 sendmail 安装进行任何更改。它们都位于同一个子网中,都可以访问邮件服务器。但是,其中一台无法传递邮件。我对 sendmail 不太熟悉,所以希望有人能解释这种行为。我已将每台机器的以下信息发布出来:root: [email protected]
mail.example.com
/var/log/maillog/
成功发货的机器:
Dec 7 11:57:35 gw003 sendmail[9640]: nB7JvZmS009640: from=kamil, size=60, class=0, nrcpts=1, msgid=<200912071957.nB7JvZmS009640@gw00
3.backbone.example.com>, relay=root@localhost
Dec 7 11:57:35 gw003 sm-mta[30258]: nB7JvZlR030258: from=<[email protected]>, size=401, class=0, nrcpts=1, msgid=<2
[email protected]>, proto=ESMTP, daemon=MTA, [email protected] [127.
0.0.1]
Dec 7 11:57:35 gw003 sendmail[9640]: nB7JvZmS009640: [email protected], ctladdr=kamil (1031/1031), delay=00:00:00, xdelay=00:
00:00, mailer=relay, pri=30060, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (nB7JvZlR030258 Message accepted for delivery)
Dec 7 11:57:35 gw003 sm-mta[29848]: STARTTLS=client, relay=mail.example.com., version=TLSv1/SSLv3, verify=FAIL, cipher=AES256-SHA,
bits=256/256
Dec 7 11:57:35 gw003 sm-mta[29848]: nB7JvZlR030258: to=<[email protected]>, ctladdr=<[email protected]> (1031/1
031), delay=00:00:00, xdelay=00:00:00, mailer=esmtp, pri=30401, relay=mail.example.com. [10.2.32.11], dsn=2.0.0, stat=Sent (4b1d5e2
f-0000528c Message accepted for delivery)
无法送达的机器:
Dec 7 12:00:35 gw004 sendmail[12957]: nB7K0ZdA012957: from=kamil, size=60, class=0, nrcpts=1, msgid=<200912072000.nB7K0ZdA012957@gw0
04.backbone.example.com>, relay=root@localhost
Dec 7 12:00:35 gw004 sm-mta[25655]: nB7K0Z7U025655: <[email protected]>... User unknown
Dec 7 12:00:35 gw004 sendmail[12957]: nB7K0ZdA012957: [email protected], ctladdr=kamil (1031/1031), delay=00:00:00, xdelay=00
:00:00, mailer=relay, pri=30060, relay=[127.0.0.1] [127.0.0.1], dsn=5.1.1, stat=User unknown
Dec 7 12:00:35 gw004 sm-mta[25655]: nB7K0Z7U025655: from=<[email protected]>, size=60, class=0, nrcpts=0, proto=ESM
TP, daemon=MTA, [email protected] [127.0.0.1]
Dec 7 12:00:35 gw004 sendmail[12957]: nB7K0ZdA012957: nB7K0ZdB012957: DSN: User unknown
Dec 7 12:00:36 gw004 sm-mta[25655]: nB7K0Z7W025655: from=<>, size=2203, class=0, nrcpts=1, msgid=<200912072000.nB7K0ZdB012957@gw004.
backbone.example.com>, proto=ESMTP, daemon=MTA, [email protected] [127.0.0.1]
Dec 7 12:00:36 gw004 sendmail[12957]: nB7K0ZdB012957: to=kamil, delay=00:00:01, xdelay=00:00:01, mailer=relay, pri=31084, relay=[127
.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (nB7K0Z7W025655 Message accepted for delivery)
Dec 7 12:00:36 gw004 sm-mta[9947]: nB7K0Z7W025655: to=<[email protected]>, delay=00:00:01, xdelay=00:00:00, mailer=
local, pri=32465, dsn=2.0.0, stat=Sent
答案1
我怀疑“坏”系统上存在名称解析问题。检查 /etc/hosts 中是否存在非对称条目。检查两台机器上的 DNS 解析。
ifconfig -a # note various IP adresses of this system
dig -x 192.1.2.3 # query FQDN for my own ip, are results symmetric?
dig -x 1.2.3.4 # same on another interface
dig -x 5.6.7.8 # and another one
和
dig my.fully.qualified.domain.name.
dig another.fully.qualified.domain.name.
和
hostname # is it symmetric on both systems? or short on one and fully-qualified on another?
答案2
[电子邮件保护][127.0.0.1]
您没有通过邮件服务器 mail.example.com 进行中继
这肯定是与中继域或服务器域相关的配置问题。(在第二台机器上,它在本地主机上传递邮件,这意味着它认为最终目的地是它自己。检查域/主机名/中继)
答案3
/etc/mail/local-host-names
检查和的内容,/etc/mail/relay-domains
也许/etc/mail/mailertable
——您的第二个框需要知道它是 example.com,或者如何到达那里。