SMTP error 521
Host does not accept mail.
Updated Jul 1, 2026
SMTP 521 means "host does not accept mail". Standardized in RFC 7504, a server returns 521 at connection-opening time instead of a 220 greeting to signal it never accepts inbound mail. The related code 556 ("domain does not accept mail") is returned by a relay when DNS shows a null MX. Fix 521 by sending to a domain with valid MX records and a listening SMTP server. It reflects the recipient configuration, not your sender authentication.
Send only to a domain with valid MX records and a listening SMTP server.
What it means
521 is a permanent 5xx code that means "host does not accept mail". It is real and standardized: it was first described in the experimental RFC 1846 in 1995 and formally incorporated into SMTP by RFC 7504 in June 2015, which ended the RFC 1846 experiment. Per RFC 7504, 521 is reserved for use at connection-opening time to signal that the host does not accept mail under any circumstances, so the moment your client opens the TCP connection the server answers 521 instead of the usual 220 greeting. The RFC 7504 IANA update assigns 521 to enhanced status X.3.2 ("host on which the mailbox is resident is not accepting messages"), so a compliant 521 should read 521 5.3.2 (or 4.3.2 or 2.3.2 per severity), not bare.
Common causes
RFC 7504 says 521 should be used for dummy SMTP servers whose only job is to tell connecting clients the host never accepts mail.
For example a web server, an A record with no matching mail service, or a host that has decommissioned its mail role.
For instance via the DNS null MX convention (RFC 7505). In the relay-during-dialog case this is signaled with 556 rather than 521.
How to fix it
- Confirm the recipient domain accepts mail
Look up its MX records with "dig MX recipient-domain.com". A single MX of "." is a null MX per RFC 7505, meaning the domain accepts no mail by design and there is nothing to fix on your side.
- Verify you are connecting to a real mail server
If you hardcoded a hostname or IP, re-resolve it via MX rather than A records, and confirm an SMTP service is listening on port 25 for server-to-server, or 587 or 465 for authenticated submission (RFC 8314).
- Check whether a relay is reporting the destination accepts no mail
Read the NDR for the reporting MTA. A relay signaling this mid-dialog should use 556, while a literal 521 should come from the destination host itself at connection time.
- Contact the recipient mail administrator if the domain should accept mail
Because 521 is a recipient-side configuration statement, only they can change it. Resending or reworking your authentication will not help.
- If your own server emits 521 unexpectedly, audit your MX and SMTP config
A misconfigured null MX, a firewall returning a banner, or a decommissioned mail role can cause your host to send 521.
Paired code
A real bounce often shows both a 3-digit code and an enhanced code together. This one commonly pairs with:
Common questions
Is SMTP 521 a real SMTP error code?
Yes. It is a standardized reply code meaning "host does not accept mail", first described in the experimental RFC 1846 in 1995 and formally added to SMTP by RFC 7504 in June 2015. Its recommended enhanced status is X.3.2.
What is the difference between SMTP 521 and 556?
521 is sent by a host itself at connection time to say it never accepts mail, replacing the 220 greeting. 556 is sent by a relay during the dialog when it can tell from DNS, such as a null MX, that the destination domain accepts no mail.
Does SMTP 521 mean my SPF, DKIM, or DMARC failed?
No. RFC 7504 says 521 should not be used for per-host or per-sender rejections. An SPF failure is 550 5.7.1 per RFC 7208, and blocklist or policy blocks use 554 or 550 5.7.1. If a bounce says 521 but mentions a blocked sender or authentication, the platform is likely mislabeling a 550 or 554.