IMCEAEX NDRs and how to fix them…

If you’ve ever migrated email, restored email or aimlessly messed around with mailboxes and email address attributes, chances are that you’ve encountered non-delivery reports (NDR) with an IMCEAEX error similar to this:

The reason this happens is that in Exchange Server, internal emails are addressed and routed using X.500 addresses, rather than with SMTP addresses. This X.500 address is found within Active Directory as the legacyExchangeDN attribute. When that legacyExchangeDN/X.500 address can no longer be resolved to a recipient, a 5.1.1 NDR occurs.

In my experience this happens most frequently when migrating email from one Exchange org to another. Post-migration people go to reply to one of their old/migrated emails and they end up with this NDR in their mailbox.

So, how do you fix this? Well, you have one of two methods available to you:

Get the legacyExchangeDNs from the source domain

If your issue is caused by migrating email and you still have access to the source environment you can export a list of the legacyExchangeDN attributes and apply them as X.500 addresses to the destination mailboxes.

To do this you can use a command similar to the following:

Set-Mailbox -Identity "" -EmailAddresses @{add="X500:/O=ORGNAME/OU=EXCHANGE ADMINISTRATIVE GROUP (FYDIBOHF23SPDLT)/CN=RECIPIENTS/CN=fcbdf1571cd0480839997fe4f620b70"}

Use the NDR to create an X.500 address

This could be a painful exercise if you have migrated lots of mailboxes but it is possible to use the IMCEAEX message in the NDR to generate your X.500 address. To do this take the string in the NDR and perform the following (taken from here):

  • Replace any underscore character (_) with a forward slash character (/)
  • Replace “+20” with a space
  • Replace “+2E” with a full stop (period, for you yanks)
  • Replace “+28” with an opening bracket character (
  • Replace “+29” with a closing bracket character )
  • Delete the “IMCEAEX-” string from the beginning
  • Delete the “” string at the end
  • Add “X500:” to the beginning


Will become:


Now you can use the string to add your X.500 address using the following PowerShell command:

Set-Mailbox -Identity "" -EmailAddresses @{add="X500:/O=ORGNAME/OU=EXCHANGE ADMINISTRATIVE GROUP (FYDIBOHF23SPDLT)/CN=RECIPIENTS/CN=fcbdf1571cd0480839997fe4f620b70"}

Convert IMCEAEX to X.500 Script

If you want a bit of help to convert the IMCEAEX string to an X500 you can use the following script to do it for you:

You can run the script with or without the IMCEAEX string as a parameter. If you don’t supply it, you will be asked to paste it in.

ConvertIMCEAEXToX500.ps1 [-IMCEAEX]

With Parameter

Without Parameter