Key takeaways
- Check which host your sending tool connects to.
- It should be your provider's authenticated submission server, not the recipient's mail server.
- Confirm the username and password are accepted there.
"Relay access denied" means a server refused to accept your message for delivery because your connection was not authorised to use it as a relay. The enhanced code 5.7.1 comes from RFC 3463, which defines it as "Delivery not authorized, message refused." The fix is almost always in your sending setup: connect to the right submission server, authenticate, and stop sending through a recipient's mail server.
Research checked: 12 November 2026
The short answer
Check which host your sending tool connects to. It should be your provider's authenticated submission server, not the recipient's mail server. Confirm the username and password are accepted there. Then send one test message to a control address you own at a different provider. If the test fails with the same text, the problem is in the connection settings, not in the list.
What the error text tells you
Read the full text, not only the code. Google's SMTP error reference gives two `550-5.7.1` texts that match relay problems:
- "Invalid credentials for relay _ip-address_. The IP address you've registered in your Workspace SMTP Relay service." Use SMTP AUTH to identify the sending domain, or present a registered domain name in HELO/EHLO.
- "The IP you're using to send email is not authorized to send email directly to our servers." Send through your service provider's SMTP relay.
Microsoft's NDR reference lists two 5.7.1 relay cases. "Unable to relay" means the sending system tried to send anonymously to a server that does not accept mail for the recipient's domain. "Client was not authenticated" means the receiving server requires authentication before it accepts submission.
Fix the host, the account and the From domain
1. Identify the host. Find the SMTP host in your sending tool or application settings. It should be your provider's submission host, as documented by that provider. Do not use the recipient's MX record as your sending host. `dig +short MX recipient-example.com` shows where a recipient receives mail, which is useful for diagnosis, but it is not a server you are allowed to send through.
2. Confirm authentication. Check that the username and password belong to an account allowed to send from the From domain, and that the connection uses TLS and authentication. A correct host with the wrong account still returns a 5.7.1.
3. Check the From domain against the server. A relay refusal can also appear when the From domain is not one the authenticated account may send for. Make sure the From address uses a domain that account is authorised to use, and that the domain's SPF record includes the sending server's range. Check it with:
```text dig +short TXT example.com ```
4. Test one message. Send one plain message from your application to a control address you own at a different provider. If it succeeds, the path works and the earlier failure was configuration. If it fails, repeat steps 1 to 3.
Why a relay fault is not a list problem
A relay refusal happens before the recipient is evaluated. The server never accepted the message for delivery, so no recipient decision was made. That is why it should not appear in your bounce data, and why changing the list does nothing. Changing the From address also rarely helps, because the connection and the account must match an account that is allowed to send.
Worked example
This is a hypothetical scenario. A small team's cold-outreach tool sends through an address it was given at setup, which is a recipient provider's inbound server. Every message returns `550 5.7.1` with "Unable to relay". The fix is to change the tool's SMTP host to the team's authenticated sending server and enter its credentials. The control test then succeeds. The team had not changed any DNS records, so the fault was configuration only.