550 5.7.1 Relaying denied: what it means and how to fix it
Short answer: 550 5.7.1 Relaying denied (also seen as Unable to relay, Relay access denied or Relay not permitted) means a mail server was asked to pass a message on to another domain and refused, because it didn't recognise you as one of its own users and the recipient isn't one of its own domains.
Mail servers only relay for people they trust. If they relayed for anyone, spammers would use them. So this error is almost always a settings problem, not a block on you personally.
First, work out which side is wrong
Look at the bounce message. It names the server that refused (often after "Remote server returned" or "Reporting-MTA").
- Your own outgoing server refused it (your email provider, your hosting company, your office server): the problem is how you're sending. Go to Sending side.
- The recipient's server refused it: the problem is usually their MX records or their mail server's list of domains. Go to Receiving side.
- Only one recipient domain fails and everything else is fine: almost always the receiving side.
- Every message to outside addresses fails: almost always the sending side.
Sending side
1. Your email app isn't signing in to the outgoing server
The most common cause. In your email app's account settings, find the outgoing (SMTP) server and turn on "My outgoing server requires authentication" (Outlook), or make sure a username and password are set for SMTP (Apple Mail, Thunderbird, phones). Use the same details as for incoming mail unless your provider says otherwise.
2. Wrong outgoing server or port
Use the server name and port your email provider publishes, typically:
- Port 587 with STARTTLS, or port 465 with SSL/TLS, for email apps and devices.
- Port 25 is for server-to-server mail. Many home and mobile networks block it, and many providers won't accept app sign-ins on it.
If you changed email provider, check the app isn't still pointing at the old provider's server.
3. A website, printer or app sending without signing in
Contact forms, scan-to-email copiers, CRMs and booking systems often send through an SMTP server. If they send without a username and password, the server treats them as a stranger. Fixes:
- Give the device or plugin an SMTP username and password and use port 587.
- For Microsoft 365, use authenticated SMTP submission, or set up a connector that recognises the device's fixed IP address (Microsoft documents the options for printers and apps [1]).
- For Google Workspace, use the SMTP relay service and allow the sending IP address in the Admin console [2].
- On a WordPress site, use an SMTP plugin with real credentials for your mail provider instead of the server's built-in mail function.
4. Sending "from" a domain the server doesn't host
Some servers only relay mail whose From address is one of their own domains. If a form or app sends "from" the visitor's address or from another business's domain, it can be refused. Send from your own address and put the visitor's address in Reply-To.
Receiving side
5. MX records point at the wrong server
If a business has just moved email provider, its MX records may still point at the old host, or point at the new one before it's ready. The server that receives the mail doesn't think it's responsible for that domain, so it treats delivery as relaying and refuses.
Check the recipient domain's MX records with the free domain check or:
nslookup -type=mx example.co.uk
If you're the recipient and the MX records are wrong, fix them at your DNS host. See moving email to Microsoft 365 or Google.
6. The mail server doesn't list the domain as its own
On Exchange, Microsoft 365 or a hosting control panel, the domain must be added as an accepted domain (or local domain) on the server that receives its mail. A domain that's been removed, or a new alias domain that was never added, gets relaying errors.
7. Mail between two of your own systems
In hybrid setups (on-premises Exchange plus Microsoft 365, or a mail filter in front of your mailboxes), one system may refuse to accept mail from the other because the connector between them doesn't recognise it. Check the connector's allowed IPs or certificate on both sides.
What not to do
- Don't open your server up as an "open relay" to make the error go away. Spammers find open relays within hours, and your server's address will end up on blocklists.
- Don't change the From address to a free webmail address to get round it; that creates a new set of delivery problems.
Questions people ask
Is 550 5.7.1 always about relaying?
No. 5.7.1 is a general "not allowed" code. Other 5.7.1 bounces are about spam filtering or authentication, such as Outlook's "message lacks SPF/DKIM/DMARC". Read the text after the code.
It worked yesterday. What changed?
Usually a password change (the app or device is still using the old one), a provider moving to authenticated SMTP only, or a DNS change such as new MX records.
Will SPF, DKIM or DMARC fix a relaying error?
Not on their own; relaying is about who the server lets send. But once mail is flowing, they decide whether it gets delivered or junked, so check them while you're there.
Check your domain free
Run the free domain check to see your MX records, SPF, DKIM and DMARC as the rest of the internet sees them, with a plain-English verdict on each. If something needs fixing, the £24 Fix Pack gives you the exact records and steps for your DNS host.
Related guides
- Moving email to Microsoft 365 or Google: DNS records
- MX records and mail gateways explained
- Microsoft 550 5.7.23 SPF violation
- Emails going to spam
Sources
- Microsoft Learn, "How to set up a multifunction device or application to send email using Microsoft 365 or Office 365": https://learn.microsoft.com/en-us/exchange/mail-flow-best-practices/how-to-set-up-a-multifunction-device-or-application-to-send-email-using-microsoft-365-or-office-365
- Google Workspace Admin Help, "Route outgoing SMTP relay messages through Google": https://support.google.com/a/answer/2956491
- RFC 5321, Simple Mail Transfer Protocol, section 3.6 (relaying): https://www.rfc-editor.org/rfc/rfc5321