SMTP

SMTP 220 Service Ready vs 251 User Not Local

Both SMTP 220 (Service Ready) and 251 (User Not Local) belong to the 2xx Positive Completion category. 220 indicates that the SMTP server is ready to begin the mail transaction. This greeting is the first response a client receives upon connecting, and it typically includes the server's hostname and software identificati 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 SMTP server is ready to begin the mail transaction. This greeting is the first response a client receives upon connecting, and it typically includes the server's hostname and software identification.

何时出现

Immediately after establishing a TCP connection to the mail server on port 25, 465, or 587. This is the server's welcome banner confirming it is ready to accept commands.

如何修复

No fix needed — this confirms a successful connection. If you do not receive this greeting, check that the server is running, the port is correct, and no firewall is blocking the connection.

描述

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.

主要区别

1.

SMTP 220: The SMTP server is ready to begin the mail transaction. This greeting is the first response a client receives upon connecting, and it typically includes the server's hostname and software identificati

2.

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.

3.

You encounter 220 when immediately after establishing a TCP connection to the mail server on port 25, 465, or 587. This is the server's welcome banner confirming it is ready to accept commands.

4.

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 220 (Service Ready): No fix needed — this confirms a successful connection. If you do not receive this greeting, check that the server is running, the port is correct, and no firewall is blocking the connection. 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.

了解更多