20. January 2016
If you have ever moved a mailbox to another user, you will have no doubt found that when people send email to that mailbox after you have moved the mailbox they get an NDR.
This happens because Microsoft Outlook caches the address and it's linked to the origional user account the mailbox was attached to.
Example ErrorDiagnostic information for administrators:
Generating server: ALPHA.Contoso.local
#550 5.1.1 RESOLVER.ADR.ExRecipNotFound; not found ##
Depending on the scenario there are a few ways to fix this, but the goal is the same which is to get the X500 address of the original user account that the mailbox was atached to.
If the account still exists, this is easily queried with the following PowerShell command.
Get-ADUser -SearchBase “OU=users,DC=domain,DC=local” -Filter *
-Properties SamAccountName,legacyExchangeDN | Select-Object
SamAccountName,legacyExchangeDN | Export-CSV C:\UserExport.csv
If the account has been deleted (which is commonly why you would want to do this if the user account had to be re-created instead of restored) then you will need to get the X500 address from anyone who has sent an email to that account before it was deleted. To do this, NirSoft have a program called N2KEdit. Run this EXE and find the X500 for the account.
Once you have the X500, the rest is easy.
Go to the Exchange mailbox properties > Email Addresses tab > Add (custom) >
Enter the X500 address in the email address field
Enter "X500" in the Email type field.
Click OK > Apply.