Exchange 2010 Mail Contacts get assigned internal SMTP addresses by the recipient policy

emailemail-bouncesexchangeexchange-2010

This environment has been upgraded from Exchange 2007 to a new Exchange 2010 server.
There are several thousand email contacts that reside under the Federation_Contacts OU. Under the Email Addresses tab for each Mail Contact, their correct SMTP address (john@othercompany.com for example) is assigned as Primary. But somehow each one got assigned internal email addresses at our company also (john@ourcompany.com and john@ourcompany.local)

Now the problem is emails to these contacts bounce back with #550 5.1.1 RESOLVER.ADR.ExRecipNotFound; not found

We have to go and delete the internal SMTP addresses that got erroneously created and uncheck the automatically update addresses based on recipient policy setting.

My question is:
1-How do we mass delete those internal email addresses for these mail contacts, taking care not to affect our internal users?

2-How do we stop Exchange (more precisely i guess, the recipient policy) from creating those internal addresses for new mail contacts?

Best Answer

I used Powershell to disable updating email address from recipient policy:

Get-MailContact -OrganizationalUnit "domain.local/OU" | set-mailcontact -emailaddresspolicyenabled $false

Then i used ADModify.net to strip off the secondary SMTP addresses assigned to contacts. It worked like a charm.