How to Edit and Add a Legacy X500 Address Into The New Mailbox

Riaz Alexander AnsaryEnterprise Infrastructure Systems Engineer
Edited by: Andrew Leniart
There might be times that you will need to associate an SMTP address from one mailbox to another within your exchange organization. You then notice that your help desk start to receive complains that messages sent to that mailbox by some people bounce back. Let's talk about the issue.

If for any reason if you move an SMTP address from one mailbox to another, your  help desk start to receive complains that certain users (Not All) receive the following bounce backs when sending messages to that mailbox:

Here is the reason for this bounce back:

Internal exchange messages inside the organization normally have the recipient’s information resolved to LegacyExchangeDN attribute (Underlined in Red). 

In this case since this address was assigned to a different mailbox the old LegacyExchangeDN value is changed; so, if a user who has sent an email to that address that was associated with the old mailbox sends an email after the change, they will get this bounce back because the LegacyExchangeDN value is cached on their outlook. There is no problem for people who never sent to that address before.

Now if you see the bounce back Diagnostic Information message above you see that it provides you with the Legacy Exchange DN (Boxed in Red), Or you can access that by clicking on the name in the body of bounce back message:

We need to add the above X500 to the new mailbox, the tricky part is that the above x500 is in an encoded (Messed Up) format and we need to clean up to bring it to the right format. here is how it's done

Step-by-step guide

  1. Get rid of the _ and replace it with


    2. As you can see you will notice some numbers like +20,+28,+29

        Convert +20 with a Space

        Convert +28 with a (

        Convert +29 with a )

        Convert +2E with a .

So now, replace the values as described and you should get the following:

/o=COSTARGROUP/ou=Exchange Administrative Group (FYDIBOHF23SPDLT)/cn=Recipients/

    3. Remove the and just keep the username

/o=COSTARGROUP/ou=Exchange Administrative Group (FYDIBOHF23SPDLT)/cn=Recipients/cn=8da2b5094c364af7bb8861ce9064020a-ransary

Now simply add the final cleaned up proper x500 address to the mailbox via exchange management shell:

Set-Mailbox -Identity ransary -EmailAddresses @{Add = 'X500:/o=COSTARGROUP/ou=Exchange Administrative Group (FYDIBOHF23SPDLT)/cn=Recipients/cn=8da2b5094c364af7bb8861ce9064020a-ransary'}

Sometimes you may need to update the legacyexchagedn attribute itself as well. unlikely but I have run into that situation as well. 

Riaz Alexander AnsaryEnterprise Infrastructure Systems Engineer

Comments (1)

WORKS2011Managed IT Services, Cyber Security, Backup

Do I clean up the email address just prior to the @.

In the example below there's a 268 after the users email address. The actual email address is  not

John Doe

Have a question about something in this article? You can receive help directly from the article author. Sign up for a free trial to get started.