How to resolve the error ‘550 5.7.1 Unable to Relay’?

How to resolve the error ‘550 5.7.1 Unable to Relay’?

I recently came across an issue at work where one of our servers wasn’t able to send any email alerts out. On troubleshooting the issue we were receiving a ‘550 5.7.1 Unable to relay’ error message.

Duly checked the receive connectors within the Exchange Management GUI and everything looked okay but still the server wasn’t able to relay. On launching the Exchange Management Powershell console we ran the command:

Get-ReceiveConnector “Receive Connector” | Get-ADPermission -User “NT AUTHORITYANONYMOUS LOGON”

And noticed that instead of there being rights for “ms-Exch-SMTP-Accept-Any-Recipient”, there were rights for “ms-Exch-SMTP-Accept-Any-Sender”

We issued the command:

Get-ReceiveConnector “Receive Connector” | Add-ADPermission -User “NT AUTHORITYANONYMOUS LOGON” -ExtendedRights “ms-Exch-SMTP-Accept-Any-Recipient”

And the server was able to relay messages once again. We haven’t been able to determine, who or what changed the permissions on the connector but they’d been modified and the above command resolved our issue.

If you are trying to send notifications via your Exchange with an Anonymous connector ensure the following has extended rights:

NT AUTHORITYAnonymous Logon {ms-Exch-SMTP-Submit}
NT AUTHORITYAnonymous Logon {ms-Exch-Accept-Headers-Routing}
NT AUTHORITYAnonymous Logon {ms-Exch-Bypass-Anti-Spam}
NT AUTHORITYAnonymous Logon {ms-Exch-SMTP-Accept-Any-Recipient}