SMTP 221 Closing Connection vs 251 User Not Local
Both SMTP 221 (Closing Connection) and 251 (User Not Local) belong to the 2xx Positive Completion category. 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. Meanwhile, 251 means that the recipient is not local to the server, but it will forward the message to the specified forwarding address. The server acts as a relay for this recipient.
الوصف
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 recipient is not local to the server, but it will forward the message to the specified forwarding address. The server acts as a relay for this recipient.
متى تراه
When sending to a recipient whose mailbox is hosted on a different server. The current server knows the forwarding address and will relay the message on your behalf.
كيفية الإصلاح
No fix needed — the message will be forwarded automatically. To avoid relaying, send directly to the address provided in the server's 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 251: The recipient is not local to the server, but it will forward the message to the specified forwarding address. The server acts as a relay for this recipient.
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 251 when when sending to a recipient whose mailbox is hosted on a different server. The current server knows the forwarding address and will relay the message on your behalf.
متى تستخدم أيًا منهما
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 251 (User Not Local): No fix needed — the message will be forwarded automatically. To avoid relaying, send directly to the address provided in the server's response.