設定退回郵件的 SMTP 回應

設定退回郵件的 SMTP 回應

再會,

對於郵件伺服器,我必須讀取我的郵件伺服器發送的所有退回郵件。當發生退回郵件時,我收到的回應有時會出現 SMTP 錯誤回應,例如 550 郵箱未找到。

對於由我自己的 SMTP 伺服器發送的退回電子郵件,情況並非總是如此,例如,當電子郵件地址無法路由時。我得到一個非常不詳細的回應代碼,有時根本沒有。

更新

退回電子郵件的範例:

This message was created automatically by mail delivery software.

A message that you sent could not be delivered to one or more of its
recipients. This is a permanent error. The following address(es) failed:

  [email protected]
    SMTP error from remote mail server after RCPT TO:<[email protected]>:
    host mx4.hotmail.com [65.55.33.135]: 550 Requested action not taken:
    mailbox unavailable


  ------ This is a copy of the message, including all the headers. ------

另一個例子:

This message was created automatically by mail delivery software.

A message that you sent could not be delivered to one or more of its
recipients. This is a permanent error. The following address(es) failed:

  [email protected]


------ This is a copy of the message, including all the headers. ------

如您所看到的,myowndomain.com 發送的郵件有一個空白回應。他們都因為沒有找到郵箱而被退回。

我的問題是: myowndomain.com 上的郵件伺服器在產生退回郵件的回應代碼時是否可以更詳細?如果是這樣,我該如何使用 Exim 或 Postfix 或任何其他 SMTP 軟體進行設定?

答案1

如果您還沒有嘗試過 Postfix。預設情況下,它會提供詳細的退回郵件(如 hotmail 那樣)。

您也可以設定 Postfix 發送自訂退回郵件 http://www.postfix.org/bounce.5.html

我的 postfix 伺服器對無效收件者的回應:

This is the mail system at host mail.

I'm sorry to have to inform you that your message could not
be delivered to one or more recipients. It's attached below.

For further assistance, please send mail to postmaster.

If you do so, please include this problem report. You can
delete your own text from the attached returned message.

               The mail system

<[email protected]>: unknown user: "fakeuser"

相關內容