SMTP 221 Closing Connection vs 554 Transaction Failed
SMTP 221 (Closing Connection) is a 2xx Positive Completion response, while 554 (Transaction Failed) 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, 554 means that the mail transaction has failed. This is a catch-all permanent error that can occur at any point during the SMTP session, including as a rejection greeting when the server refuses all connections from
描述
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 mail transaction has failed. This is a catch-all permanent error that can occur at any point during the SMTP session, including as a rejection greeting when the server refuses all connections from your IP.
何时出现
When the entire mail transaction is rejected — often due to spam filtering, blacklisted IP addresses, malformed messages, or policy violations detected during the DATA phase.
如何修复
Check your IP against DNS blacklists (DNSBL) and verify your SPF, DKIM, and DMARC records. Review the full error message for specific rejection reasons. If blacklisted, request delisting from the relevant blocklist.
主要区别
221 is a 2xx Positive Completion response, while 554 is a 5xx Permanent Negative response.
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.
SMTP 554: The mail transaction has failed. This is a catch-all permanent error that can occur at any point during the SMTP session, including as a rejection greeting when the server refuses all connections from
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.
You encounter 554 when when the entire mail transaction is rejected — often due to spam filtering, blacklisted IP addresses, malformed messages, or policy violations detected during the DATA phase.
何时使用哪个
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 554 (Transaction Failed): Check your IP against DNS blacklists (DNSBL) and verify your SPF, DKIM, and DMARC records. Review the full error message for specific rejection reasons. If blacklisted, request delisting from the relevant blocklist.