我们在6个月前设置了Mandrill,以便在服务器上运行postfix,并确保所有应用程序都向Mandrill发送电子邮件中继。
最近我们开始听到客户说他们没有收到他们期待发送的电子邮件(如商店购买的电子邮件通知等)。我也经历过这种情况,但看似随意。它不仅仅是一个特定的应用程序,因为我们已经在Perl,PHP,Ruby中看到了这个问题。所以它与Postfix有关。
我们看到了'#34;缺失" maillogs中的电子邮件,并且能够看到我们看到的与不合适的电子邮件之间的不同状态。但是,我们无法确定此时电子邮件发生了什么。
我已在Mandrill的报告界面中确认,没有记录已发现的电子邮件。所以它甚至被传递给了Mandrill。
以下是某些特定交易的邮件日志,所有这些都来自发送销售交易电子邮件的同一个应用程序。第一个显示我收到的电子邮件(作为收件人之一)。另外两个是我还没有收到的(和其他收件人一起):
收到电子邮件:
Sep 4 14:52:29 serverABC sendmail[18143]: s84IqSaq018143: from=apache, size=10054, class=0, nrcpts=4, msgid=<201409041852.s84IqSaq018143@serverABC.mydomain.com>, relay=apache@localhost
Sep 4 14:52:29 serverABC postfix/smtpd[14952]: connect from localhost[127.0.0.1]
Sep 4 14:52:29 serverABC postfix/smtpd[14952]: 09AB632CE053: client=localhost[127.0.0.1]
Sep 4 14:52:29 serverABC postfix/cleanup[14959]: 09AB632CE053: message-id=<201409041852.s84IqSaq018143@serverABC.mydomain.com>
Sep 4 14:52:29 serverABC postfix/qmgr[1713]: 09AB632CE053: from=<apache@serverABC.mydomain.com>, size=10475, nrcpt=4 (queue active)
Sep 4 14:52:29 serverABC sendmail[18143]: s84IqSaq018143: to=Flmt@clientcompany.com,store@thestore.com,rich@mydomain.com,=?utf-8?B?S2FyZW4gQ29sYXZpdG8=?= <karen@redacted.com>, ctladdr=apache (48/48), delay=00:00:01, xdelay=00:00:00, mailer=relay, pri=130054, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (Ok: queued as 09AB632CE053)
Sep 4 14:52:29 serverABC postfix/smtpd[14952]: disconnect from localhost[127.0.0.1]
Sep 4 14:52:29 serverABC postfix/smtp[15569]: 09AB632CE053: to=<rich@mydomain.com>, relay=smtp.mandrillapp.com[54.205.6.2]:25, delay=0.49, delays=0.11/0/0.27/0.1, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as 677011C0A00)
Sep 4 14:52:29 serverABC postfix/smtp[15569]: 09AB632CE053: to=<karen@redacted.com>, relay=smtp.mandrillapp.com[54.205.6.2]:25, delay=0.49, delays=0.11/0/0.27/0.1, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as 677011C0A00)
Sep 4 14:52:29 serverABC postfix/smtp[15569]: 09AB632CE053: to=<store@thestore.com>, relay=smtp.mandrillapp.com[54.205.6.2]:25, delay=0.49, delays=0.11/0/0.27/0.1, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as 677011C0A00)
Sep 4 14:52:29 serverABC postfix/smtp[15569]: 09AB632CE053: to=<Flmt@clientcompany.com>, relay=smtp.mandrillapp.com[54.205.6.2]:25, delay=0.49, delays=0.11/0/0.27/0.1, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as 677011C0A00)
Sep 4 14:52:29 serverABC postfix/qmgr[1713]: 09AB632CE053: removed
未收到电子邮件,同类型的交易:
Sep 4 15:01:05 serverABC sendmail[24776]: s84J13UJ024776: from=apache, size=10308, class=0, nrcpts=4, msgid=<201409041901.s84J13UJ024776@serverABC.mydomain.com>, relay=apache@localhost
Sep 4 15:01:05 serverABC sendmail[24776]: s84J13UJ024776: to==?utf-8?B?VGFuYSBDbGFyaw==?= <clarktana@poppermail.com>, delay=00:00:02, mailer=relay, pri=130308, stat=queued
Sep 4 15:01:05 serverABC sendmail[24776]: s84J13UJ024776: to=rich@mydomain.com, delay=00:00:02, mailer=relay, pri=130308, stat=queued
Sep 4 15:01:05 serverABC sendmail[24776]: s84J13UJ024776: to=store@thestore.com, delay=00:00:02, mailer=relay, pri=130308, stat=queued
Sep 4 15:01:05 serverABC sendmail[24776]: s84J13UJ024776: to=Flmt@clientcompany.com, delay=00:00:02, mailer=relay, pri=130308, stat=queued
另一个未收到:
Sep 4 15:23:25 serverABC sendmail[9756]: s84JNM7c009756: from=apache, size=10289, class=0, nrcpts=4, msgid=<201409041923.s84JNM7c009756@serverABC.mydomain.com>, relay=apache@localhost
Sep 4 15:23:25 serverABC sendmail[9756]: s84JNM7c009756: to==?utf-8?B?R2FyeSBHcmF2ZXM=?= <joesdjj@sod.com>, delay=00:00:03, mailer=relay, pri=130289, stat=queued
Sep 4 15:23:25 serverABC sendmail[9756]: s84JNM7c009756: to=rich@mydomain.com, delay=00:00:03, mailer=relay, pri=130289, stat=queued
Sep 4 15:23:25 serverABC sendmail[9756]: s84JNM7c009756: to=store@thestore.com, delay=00:00:03, mailer=relay, pri=130289, stat=queued
Sep 4 15:23:25 serverABC sendmail[9756]: s84JNM7c009756: to=Flmt@clientcompany.com, delay=00:00:03, mailer=relay, pri=130289, stat=queued
您可以看到两组日志中的明显差异。一个显示到smtp.mandrill.com的中继。另一个显示排队,但从未进入mandrill或其他任何地方。
Mailq总是显示为空,所以不会卡住,除非有另一个我无法看到的队列(延迟,maildrop,等等)?