The current company im working for is a large (for Aus) media company and as such, because basically everyone that works here is into marketing and sales, we just have a ridiculous number of domains.
As part of the cleanup process here – i bought up the huge number of domains we had and that maybe some of them weren’t current – and got back confirmation that many weren’t (approx 120)
The first job was removing them from exchange accepted domains, but i kept getting an error
Can’t remove the domain ‘xy.com’ because it’s referenced in an email address policy by the proxy address template ‘smtp:@xy.com’.
Even though the domains were not anywhere in the existing email address policies.
As usual, ADSIEdit to the rescue
navigate to
CN=Recipient Policies,CN=<Your Org Name>,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=xy,DC=com
Find the recipient policy which contains an attribute called “disabledGatewayProxy”
Remove each of the domain values from that attribute
Wait a few minutes for replication
then go back to exchange and remove the accepted domain.