Windows-Server-2003

IIS 6 SMTP 無法將郵件中繼到 Exchange Online

  • August 29, 2019

我們公司使用 Office 365,我們的電子郵件託管在 Exchange Online 上;但是,由於各種原因(主要是不支持經過身份驗證的 SMTP 和 TLS),我們有幾個應用程序無法直接向 Exchange Online 發送消息;因此,我們使用 IIS 的 SMTP 組件設置了幾個內部郵件中繼,如下所示;他們每個人都使用不同的發件人地址,並且需要使用不同的使用者帳戶對 Exchange Online 進行身份驗證,因此我們需要為每個應用程序設置一個 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 中配置相同的帳戶;它工作正常,它可以使用經過身份驗證的帶有 TLS 的 SMTP 向 Exchange Online 發送電子郵件;該問題似乎只影響 IIS 的 SMTP 組件,並且似乎與網路、作業系統或其他任何東西無關。

什麼可能導致這樣的錯誤,我們該如何解決?

(我們知道我們不應該再使用 Windows Server 2003;但是,該應用程序只能在那裡執行,並且它必須繼續工作直到它可以被替換。我們還知道我們可以將 SMTP 中繼移動到另一個正在執行的伺服器更新的作業系統,但很高興找到 SMTP 中繼僅在 IIS 6 上失敗的原因。)

儘管以前可以正常工作,但我們再也無法進行這項工作;我們最終將 SMTP 中繼移動到另一個(虛擬)伺服器,執行 Windows Server 2008 R2;完美無瑕。

我的猜測:Exchange Online 中的某些內容(不再)與 IIS 6 中的 SMTP 組件一起無法正常工作。由於 Windows Server 2003 完全失去支持,唯一的選擇是替換它。

確保用於連接到 Office 365 的帳戶的密碼仍然有效,並且其密碼未重置或過期。

MS 訂閱了多個黑名單,如果您的 IP 在這裡,它將拒絕來自該 IP 的連接嘗試。您也無法繞過這一點,您必須刪除 IP,或者使用不同的 IP 發送郵件。

當然 - 確保不是本地防火牆、策略或 A/V 更新導致您的問題。您可以通過確保您可以從該伺服器向您的其他工作中繼盒之一發送消息來做到這一點。如果從來沒有開箱即用,你知道問題是本地的。

引用自:https://serverfault.com/questions/673740