550 5.7.54 SMTP; Unable to relay recipient in non-accepted domain
If you need to relay to external (i.e. non-accepted domains) via Exchange, in addition to creating a custom relay connector, you also need to assign the following permissions.
Get-ReceiveConnector "X500EX01\Internal Relay" | Add-ADPermission -User "NT Authority\ANONYMOUS LOGON" -ExtendedRights "Ms-Exch-SMTP-Accept-Any-Recipient"
Replace X500EX01 with the name of the Exchange Server, and Internal Relay with the name of the Receive Connector.