IIS 6 SMTP 无法将邮件中继到 Exchange Online

IIS 6 SMTP 无法将邮件中继到 Exchange Online

我们公司使用 Office 365,我们的电子邮件托管在 Exchange Online 上;但是,由于各种原因(主要是缺乏对使用 TLS 进行身份验证的 SMTP 的支持),我们有几个应用程序无法直接向 Exchange Online 发送邮件;因此,我们按照建议使用 IIS 的 SMTP 组件设置了几个内部邮件中继这里;每个应用程序都使用不同的发件人地址,并且需要使用不同的用户帐户向 Exchange Online 进行身份验证,因此我们需要为每个应用程序设置一个 SMTP 中继;这就是为什么我们有多个 SMTP 中继,每个中继都在托管需要为其中继消息的应用程序的服务器上运行。所有这些 SMTP 中继的配置方式完全相同,只有用户帐户不同。

大多数 SMTP 中继都在 Windows Server 2008 R2 或 Windows Server 2012 系统上运行;但是,其中一个应用程序需要在 Windows Server 2003 系统上运行,因此其托管在同一系统上的 SMTP 中继在 IIS 6 上运行。

直到几天前,一切都运行正常;然后,SMTP 中继仅在 Windows Server 2003 系统上停止工作,而在所有其他系统上仍然运行良好;SMTP 日志显示了一个非常奇怪的行为:看起来好像在发出 AUTH 命令后某些东西卡住了,然后远程服务器由于超时而断开连接:

2015-03-07 17:44:27 157.56.251.50 OutboundConnectionResponse SMTPSVC1 <OurServerName> - 0 - - 220+AMXPR07CA0050.outlook.office365.com+Microsoft+ESMTP+MAIL+Service+ready+at+Sat,+7+Mar+2015+17:44:38++0000 0 0 108 0 16 SMTP - - - -
2015-03-07 17:44:27 157.56.251.50 OutboundConnectionCommand SMTPSVC1 <OurServerName> - 0 EHLO - <OurServerName> 0 0 4 0 32 SMTP - - - -
2015-03-07 17:44:27 157.56.251.50 OutboundConnectionResponse SMTPSVC1 <OurServerName> - 0 - - 250-AMXPR07CA0050.outlook.office365.com+Hello+[<OurPublicIPAddress>] 0 0 60 0 63 SMTP - - - -
2015-03-07 17:44:27 157.56.251.50 OutboundConnectionCommand SMTPSVC1 <OurServerName> - 0 STARTTLS - - 0 0 8 0 63 SMTP - - - -
2015-03-07 17:44:27 157.56.251.50 OutboundConnectionResponse SMTPSVC1 <OurServerName> - 0 - - 220+2.0.0+SMTP+server+ready 0 0 27 0 94 SMTP - - - -
2015-03-07 17:44:30 157.56.251.50 OutboundConnectionCommand SMTPSVC1 <OurServerName> - 0 EHLO - <OurServerName> 0 0 4 0 2829 SMTP - - - -
2015-03-07 17:44:30 157.56.251.50 OutboundConnectionResponse SMTPSVC1 <OurServerName> - 0 - - 250-AMXPR07CA0050.outlook.office365.com+Hello+[<OurPublicIPAddress>] 0 0 60 0 2860 SMTP - - - -
2015-03-07 17:44:30 157.56.251.50 OutboundConnectionCommand SMTPSVC1 <OurServerName> - 0 AUTH - - 0 0 4 0 2860 SMTP - - - -
2015-03-07 17:49:31 157.56.251.50 OutboundConnectionResponse SMTPSVC1 <OurServerName> - 0 - - 451+4.7.0+Timeout+waiting+for+client+input 0 0 42 0 303875 SMTP - - - -
2015-03-07 17:49:31 132.245.226.242 OutboundConnectionResponse SMTPSVC1 <OurServerName> - 0 - - 220+DB4PR06CA0004.outlook.office365.com+Microsoft+ESMTP+MAIL+Service+ready+at+Sat,+7+Mar+2015+17:49:43++0000 0 0 108 0 62 SMTP - - - -
2015-03-07 17:49:31 132.245.226.242 OutboundConnectionCommand SMTPSVC1 <OurServerName> - 0 EHLO - <OurServerName> 0 0 4 0 62 SMTP - - - -
2015-03-07 17:49:31 132.245.226.242 OutboundConnectionResponse SMTPSVC1 <OurServerName> - 0 - - 250-DB4PR06CA0004.outlook.office365.com+Hello+[<OurPublicIPAddress>] 0 0 60 0 109 SMTP - - - -
2015-03-07 17:49:31 132.245.226.242 OutboundConnectionCommand SMTPSVC1 <OurServerName> - 0 STARTTLS - - 0 0 8 0 109 SMTP - - - -
2015-03-07 17:49:31 132.245.226.242 OutboundConnectionResponse SMTPSVC1 <OurServerName> - 0 - - 220+2.0.0+SMTP+server+ready 0 0 27 0 156 SMTP - - - -
2015-03-07 17:49:34 132.245.226.242 OutboundConnectionCommand SMTPSVC1 <OurServerName> - 0 EHLO - <OurServerName> 0 0 4 0 2609 SMTP - - - -
2015-03-07 17:49:34 132.245.226.242 OutboundConnectionResponse SMTPSVC1 <OurServerName> - 0 - - 250-DB4PR06CA0004.outlook.office365.com+Hello+[<OurPublicIPAddress>] 0 0 60 0 2656 SMTP - - - -
2015-03-07 17:49:34 132.245.226.242 OutboundConnectionCommand SMTPSVC1 <OurServerName> - 0 AUTH - - 0 0 4 0 2656 SMTP - - - -
2015-03-07 17:54:34 132.245.226.242 OutboundConnectionResponse SMTPSVC1 <OurServerName> - 0 - - 451+4.7.0+Timeout+waiting+for+client+input 0 0 42 0 303015 SMTP - - - -
2015-03-07 17:54:34 157.56.254.178 OutboundConnectionResponse SMTPSVC1 <OurServerName> - 0 - - 220+DBXPR05CA0038.outlook.office365.com+Microsoft+ESMTP+MAIL+Service+ready+at+Sat,+7+Mar+2015+17:54:46++0000 0 0 108 0 47 SMTP - - - -
2015-03-07 17:54:34 157.56.254.178 OutboundConnectionCommand SMTPSVC1 <OurServerName> - 0 EHLO - <OurServerName> 0 0 4 0 47 SMTP - - - -
2015-03-07 17:54:34 157.56.254.178 OutboundConnectionResponse SMTPSVC1 <OurServerName> - 0 - - 250-DBXPR05CA0038.outlook.office365.com+Hello+[<OurPublicIPAddress>] 0 0 60 0 94 SMTP - - - -
2015-03-07 17:54:34 157.56.254.178 OutboundConnectionCommand SMTPSVC1 <OurServerName> - 0 STARTTLS - - 0 0 8 0 94 SMTP - - - -
2015-03-07 17:54:34 157.56.254.178 OutboundConnectionResponse SMTPSVC1 <OurServerName> - 0 - - 220+2.0.0+SMTP+server+ready 0 0 27 0 140 SMTP - - - -
2015-03-07 17:54:37 157.56.254.178 OutboundConnectionCommand SMTPSVC1 <OurServerName> - 0 EHLO - <OurServerName> 0 0 4 0 2640 SMTP - - - -
2015-03-07 17:54:37 157.56.254.178 OutboundConnectionResponse SMTPSVC1 <OurServerName> - 0 - - 250-DBXPR05CA0038.outlook.office365.com+Hello+[<OurPublicIPAddress>] 0 0 60 0 2672 SMTP - - - -
2015-03-07 17:54:37 157.56.254.178 OutboundConnectionCommand SMTPSVC1 <OurServerName> - 0 AUTH - - 0 0 4 0 2672 SMTP - - - -
2015-03-07 17:59:37 157.56.254.178 OutboundConnectionResponse SMTPSVC1 <OurServerName> - 0 - - 451+4.7.0+Timeout+waiting+for+client+input 0 0 42 0 303703 SMTP - - - -

