Sendmail:发送带有完整 SMTP 记录的测试邮件

Sendmail:发送带有完整 SMTP 记录的测试邮件

我在网页上有一个表单,它使用同一服务器上的 sendmail 发送电子邮件。收件人是使用 Google Apps 发送电子邮件的客户。在表单中,我输入了我的电子邮件地址。如果我输入*@aol.com或者*@yahoo.com(其中“*”可以是任意符号,当然不是真正的星号),电子邮件发送失败,并显示以下信息/var/log/mail.log

Sep 22 14:01:12 localhost sendmail[16522]: t8ME1CSU016522: Authentication-Warning: localhost.local: www-data set sender to [email protected] using -f
Sep 22 14:01:12 localhost sendmail[16522]: t8ME1CSU016522: [email protected], size=1099, class=0, nrcpts=1, msgid=<[email protected]>, relay=www-data@localhost
Sep 22 14:01:12 localhost sm-mta[16523]: t8ME1CIi016523: from=<[email protected]>, size=1418, class=0, nrcpts=1, msgid=<[email protected]>, proto=ESMTP, daemon=MTA-v4, relay=localhost.local [127.0.0.1]
Sep 22 14:01:12 localhost sendmail[16522]: t8ME1CSU016522: [email protected], [email protected] (33/33), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=31099, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (t8ME1CIi016523 Message accepted for delivery)
Sep 22 14:01:12 localhost sendmail[16527]: t8ME1CjK016527: Authentication-Warning: localhost.local: www-data set sender to [email protected] using -f
Sep 22 14:01:12 localhost sendmail[16527]: t8ME1CjK016527: [email protected], size=1224, class=0, nrcpts=1, msgid=<[email protected]>, relay=www-data@localhost
Sep 22 14:01:12 localhost sm-mta[16528]: t8ME1CK4016528: from=<[email protected]>, size=1543, class=0, nrcpts=1, msgid=<[email protected]>, proto=ESMTP, daemon=MTA-v4, relay=localhost.local [127.0.0.1]
Sep 22 14:01:12 localhost sendmail[16527]: t8ME1CjK016527: [email protected], [email protected] (33/33), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=31224, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (t8ME1CK4016528 Message accepted for delivery)
Sep 22 14:01:13 localhost sm-mta[16530]: STARTTLS=client, relay=aspmx.l.google.com., version=TLSv1/SSLv3, verify=FAIL, cipher=ECDHE-RSA-AES128-GCM-SHA256, bits=128/128
Sep 22 14:01:13 localhost sm-mta[16525]: STARTTLS=client, relay=aspmx.l.google.com., version=TLSv1/SSLv3, verify=FAIL, cipher=ECDHE-RSA-AES128-GCM-SHA256, bits=128/128
Sep 22 14:01:13 localhost sm-mta[16530]: t8ME1CK4016528: to=<[email protected]>, delay=00:00:01, xdelay=00:00:01, mailer=esmtp, pri=121543, relay=aspmx.l.google.com. [173.194.205.27], dsn=5.0.0, stat=Service unavailable
Sep 22 14:01:13 localhost sm-mta[16530]: t8ME1CK4016528: t8ME1DK4016530: DSN: Service unavailable
Sep 22 14:01:13 localhost sm-mta[16530]: t8ME1DK4016530: to=<[email protected]>, delay=00:00:00, xdelay=00:00:00, mailer=esmtp, pri=30000, relay=aspmx.l.google.com. [173.194.205.27], dsn=5.1.1, stat=User unknown
Sep 22 14:01:13 localhost sm-mta[16530]: t8ME1DK4016530: t8ME1DK5016530: return to sender: User unknown
Sep 22 14:01:13 localhost sm-mta[16530]: t8ME1DK5016530: to=root, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=30000, dsn=2.0.0, stat=Sent
Sep 22 14:01:13 localhost sm-mta[16525]: t8ME1CIi016523: to=<[email protected]>, delay=00:00:01, xdelay=00:00:01, mailer=esmtp, pri=121418, relay=aspmx.l.google.com. [173.194.205.27], dsn=5.0.0, stat=Service unavailable
Sep 22 14:01:13 localhost sm-mta[16525]: t8ME1CIi016523: t8ME1DIi016525: DSN: Service unavailable
Sep 22 14:01:13 localhost sm-mta[16525]: t8ME1DIi016525: to=<[email protected]>, delay=00:00:00, xdelay=00:00:00, mailer=esmtp, pri=30000, relay=aspmx.l.google.com. [173.194.205.27], dsn=5.1.1, stat=User unknown
Sep 22 14:01:13 localhost sm-mta[16525]: t8ME1DIi016525: t8ME1DIj016525: return to sender: User unknown
Sep 22 14:01:13 localhost sm-mta[16525]: t8ME1DIj016525: to=root, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=30000, dsn=2.0.0, stat=Sent

我尝试过的其他所有电子邮件地址似乎都工作正常,日志也显示成功。两者似乎都连接到了中继,但之后就失败了。

我可以看到某项服务不可用,但我不完全确定是哪项服务,也不确定为什么只有当我输入这些地址时它才不可用 - 尤其是当发件人被强制输入no_reply电子邮件地址时。为什么我在表单上输入的值会如此重要?我显然忽略了一些东西。

我不是系统管理员,也不精通电子邮件故障排除,所以我希望有人能帮我理解我在这里看到的内容。是什么导致了这些故障?

答案1

Sendmail:发送带有完整 SMTP 记录的测试邮件

您可以让 sendmail 发送一条带有 SMTP 会话完整记录的测试消息。
通常它可以提供更多有关传送失败原因的线索。

更改 SENDER 和 RECIPIENT 后,以 root 身份执行以下脚本。

#!/bin/sh
[email protected]
ENVELOPE_SENDER=$SENDER
[email protected]

/usr/sbin/sendmail -i -v -f$ENVELOPE_SENDER -- $RECIPIENT <<END
from: $SENDER
to: $RECIPIENT
subject: delivery test

Delivery test -- ignore it.
END

答案2

注册反馈循环并从 aol 和 yahoo 中找出答案,同时确保您投诉。

确保您尊重 NDR(我看到了一些),您可能还想使用像 sendgrid 这样的智能主机来帮助您。

相关内容