SMTP

SMTP 221 Closing Connection vs 504 Parameter Not Implemented

SMTP 221 (Closing Connection) is a 2xx Positive Completion response, while 504 (Parameter Not Implemented) 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, 504 means that a command parameter is not implemented on this server. The command itself is valid but the specific parameter or extension you used is not supported.

Описание

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.

Описание

A command parameter is not implemented on this server. The command itself is valid but the specific parameter or extension you used is not supported.

Когда вы это видите

When using SMTP extensions or parameters that the server does not support, such as an unsupported AUTH mechanism or an unrecognized MAIL FROM parameter.

Как исправить

Check the server's EHLO response for supported extensions and parameters. Use only the mechanisms and parameters listed in the server's capability advertisement.

Ключевые различия

1.

221 is a 2xx Positive Completion response, while 504 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 504: A command parameter is not implemented on this server. The command itself is valid but the specific parameter or extension you used is not supported.

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 504 when when using SMTP extensions or parameters that the server does not support, such as an unsupported AUTH mechanism or an unrecognized MAIL FROM parameter.

Когда что использовать

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 504 (Parameter Not Implemented): Check the server's EHLO response for supported extensions and parameters. Use only the mechanisms and parameters listed in the server's capability advertisement.

Узнать больше