I want to configure a receive connector on Exchange 2013 to be used for sending e-mail using SMTP with authentication, but I don't want the connector to be used to send e-mail to external recipients (only to domain users addresses). How can I do this?
The reason i want to do this is to have a receive connector that allows external relay and one receive connector that doesn't allow external relay. This way, I can configure who can send e-mail to external recipients, based on the IP address of the client. But I want to use basic authentication for both connectors.
I used the below shell command to remove the "accept any recipient" permission for all Authenticated Users:
Get-ReceiveConnector "Receive_Connector_Name" | Remove-ADPermission -user "NT AUTHORITY\Authenticated users" -ExtendedRights "ms-Exch-SMTP-Accept-Any-Recipient"
However, I noticed that as soon as I execute the above command, the permission group "Exchange Users" is automatically removed from the connector and therefore authentication cannot be used anymore.
How can I configure this?