SMTP

SMTP 221 Closing Connection vs 556 Domain Does Not Accept Mail

SMTP 221 (Closing Connection) is a 2xx Positive Completion response, while 556 (Domain Does Not Accept Mail) is a 5xx Permanent Negative response. 221 indicates that the server is closing the transmission channel. This is the normal response to the QUIT command, indicating a graceful end to the SMTP session. In contrast, 556 means that the destination domain does not accept mail and no forwarding address is available. The domain's DNS configuration (null MX record) explicitly indicates it does not receive email.

描述

The server is closing the transmission channel. This is the normal response to the QUIT command, indicating a graceful end to the SMTP session.

何时出现

After sending the QUIT command at the end of a mail session. The server acknowledges the disconnect and the TCP connection will be closed.

如何修复

No fix needed — this is the expected response when ending an SMTP session. If you see this unexpectedly, the server may be shutting down or timing out idle connections.

描述

The destination domain does not accept mail and no forwarding address is available. The domain's DNS configuration (null MX record) explicitly indicates it does not receive email.

何时出现

When sending to a domain that has published a null MX record (RFC 7505) in DNS, explicitly declaring that it does not accept any email messages.

如何修复

Verify the domain's MX records — a null MX (priority 0, empty host) means the domain intentionally rejects all mail. Contact the recipient through an alternative channel.

主要区别

1.

221 is a 2xx Positive Completion response, while 556 is a 5xx Permanent Negative response.

2.

SMTP 221: The server is closing the transmission channel. This is the normal response to the QUIT command, indicating a graceful end to the SMTP session.

3.

SMTP 556: The destination domain does not accept mail and no forwarding address is available. The domain's DNS configuration (null MX record) explicitly indicates it does not receive email.

4.

You encounter 221 when after sending the QUIT command at the end of a mail session. The server acknowledges the disconnect and the TCP connection will be closed.

5.

You encounter 556 when when sending to a domain that has published a null MX record (RFC 7505) in DNS, explicitly declaring that it does not accept any email messages.

何时使用哪个

For 221 (Closing Connection): No fix needed — this is the expected response when ending an SMTP session. If you see this unexpectedly, the server may be shutting down or timing out idle connections. For 556 (Domain Does Not Accept Mail): Verify the domain's MX records — a null MX (priority 0, empty host) means the domain intentionally rejects all mail. Contact the recipient through an alternative channel.

了解更多