SMTP

SMTP 221 Closing Connection vs 451 Local Error

SMTP 221 (Closing Connection) is a 2xx Positive Completion response, while 451 (Local Error) is a 4xx Transient 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, 451 means that the requested action was aborted due to a local error in processing. The server encountered an internal issue that prevented it from completing the command.

説明

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 requested action was aborted due to a local error in processing. The server encountered an internal issue that prevented it from completing the command.

このコードが表示される場合

When the receiving server hits an internal error such as a database failure, DNS lookup timeout, or anti-spam filter processing error.

解決方法

Retry the message later. If you control the server, check its logs for the specific error — common causes include DNS resolution failures, disk I/O errors, or database connectivity issues.

主な違い

1.

221 is a 2xx Positive Completion response, while 451 is a 4xx Transient 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 451: The requested action was aborted due to a local error in processing. The server encountered an internal issue that prevented it from completing the command.

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 451 when when the receiving server hits an internal error such as a database failure, DNS lookup timeout, or anti-spam filter processing error.

どちらをいつ使うか

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 451 (Local Error): Retry the message later. If you control the server, check its logs for the specific error — common causes include DNS resolution failures, disk I/O errors, or database connectivity issues.

詳しく見る