521: host does not accept mail
The server answered the connection only to say that it never accepts mail, so delivery to this host cannot work.
- Standard
- Provider
- Permanent (5xx)
- Class
- Sources checked
- Author
At a glance
- Code
- 521
- Provider
- Standard SMTP codes
- Temporary or permanent
- PermanentRefused for good: the message comes back to the sender, and resending it gets the same answer.
- Who has to act
- Either side, depending on the cause. Start with the checks below that are yours.
- What the server says
521 Host does not accept mail
What it means
RFC 7504 added 521 for use at connection time by hosts that do not accept mail under any circumstances, such as small placeholder servers whose only job is to say so instead of letting connections time out. RFC 7504 says it should not be used to refuse particular senders or addresses; 554 covers those. A 521 usually points to DNS: the recipient domain's MX record, or its address record when there is no MX, leads to a machine that does not handle mail. The registry associates 521 with enhanced code X.3.2. It is permanent and the message is returned.
Common causes
- The recipient domain has no MX record, so mail goes to the host in its address record, which runs a placeholder server that answers 521.
- An MX record that points to the wrong host.
- A domain that deliberately does not receive mail.
How to fix it
- 01Run an MX lookup on the recipient domain.
- 02Check the address for a wrong or misspelled domain.
- 03If the domain is yours, publish MX records that point to your real mail server.
Sources
What this page rests on, checked on 20 Oct 2026. The explanation is ours; the reply text is the server's.
- RFC 7504, section 3: The 521 Reply Coderfc-editor.org
- RFC 7504, section 5.1: Specific Changes to RFC 5321rfc-editor.org
- RFC 7504, section 6: IANA Considerations (SMTP 521 and 556)rfc-editor.org
Related codes
- 5.3.2Server not accepting mail.The server holding the mailbox is not accepting messages at all, because it is shutting down, overloaded, in maintenance, or set never to receive mail.
- 556Domain does not accept mail.A relay or sending server knows the recipient's domain does not accept mail, usually from its null MX record, and refused the address without trying to deliver.
- 554Transaction failed.The server permanently refused the transaction, often after receiving the message data or straight away when the connection opened.
- 556 5.1.10Recipient domain has a null MX.The recipient's domain publishes a null MX record, its formal statement that it never receives email, so the message was refused at once without any delivery attempt.
Further reading
All 105 standard codesEvery code in the wikiPaste your own bounce