我正在尝试让我的 sendmail 服务器作为智能主机通过 GoDaddy 发送邮件。我确认我可以在端口 3535 上远程登录到 smtpout.secureserver.net,并且他们的 SMTP 响应正确。但我的 sendmail 服务无法发送邮件 - 我不明白为什么。我已将 sendmail 的 smarthost 部分配置如下:
define(`SMART_HOST', `smtpout.secureserver.net')dnl
define(`RELAY_MAILER',`esmtp')dnl
define(`RELAY_MAILER_ARGS', `TCP $h 3535')dnl
define(`confAUTH_MECHANISMS', `EXTERNAL GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
FEATURE(`authinfo',`hash /data/smtp/client-info')dnl
邮件日志显示(日志级别 99):
Feb 26 12:03:56 myhost sendmail[4694]: v1QH3uXi004692: SMTP outgoing connect on [172.31.234.15]
Feb 26 12:03:57 myhost sendmail[4694]: AUTH=client, relay=smtpout.secureserver.net., mech=LOGIN, bits=0
Feb 26 12:03:57 myhost sendmail[4694]: v1QH3uXi004692: to=<[email protected]>, ctladdr=<[email protected]> (0/0), delay=00:00:01, xdelay=00:00:01, mailer=relay, pri=120448, relay=smtpout.secureserver.net. [173.201.192.229], dsn=5.0.0, stat=Service unavailable
Feb 26 12:03:57 myhost sendmail[4694]: v1QH3uXi004692: dropenvelope, e_flags=0x4605862, OpMode=q, pid=4694
Feb 26 12:03:57 myhost sendmail[4694]: v1QH3uXi004692: alias <[email protected]> => [email protected]
Feb 26 12:03:57 myhost sendmail[4694]: v1QH3vXi004694: assigned id
Feb 26 12:03:57 myhost sendmail[4694]: v1QH3uXi004692: v1QH3vXi004694: DSN: Service unavailable
Feb 26 12:03:57 myhost sendmail[4694]: v1QH3vXi004694: queueup ./qfv1QH3vXi004694
Feb 26 12:03:57 myhost sendmail[4694]: v1QH3vXi004694: sendenvelope, flags=0x604082
Feb 26 12:03:57 myhost sendmail[4694]: v1QH3vXi004694: SMTP outgoing connect on [172.31.234.15]
Feb 26 12:03:58 myhost sendmail[4694]: AUTH=client, relay=smtpout.secureserver.net., mech=LOGIN, bits=0
Feb 26 12:03:59 myhost sendmail[4694]: v1QH3vXi004694: [email protected], delay=00:00:02, xdelay=00:00:02, mailer=relay, pri=31662, relay=smtpout.secureserver.net. [173.201.193.101], dsn=5.0.0, stat=Service unavailable
Feb 26 12:03:59 myhost sendmail[4694]: v1QH3vXi004694: dropenvelope, e_flags=0x46050a2, OpMode=q, pid=4694
Feb 26 12:03:59 myhost sendmail[4694]: v1QH3vXi004694: alias MAILER-DAEMON => postmaster
Feb 26 12:03:59 myhost sendmail[4694]: v1QH3vXi004694: alias postmaster => root
Feb 26 12:03:59 myhost sendmail[4694]: v1QH3vXi004694: alias root => [email protected]
Feb 26 12:03:59 myhost sendmail[4694]: v1QH3vXi004694: alias postmaster => root
Feb 26 12:03:59 myhost sendmail[4694]: v1QH3vXi004694: alias root => [email protected]
Feb 26 12:03:59 myhost sendmail[4694]: v1QH3vXj004694: assigned id
Feb 26 12:03:59 myhost sendmail[4694]: v1QH3vXi004694: v1QH3vXj004694: return to sender: Service unavailable
Feb 26 12:03:59 myhost sendmail[4694]: v1QH3vXj004694: queueup ./qfv1QH3vXj004694
Feb 26 12:03:59 myhost sendmail[4694]: v1QH3vXj004694: sendenvelope, flags=0x604082
Feb 26 12:03:59 myhost sendmail[4694]: v1QH3vXj004694: SMTP outgoing connect on [172.31.234.15]
Feb 26 12:03:59 myhost sendmail[4694]: AUTH=client, relay=smtpout.secureserver.net., mech=LOGIN, bits=0
Feb 26 12:04:00 myhost sendmail[4694]: v1QH3vXj004694: [email protected], delay=00:00:01, xdelay=00:00:01, mailer=relay, pri=32686, relay=smtpout.secureserver.net. [173.201.193.101], dsn=5.0.0, stat=Service unavailable
Feb 26 12:04:00 myhost sendmail[4694]: v1QH3vXj004694: dropenvelope, e_flags=0x46050a2, OpMode=q, pid=4694
Feb 26 12:04:00 myhost sendmail[4694]: v1QH3vXj004694: alias MAILER-DAEMON => postmaster
Feb 26 12:04:00 myhost sendmail[4694]: v1QH3vXj004694: alias postmaster => root
Feb 26 12:04:00 myhost sendmail[4694]: v1QH3vXj004694: alias root => [email protected]
Feb 26 12:04:00 myhost sendmail[4694]: v1QH3vXj004694: unlink ./dfv1QH3vXj004694
Feb 26 12:04:00 myhost sendmail[4694]: v1QH3vXj004694: unlink ./qfv1QH3vXj004694
Feb 26 12:04:00 myhost sendmail[4694]: v1QH3vXj004694: done; delay=00:00:01, ntries=1
Feb 26 12:04:00 myhost sendmail[4694]: v1QH3vXj004694: unlock
Feb 26 12:04:00 myhost sendmail[4694]: v1QH3vXj004694: unlink ./xfv1QH3vXj004694
Feb 26 12:04:00 myhost sendmail[4694]: v1QH3vXj004694: ./xfv1QH3vXj004694: unlink-fail 2
Feb 26 12:04:00 myhost sendmail[4694]: NOQUEUE: dropenvelope, e_flags=0x4050a2, OpMode=q, pid=4694
Feb 26 12:04:00 myhost sendmail[4694]: v1QH3vXi004694: Losing ./qfv1QH3vXi004694: savemail panic
Feb 26 12:04:00 myhost sendmail[4694]: v1QH3vXi004694: SYSERR(root): savemail: cannot save rejected email anywhere
Feb 26 12:04:00 myhost sendmail[4694]: v1QH3vXi004694: unlink ./qfv1QH3vXi004694
Feb 26 12:04:00 myhost sendmail[4694]: v1QH3vXi004694: ./qfv1QH3vXi004694: unlink-fail 2
Feb 26 12:04:00 myhost sendmail[4694]: v1QH3vXi004694: done; delay=00:00:03, ntries=1
Feb 26 12:04:00 myhost sendmail[4694]: v1QH3vXi004694: unlock
Feb 26 12:04:00 myhost sendmail[4694]: v1QH3vXi004694: unlink ./xfv1QH3vXi004694
Feb 26 12:04:00 myhost sendmail[4694]: v1QH3vXi004694: ./xfv1QH3vXi004694: unlink-fail 2
Feb 26 12:04:00 myhost sendmail[4694]: NOQUEUE: dropenvelope, e_flags=0x4050a2, OpMode=q, pid=4694
Feb 26 12:04:00 myhost sendmail[4694]: v1QH3uXi004692: unlink ./dfv1QH3uXi004692
Feb 26 12:04:00 myhost sendmail[4694]: v1QH3uXi004692: unlink ./qfv1QH3uXi004692
Feb 26 12:04:00 myhost sendmail[4694]: v1QH3uXi004692: done; delay=00:00:04, ntries=1
Feb 26 12:04:00 myhost sendmail[4694]: v1QH3uXi004692: unlock
Feb 26 12:04:00 myhost sendmail[4694]: v1QH3uXi004692: unlink ./xfv1QH3uXi004692
Feb 26 12:04:00 myhost sendmail[4694]: v1QH3uXi004692: ./xfv1QH3uXi004692: unlink-fail 2
Feb 26 12:04:00 myhost sendmail[4694]: NOQUEUE: dropenvelope, e_flags=0x407062, OpMode=q, pid=4694
我认为这与连接有关,因为我在日志中没有看到其他错误。如果这与凭证相关,我可以发布更多信息。
有人可以解释为什么会失败吗?
答案1
当问题出在接收方时,sendmail 似乎没有留下任何线索。之前我使用 telnet 测试了 SMTP 连接,但认为我无法发送完整的电子邮件(通过 telnet),因为需要身份验证。我发现这个链接其中显示了如何构建 auth 命令然后测试电子邮件。
事实证明,接收 SMTP 服务器拒绝了邮件,因为 FROM 行上的域名没有 DNS 条目。修复该问题后,邮件通过 telnet 发送,随后通过 sendmail 发送。