SMTP

SMTP 421 Service Not Available vs 521 Host Does Not Accept Mail

SMTP 421 and 521 both reject connections, but 421 is temporary and 521 is permanent. A 421 means the server is temporarily down (maintenance, overload), while a 521 means the server intentionally does not accept any inbound mail and never will.

Descrição

The SMTP service is not available and the server is closing the transmission channel. This may be sent as a greeting or during a session if the server needs to shut down.

Quando você o vê

When connecting to a mail server that is overloaded, undergoing maintenance, or shutting down. The server cannot handle your request right now.

Como corrigir

Retry the connection after a delay. If the issue persists, check server status and resources (CPU, memory, disk). Rate limiting or greylisting may also trigger this response.

Descrição

The host does not accept mail at all. This indicates the server exists but is explicitly configured to reject all incoming email messages.

Quando você o vê

When connecting to a server that has been intentionally configured to refuse all email, such as a domain that only sends but never receives mail.

Como corrigir

Verify you are connecting to the correct mail server by checking the domain's MX records. If the domain truly does not accept mail, contact the recipient through an alternative channel.

Diferenças principais

1.

421 is transient (4xx) — the server is temporarily unavailable; retry later.

2.

521 is permanent (5xx) — this host explicitly does not accept inbound email.

3.

421 may include a Retry-After suggestion; 521 should not be retried.

4.

421 is common during server maintenance, rate limiting, or connection throttling.

5.

521 is used by domains that only send mail but never receive it (notification-only services).

Quando usar qual

Return 421 when the SMTP server is temporarily unable to handle connections — during maintenance, when connection limits are reached, or when the server is shutting down gracefully. Return 521 when the host intentionally does not accept any inbound mail — for example, outbound-only notification servers or domains configured with a null MX record.

Saiba mais