设置退回邮件的 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"

相关内容