SMTP 521: this host does not accept mail
The server you connected to does not accept mail under any circumstances. Your message reached a host that is not a mail server for that domain.
What 521 means
RFC 7504 added the 521 reply code. A server sends it when the connection opens, instead of the usual 220 greeting, to say the host does not accept mail under any circumstances. It is meant for dummy SMTP servers whose only job is to tell connecting systems that the host never takes mail.
RFC 7504 is specific about what 521 is not for: it should not be used to reject mail from particular hosts or addresses. For those cases 554 is more appropriate. So a 521 is about the destination, not about you.
If you get a 521 when sending to a domain, the domain's mail routing is the problem. Either its MX records point at a host that doesn't take mail, or the domain has no MX records and your server fell back to the domain's own address (its A record), which belongs to a web server. Run an MX lookup on the recipient's domain and let the recipient know what you found.
Likely causes
- The domain has no MX record, so senders fall back to its website's IP address.
- An MX record points to a host that doesn't run a mail service.
- The domain intentionally doesn't receive email.
How to fix it
If you sent the message
- Check the recipient's domain with an MX lookup and confirm the address is spelled correctly.
- Tell the recipient by another channel; only they can fix their mail routing.
If you're the recipient or their admin
- Publish correct MX records for your domain that point to your mail provider or filtering service.
- If the domain should not receive mail at all, publish a null MX record (RFC 7505) so senders fail fast with a clear reason.
Frequently asked questions
Is a 521 error a block against my server?
No. RFC 7504 says 521 should not be used to reject mail from particular hosts or addresses. It means the host you reached never accepts mail, so the recipient's mail routing needs checking.
How do I stop senders getting 521 for my domain?
Publish MX records that point to the servers that should receive your mail. If the domain doesn't use email, publish a null MX record instead so senders know right away.
Sources
- RFC 7504: SMTP 521 and 556 Reply Codes
- RFC 7505: A "Null MX" No Service Resource Record for Domains That Accept No Mail
Provider messages are quoted as the provider publishes them. Servers can change their wording, so the bounce you received may differ slightly.
Related codes
Related guides
What is an MX record?
What an MX record is, how priority values pick the server that gets your mail, why backup MX can bypass a spam filter, and how to check your own records.
8 min read Switching & migrationHow to change MX records without losing email
A cutover checklist for MX changes: lower TTL, stage the new destination, keep the old server accepting mail, verify with headers and roll back cleanly.
11 min read SPF, DKIM & DMARCHow to protect parked and non-sending domains from spoofing
Lock down domains that never send email: Null MX, SPF -all, DMARC p=reject, the optional empty DKIM key, and subdomain wildcards, with a copy-paste checklist.
8 min read