这仅发生在 Windows Server 2003 上的 IIS 6 上运行的 SMTP 中继上;在 Windows Server 2008 R2 或 Windows Server 2012 系统上运行的所有其他 SMTP 中继上一切正常。

由于怀疑该特定服务器存在一些问题(众所周知,该服务器存在多个问题),我们构建了一台新的 Windows Server 2003 计算机,以便将应用程序迁移到该服务器上;然而,新的服务器表现出完全相同的行为:发出 AUTH 命令后,出站 SMTP 对话因相同的错误而停止。

出于好奇,我们尝试在服务器上的 Outlook Express 中配置相同的帐户;它工作正常,并且它可以使用经过身份验证的 SMTP 和 TLS 向 Exchange Online 发送电子邮件;该问题似乎只影响 IIS 的 SMTP 组件,似乎与网络、操作系统或其他任何东西都无关。

什么原因可能导致这样的错误?我们该如何修复它?

(我们知道我们不应该再使用 Windows Server 2003;但是,应用程序只能在那里运行,并且它必须继续工作直到被替换。我们还知道我们可以将 SMTP 中继移动到运行较新操作系统的另一台服务器,但如果能找出 SMTP 中继仅在 IIS 6 上失败的原因就更好了。)

答案1

确保用于连接 Office 365 的帐户的密码仍然有效,并且其密码未被重置或过期。

MS 订阅了多个黑名单,如果您的 IP 在此处,它将拒绝来自该 IP 的连接尝试。您也无法绕过此规则,您必须删除该 IP,或使用其他 IP 发送邮件。

当然,请确保问题不是由本地防火墙、策略或 A/V 更新引起的。只需确保可以从此服务器向其他正常工作的中继盒发送消息即可。如果消息始终无法从中继盒发出,则说明问题出在本地。

答案2

我们再也没能做到这一点,尽管以前它工作得很好;我们最终将 SMTP 中继移至另一台运行 Windows Server 2008 R2 的(虚拟)服务器;运行顺利。

我的猜测是:Exchange Online 中的某些功能无法与 IIS 6 中的 SMTP 组件正确配合使用(不再)。由于 Windows Server 2003 已完全不再受支持,唯一的选择就是更换它。

相关内容