5.4.1: server does not accept mail for this domain
The server that answered does not accept mail for the recipient's domain, which usually points to a wrong MX record or server setting.
- Microsoft
- Provider
- Permanent (5xx)
- Class
- Sources checked
- Author
At a glance
- Code
- 5.4.1
- Temporary or permanent
- PermanentRefused for good: the message comes back to the sender, and resending it gets the same answer.
- Who has to act
- The recipient's side. Their mail admin has to change something; you can tell them.
- What the server says
5.4.1 Relay Access Denied
What it means
Microsoft lists Relay Access Denied under 5.4.1 for a mail server that does not accept mail for the recipient's domain. A server only takes messages for the domains it is responsible for; delivering anything else would be relaying, which it refuses. Microsoft attributes the error to mail server or DNS misconfiguration: the MX record sends the mail to the wrong server, or the right server is not set up for the domain. The recipient's admin is the one who can fix it. The same words appear in 5.7.64 TenantAttribution, which has a different cause.
Common causes
- The recipient domain's MX record points to a server that does not handle that domain.
- The domain was removed from, or never added to, the accepted domains of the receiving server or tenant.
How to fix it
- 01Check the recipient domain's MX record with an MX lookup.
- 02Tell the recipient's admin which server refused the message, as named in the report.
- 03The recipient admin should point the MX record at the right server, or add the domain as accepted on the server it points to.
Sources
What this page rests on, checked on 20 Oct 2026. The explanation is ours; the reply text is the server's.
- Email nondelivery reports and SMTP errors in Exchange Onlinelearn.microsoft.com
Related codes
- 550 5.4.1Recipient rejected by Directory-Based Edge Blocking.Microsoft 365 rejected the message at its edge because the recipient address does not exist in the destination tenant.
- 550 5.7.64Relay not attributed to your tenant.Microsoft 365 could not match your on-premises server to an inbound connector, so it refused to relay its mail.
- 5.7.1Unable to relay.The receiving system refused to pass the message on because it is not the final destination for the recipient domain.
Further reading
All 111 Microsoft codesEvery code in the wikiPaste your own bounce