Skip to content
DMARC Pulse

Email errors

550 5.7.1 relaying denied: what it means and how to fix it

550 5.7.1 relaying denied means a mail server refused to forward your message. Find out if the cause is sign-in, an MX record or a relay allowlist.

What this means

A 550 5.7.1 relaying denied bounce means the mail server refused to forward your message to its next destination. Relaying is when a server accepts mail for a domain it does not host and passes it on.

The wording depends on the server:

  • Sendmail: 550 5.7.1 <rcpt@example.com>... Relaying denied
  • Postfix: Relay access denied
  • Exim: relay not permitted in the default configuration
  • Exchange Online: Unable to relay under 5.7.1, or 550 5.7.64 TenantAttribution; Relay Access Denied
  • Google Workspace: Invalid credentials for relay under 550 5.7.1

When 550 5.7.1 means something else

RFC 3463 defines 5.7.1 as Delivery not authorized, message refused, so servers use it for many policy refusals. Other refusals need different fixes, so read the text after the code.

Why it happens

A server relays only for clients it trusts, or for domains it is set up to handle. The usual causes are:

  • The sender did not sign in. An app, printer or mail client connected without authentication, or from an IP address the server does not trust.
  • The MX record points to the wrong server. An MX record names the server that receives mail for a domain. A stale record can send mail to a server that does not accept the domain.
  • A relay rule no longer matches. A certificate or sending IP changed and no longer matches the connector or IP list (Microsoft 365: TenantAttribution).

How to fix it

  1. Find the server that refused. Read the bounce's diagnostic section, because the server that wrote the bounce can differ from the one that refused.
  2. If an app, device or mail client sends through that server, even your provider's, set it to sign in (SMTP authentication) over TLS on port 587. In Microsoft 365, use smtp.office365.com with OAuth. In Google Workspace, configure SMTP relay under Apps > Google Workspace > Gmail > Routing and point the device to smtp-relay.gmail.com.
  3. If the device cannot sign in, authorize only its IP address: mynetworks in Postfix, relay_from_hosts in Exim (keep localhost in both), the access map in Sendmail, an inbound connector with a static IP or certificate in Microsoft 365 (then point the device to your domain's MX endpoint on port 25 and add the sending IP to your existing SPF record; never publish a second SPF record), or the IP list in Google's SMTP relay setting. If an authorized certificate or IP changed, update the connector or IP list. Caution: keep the range small. A server that relays for strangers can be used for spam.
  4. If the recipient or a third party runs that server, forward the full bounce to its administrator.
  5. If mail sent to your domain bounced, run an MX lookup on the domain and compare the result with the server that refused. If the record names an old host, correct it. Caution: an MX change reroutes all inbound mail for the domain, so confirm first that the new server accepts the domain.
  6. If mail sent to your domain bounced and the MX record correctly names the server that refused, add the domain on that server. If this server stores the mailboxes, use mydestination (system accounts) or virtual_mailbox_domains (virtual mailboxes) in Postfix, local_domains in Exim or class w in Sendmail. If it forwards to another server, use relay_domains in Postfix, relay_to_domains in Exim, or class R or the access map with RELAY in Sendmail, and set the domain's next hop (in Postfix, a transport_maps entry with the host in brackets). Without one, a primary MX routes the mail back to itself. In Microsoft 365, confirm the domain shows as Healthy under Settings > Domains.

Confirm the fix

  1. If you changed an MX record, wait for the old TTL (how long resolvers may cache the answer), then repeat the lookup.
  2. Reload the server if you edited its configuration (Postfix: postmap for map files, then postfix reload). Send a new message along the path that failed.
  3. In Microsoft 365, run the Inbound SMTP Email and Outbound SMTP Email tests in the Microsoft Remote Connectivity Analyzer.
  4. If you widened the relay rules, test from outside your network without signing in. Send to a domain the server does not host. It must still refuse.

Check it now

See where a domain receives email

Frequently asked questions

Does 550 5.7.1 always mean a relaying problem?
No. RFC 3463 defines 5.7.1 as delivery not authorized, so servers use it for many refusals. Gmail uses it when an IP address is not authorized to send directly to its servers, and Exchange Online uses it for restricted groups and blocklisted IP addresses. Read the text after the code. If it does not mention relaying, these steps probably do not apply.
Why does my server say 554 Relay access denied instead of 550?
The meaning is the same: the server refused to relay. Postfix uses the text Relay access denied, and its reject_unauth_destination rule replies with 554 by default. Each server software chooses the code and text of its own refusal.
Can SPF, DKIM or DMARC cause a relaying denied error?
Usually they do not. Relay checks look at who connected and which domain the message is for. Microsoft documents one exception: code 5.7.367, with the text Remote server returned not permitted to relay, comes from SPF or DKIM failures in forwarded or relayed mail. See the 5.7.367 error.
Should I let my server relay for any sender?
No. A server that relays for strangers can be used to send spam, and that puts its reputation at risk. Use authentication or authorize one specific IP address instead.
I got this bounce for a message I never sent. What happened?
Someone may have forged your address while trying to use that server to send spam. Microsoft lists this among the most common causes and says it is difficult to avoid. The server refused the message, so that server did not deliver it.
Will the bounced message arrive on its own after the fix?
No. After a 5xx reply the message stays undelivered. If your app or mail client sent it, send it again once it can sign in or is authorized. If it was addressed to your domain, the original sender has to send it again, because you never received a copy.

Sources consulted

RFC 6409 §3.1 (port 587)
checked 2026-11-08
RFC 1035 §3.2.1 (TTL)
checked 2026-11-08

Related pages

Keep it healthy

Know the moment something breaks

Point your DMARC reports to DMARC Pulse and see who sends email as your domain, what fails and why — with a calm alert when anything changes.

Free plan: 1 domain, no credit card.