我已使用智能主机设置了 sendmail 到 Google Apps(使用AuthInfo
进行/etc/mail/access
身份验证)。
我昨晚注意到电子邮件没有发送成功。我发送了一封电子邮件,如下所示:
echo "I am testing this" | sendmail -f [email protected] [email protected]
日志如下所示:
May 19 18:53:08 starks sendmail[1658]: p4JMr7mw001658: [email protected], size=157, class=0, nrcpts=1, msgid=<[email protected]>, relay=root@localhost
May 19 18:53:08 starks sendmail[1658]: STARTTLS=client, relay=[127.0.0.1], version=TLSv1/SSLv3, verify=FAIL, cipher=DHE-RSA-AES256-SHA, bits=256/256
May 19 18:53:08 starks sendmail[1665]: STARTTLS=server, relay=starks.example.lan [192.168.8.5] (may be forged), version=TLSv1/SSLv3, verify=NO, cipher=DHE-RSA-AES256-SHA, bits=256/256
May 19 18:53:08 starks sendmail[1658]: p4JMr7mw001658: [email protected], [email protected] (0/0), delay=00:00:01, xdelay=00:00:00, mailer=relay, pri=30157, relay=[127.0.0.1] [127.0.0.1], dsn=5.7.1, stat=User unknown
May 19 18:53:08 starks sendmail[1658]: p4JMr7mw001658: p4JMr7mx001658: DSN: User unknown
postmaster
(还有许多其他日志条目,但它与指向地址的别名有关[email protected]
)
但是,如果我将以下内容添加到/etc/mail/access
,则一切都正常:
Connect:192.168.8.5 RELAY
所有邮件均按预期送达。有人有什么想法吗?
答案1
“starks.example.lan [192.168.8.5]”
您的 SMTP“主机公告”(starks.example.lan)解析回您的 NAT 地址(192.168.8.5),也许您的实际主机/系统名称是其他名称?