电子邮件偶尔会被发送给错误或额外的收件人

电子邮件偶尔会被发送给错误或额外的收件人

多年来,我们一直成功地使用 hMailServer 作为我们的邮件服务器。最近,微软屏蔽了我们的垃圾邮件(尽管我们有合法的选择加入服务),因此任何 hotmail、实时电子邮件都无法送达。我们在不同的 IP 上有一个备份服务器,安装了具有相同配置的 hMailServer(我们从主服务器导出并将其推送到备份服务器)。但是,自从这样做以来,我们发现了一些非常奇怪的行为,很难确定。

基本上,电子邮件会随机发送给错误的收件人。这种情况并非总是发生。我们还收到一些包含调试信息的电子邮件,据报道这些电子邮件已发送到客户的电子邮件帐户。在我们切换邮件服务器之前,这个问题从未存在过,并且没有更改任何代码。我们真的不知道是什么原因导致这种情况发生。

由于部分信息较为敏感,我们不得不暂时切换回原来的邮件服务器,并实现一些功能,以便当电子邮件发送到基于 Microsoft 的电子邮件帐户时,我们会收到电子邮件副本和通知,以便采取适当的措施。这显然不是一个可行的解决方案,我们需要尝试了解到底发生了什么。

我不太确定您想要什么信息,但在日志中我们注意到一些 502(未执行的命令)。以下是一些日志。在下面的代码片段中,staff-member1 和 staff-member2 根本不应该收到这些电子邮件。

"APPLICATION"   2260   "2013-03-07 13:02:37.762"   "SMTPDeliverer - Message 969617: Message delivery thread completed."
"SMTPD"   2316   14153   "2013-03-07 13:04:15.168"   "IP_ADDRESS"   "SENT: 220 our.mail.server.com ESMTP"
"SMTPD"   2308   14153   "2013-03-07 13:04:15.168"   "IP_ADDRESS"   "RECEIVED: HELO our_server"
"SMTPD"   2308   14153   "2013-03-07 13:04:15.168"   "IP_ADDRESS"   "SENT: 250 Hello."
"SMTPD"   2328   14153   "2013-03-07 13:04:15.168"   "IP_ADDRESS"   "RECEIVED: MAIL FROM:<[email protected]>"
"SMTPD"   2316   14154   "2013-03-07 13:04:16.497"   "IP_ADDRESS"   "SENT: 220 our.mail.server.com ESMTP"
"SMTPD"   2348   14154   "2013-03-07 13:04:16.512"   "IP_ADDRESS"   "RECEIVED: HELO our_server"
"SMTPD"   2348   14154   "2013-03-07 13:04:16.512"   "IP_ADDRESS"   "SENT: 250 Hello."
"SMTPD"   2308   14154   "2013-03-07 13:04:16.528"   "IP_ADDRESS"   "RECEIVED: MAIL FROM:<[email protected]>"
"SMTPD"   2328   14153   "2013-03-07 13:04:17.731"   "IP_ADDRESS"   "SENT: 250 OK"
"SMTPD"   2308   14154   "2013-03-07 13:04:19.090"   "IP_ADDRESS"   "SENT: 250 OK"
"SMTPD"   2336   14154   "2013-03-07 13:04:19.090"   "IP_ADDRESS"   "RECEIVED: RCPT TO:<[email protected]>"
"SMTPD"   2336   14154   "2013-03-07 13:04:19.090"   "IP_ADDRESS"   "SENT: 250 OK"
"SMTPD"   2348   14154   "2013-03-07 13:04:19.090"   "IP_ADDRESS"   "RECEIVED: RCPT TO:<[email protected]>"
"SMTPD"   2348   14154   "2013-03-07 13:04:19.106"   "IP_ADDRESS"   "SENT: 250 OK"
"SMTPD"   2308   14154   "2013-03-07 13:04:19.106"   "IP_ADDRESS"   "RECEIVED: RCPT TO:<[email protected]>"
"SMTPD"   2308   14154   "2013-03-07 13:04:21.106"   "IP_ADDRESS"   "SENT: 250 OK"
"SMTPD"   2324   14154   "2013-03-07 13:04:21.106"   "IP_ADDRESS"   "RECEIVED: RCPT TO:<[email protected]>"
"SMTPD"   2324   14154   "2013-03-07 13:04:23.106"   "IP_ADDRESS"   "SENT: 250 OK"
"SMTPD"   2320   14154   "2013-03-07 13:04:23.106"   "IP_ADDRESS"   "RECEIVED: DATA"
"SMTPD"   2320   14154   "2013-03-07 13:04:23.106"   "IP_ADDRESS"   "SENT: 354 OK, send."
"SMTPD"   2164   14154   "2013-03-07 13:04:23.278"   "IP_ADDRESS"   "SENT: 250 Queued (0.172 seconds)"
"APPLICATION"   2260   "2013-03-07 13:04:23.278"   "SMTPDeliverer - Message 969618: Delivering message from [email protected] to [email protected], [email protected], [email protected], [email protected]. File: C:\Program Files (x86)\hMailServer\Data\{1798FEFB-112E-4904-92F3-49C47683C213}.eml"
"SMTPD"   2340   14154   "2013-03-07 13:04:23.293"   "IP_ADDRESS"   "RECEIVED: Date: Thu, 07 Mar 2013 13:03:22 +0000"
"SMTPD"   2340   14154   "2013-03-07 13:04:23.293"   "IP_ADDRESS"   "SENT: 502 Unimplemented command."
"SMTPD"   2308   14154   "2013-03-07 13:04:23.293"   "IP_ADDRESS"   "RECEIVED: Subject: Order Placed... £14.99!"
"SMTPD"   2308   14154   "2013-03-07 13:04:23.293"   "IP_ADDRESS"   "SENT: 502 Unimplemented command."
"SMTPD"   2340   14154   "2013-03-07 13:04:23.293"   "IP_ADDRESS"   "RECEIVED: To: [email protected], [email protected]"
"SMTPD"   2340   14154   "2013-03-07 13:04:23.293"   "IP_ADDRESS"   "SENT: 502 Unimplemented command."
"SMTPD"   2332   14154   "2013-03-07 13:04:23.293"   "IP_ADDRESS"   "RECEIVED: X-PHP-Originating-Script: 0:checkout.php"
"SMTPD"   2332   14154   "2013-03-07 13:04:23.293"   "IP_ADDRESS"   "SENT: 502 Unimplemented command."
"SMTPD"   2320   14154   "2013-03-07 13:04:23.293"   "IP_ADDRESS"   "RECEIVED: From: Some Debugging Script <[email protected]>"
"SMTPD"   2320   14154   "2013-03-07 13:04:23.293"   "IP_ADDRESS"   "SENT: 502 Unimplemented command."
"SMTPD"   2316   14154   "2013-03-07 13:04:23.293"   "IP_ADDRESS"   "RECEIVED: "
"SMTPD"   2316   14154   "2013-03-07 13:04:23.293"   "IP_ADDRESS"   "SENT: 502 Unimplemented command."
"SMTPD"   2340   14154   "2013-03-07 13:04:23.293"   "IP_ADDRESS"   "RECEIVED: Order 97188 has been placed

