Email-Server

嘗試發送郵件時出現 Exim TLS 錯誤

  • January 9, 2016

我在我的伺服器上安裝了 exim,我想為使用 phpmail()功能的 apache 託管的網站發送郵件。

當我嘗試發送電子郵件時,我沒有錯誤,但電子郵件永遠不會到達。我檢查了exim’s 的日誌,我得到了這個:

2015-12-28 15:51:36 1aDZ96-00052a-5y <= noreply@xxxxx.xxx U=www-data P=local S=490
2015-12-28 15:51:37 1aDZ96-00052a-5y TLS error on connection to mx2.hotmail.com [65.54.188.72] (recv): The TLS connection was non-properly terminated.
2015-12-28 15:51:37 1aDZ96-00052a-5y TLS error on connection to mx2.hotmail.com [65.54.188.72] (send): The specified session has been invalidated for some reason.
2015-12-28 15:51:37 1aDZ96-00052a-5y ** xxxxxxx@hotmail.com R=dnslookup T=remote_smtp X=TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256 DN="CN=*.hotmail.com": SMTP error from remote mail server after MAIL FROM:<noreply@xxxxx.xxx> SIZE=1526: host mx2.hotmail.com [65.54.188.72]: 550 SC-002 (BAY004-MC1F20) Unfortunately, messages from xxx.xxx.xxx.xxx weren't sent. Please contact your Internet service provider since part of their network is on our block list. You can also refer your provider to http://mail.live.com/mail/troubleshooting.aspx#errors.
2015-12-28 15:51:38 1aDZ97-00052f-Uc <= <> R=1aDZ96-00052a-5y U=Debian-exim P=local S=1747
2015-12-28 15:51:38 1aDZ96-00052a-5y Completed

每次嘗試發送電子郵件都會產生類似的錯誤。我已經搜尋了可能導致這種情況的原因。我發現當伺服器被列入黑名單時可能會發生類似的錯誤,但我的伺服器沒有理由被列入(我已經用 mxtoolbox 進行了檢查,沒有問題)。

此處發布的錯誤顯示了hotmail接收者地址,但我可能會收到其他目標域的錯誤,如下所示:

SMTP error from remote mail server after MAIL FROM:<www-data@xxxxxx.xxx> SIZE=1898: host smtp-in.orange.fr [193.252.22.65]: 501 5.1.0 Emetteur invalide. Invalid Sender. O

我還被告知要始終取消提供發件人地址的-f選項,但它只會更改錯誤日誌中顯示的發件人地址,並且錯誤是相同的。sendmail

我該怎麼辦 ?

以下是您遇到的錯誤的解釋:

  1. 2015-12-28 15:51:37 1aDZ96-00052a-5y TLS error on connection to mx2.hotmail.com [65.54.188.72] (send): The specified session has been invalidated for some reason.

這意味著您正在嘗試為您的伺服器使用自簽名 SSL 證書,它們不應該在測試環境之外的任何地方使用,因為 Internet 上的大多數伺服器將拒絕連接。

要使用 SSL,您需要獲得正確簽名的證書(例如,您可以從StartSSLWoSign免費獲得它。)

  1. 2015-12-28 15:51:37 1aDZ96-00052a-5y ** xxxxxxx@hotmail.com R=dnslookup T=remote_smtp X=TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256 DN="CN=*.hotmail.com": SMTP error from remote mail server after MAIL FROM:<noreply@xxxxx.xxx> SIZE=1526: host mx2.hotmail.com [65.54.188.72]: 550 SC-002 (BAY004-MC1F20) Unfortunately, messages from xxx.xxx.xxx.xxx weren't sent. Please contact your Internet service provider since part of their network is on our block list. You can also refer your provider to http://mail.live.com/mail/troubleshooting.aspx#errors

這意味著您正試圖在家庭 ISP 或其他受威脅的網路上執行郵件伺服器。大多數主要郵件伺服器不接受來自家庭 IP 的郵件。如果您希望您的郵件被遞送,您必須遵守他們的規則 - 要求您的 ISPhttp://mail.live.com/mail/troubleshooting.aspx#errors去做微軟要求的事情可能是解決它的唯一方法。但首先,您應該live.com自己聯繫支持人員並詢問他們需要什麼才能將您的主機列入白名單。

準備好與每個主要的郵件服務機構聯繫並進行長時間的通信,以使您的郵件暢通無阻。

  1. SMTP error from remote mail server after MAIL FROM:<www-data@xxxxxx.xxx> SIZE=1898: host smtp-in.orange.fr [193.252.22.65]: 501 5.1.0 Emetteur invalide. Invalid Sender.

這意味著您發送郵件的域與 orange.fr 所期望的不對應。檢查它是否有正確解析為您發送電子郵件的 IP 的 MX 記錄

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