When you would like to use other addresses internal then external you may want to use the New-AddressRewriteEntry Powershell command to let Exchange do this for you.
New-AddressRewriteEntry -Name 'Address rewrite for test.local' -InternalAddress test.local -ExternalAddress corporate.com
To see all the entries you create execute the following Powershell command get-AddressRewriteEntry
If you don’t want to use the rule anymore you can simply delete the entry by executing the remove-AddressRewriteEntry. If you want to remove the entry that we just created execute the following code:
Remove-AddressRewriteEntry 'Address rewrite for test.local'