我们已经在hMail 论坛,回复表明问题出在我们的代码中,但我真的不明白这是怎么可能的,因为该代码在我们的其他邮件服务器上已经运行多年了。

如果其中任何一点不太清楚,我们深表歉意,但我们在这里有点走投无路了。如果您需要任何其他信息,请询问。

任何投入将不胜感激。

谢谢

答案1

也许以下内容可以帮助您解决问题。

看一下这些字符串:

"SMTPD" 2320 14154 "2013-03-07 13:04:23.106" "IP_ADDRESS" "SENT: 354 OK, send."

"SMTPD" 2164 14154 "2013-03-07 13:04:23.278" "IP_ADDRESS" "SENT: 250 Queued (0.172 seconds)"

"APPLICATION" 2260 "2013-03-07 13:04:23.278" "SMTPDeliverer - Message 969618: Delivering message from [email protected] to [email protected], [email protected], [email protected], [email protected]. File: C:\Program Files (x86)\hMailServer\Data\{1798FEFB-112E-4904-92F3-49C47683C213}.eml"

"SMTPD" 2340 14154 "2013-03-07 13:04:23.293" "IP_ADDRESS" "RECEIVED: Date: Thu, 07 Mar 2013 13:03:22 +0000"

"SMTPD" 2340 14154 "2013-03-07 13:04:23.293" "IP_ADDRESS" "SENT: 502 Unimplemented command."

电子邮件实际上是空的 -250 Queued紧接着354 OK, send.

下面几行250 Queued告诉你,邮件头是以 SMTP 命令的形式传输的。当然,SMTP 服务器无法理解它们。

考虑调查您的代码。数据部分的结尾是 CRLF。CRLF - 载波返回(ASCII 代码 0xD)、换行符(ASCII 代码 0xA)、点、载波返回、换行符 - 也许您的脚本或应用程序或其他任何东西错误地将其发送到标题之前。

相关内容