You want to allow relaying on a Exchange receive connector. Use the following command to allow relaying:
Get-ReceiveConnector "Anonymous Relay" | Add-ADPermission -User "NT AUTHORITY\ANONYMOUS LOGON" -ExtendedRights "Ms-Exch-SMTP-Accept-Any-Recipient"
This command might not work an a german Installation of Microsoft Exchange Server. The user anonymous logon has another spelling in german. Therefore use the following command:
Get-ReceiveConnector "Anonymous Relay" | Add-ADPermission -User "NT-AUTORITÄT\ANONYMOUS-ANMELDUNG" -ExtendedRights "Ms-Exch-SMTP-Accept-Any-Recipient"
If you are allowing the relay permission on a receive connector, this may create an open relay. Therefore it is very important to limit the connector to only well known IP addresses.