Wednesday , August 12 2020

Convert IMCEAX NDR to X500 Value with Reference Table

Issue Happens after PST import or Office 365 Group renaming primary smtp address in a hybrid environment

Delivery has failed to these recipients or groups:

“Deleted User/Re created user/Click on it to get the Custom Address
The email address you entered couldn’t be found. Please check the recipient’s email address and try to resend the message. If the problem continues, please contact your helpdesk.

Diagnostic information for administrators:

Generating server: HSEXC0022.AZURE365PRO.COM



Remote Server returned ‘550 5.1.1 RESOLVER.ADR.ExRecipNotFound; not found’

Original message headers:

Received: from HSEXC0022.AZURE365PRO.COM ( by

HSEXC0022.AZURE365PRO.COM ( with Microsoft SMTP Server (TLS) id

15.0.847.32; Sun, 12 Jul 2015 10:12:19 +0400

Received: from HSEXC0012.AZURE365PRO.COM ([fe80::425:f61f:d5c9:3fb7]) by

HSEXC0012.AZURE365PRO.COM ([fe80::425:f61f:d5c9:3fb7%15]) with mapi id

15.00.0847.030; Sun, 12 Jul 2015 10:12:20 +0400

Content-Type: application/ms-tnef; name=”winmail.dat”

Content-Transfer-Encoding: binary

Reference IMCEAX to X500 –



Converted Value –

X500:/o=HOSTING/ou=Exchange Administrative Group (FYDIBOHF23SPDLT)/cn=Recipients/cn=d8d4ee95a3bc4778a40beb269c518dfb-Ramakrishna Redd

Reference X500 – VALUE
_ /
+20 Blank Space
+28 (
+29 ) To be removed
+40 @
+2E .
+2C ,
+5F _
%3d =

Here is the scenario – I had to remove 200 Mail Contacts and get them created as Mailboxes in 1000 User Environment. As soon as i delete the contacts its going to throw me an IMCEAX error, To Overcome this situation i had to export all them in advance, Had the X500 addresses ready, and Added them to the mailboxes created.

via Powershell

To Export the CSV –

 Get-MailContact -ResultSize Unlimited -OrganizationalUnit ""  | Select-Object Name,Alias,PrimarySmtpAddress,LegacyExchangeDN | Export-Csv C:\legacyDN.csv 

Format the CSV into below format using Excel-

Melissa Melora ,Melissa,,X500:/o=HOSTING/ou=Exchange Administrative Group (FYDIBOHF23SPDLT)/cn=Recipients/cn=5a186ad20a2b4aaeb44258a723a95054-Melissa Melora

Import it

Import-csv c:\Scripts\legacyDN.csv | foreach { set-mailbox -identity $_.PrimarySmtpAddress -EmailAddresses @{Add= $_.legacyexchangeDN}} 

Melissa Melora ,Melissa,,X500:/o=HOSTING/ou=Exchange Administrative Group (FYDIBOHF23SPDLT)/cn=Recipients/cn=5a186ad20a2b4aaeb44258a723a95054-Melissa Melora

To Add it via ADUC – Using Attribute Editor

Open Active Directory Users and Computers – View – Advanced Features


Add the X500 Address address which is converted.


Click Ok, Apply , OK,

Powershell Sample to Convert

$x "enter IMCEAEX full value"

$x = $x -replace "IMCEAEX-_", "X500:/" -replace "\+20", " " -replace "\+28", "(" -replace "\+29", ")" -replace "_", "/" -replace "\+2E","." -replace '@.*'



About Satheshwaran Manoharan

Satheshwaran Manoharan is an Microsoft Office Server and Services MVP , Publisher of Specialized in Office365 / Microsoft Exchange / Virtualization , Sathesh is an Messaging Expert supporting/Designing/Deploying many medium size businesses to large enterprises when it comes to Corporate messaging and Virtualization Infrastructure

Check Also

Power BI Data Gateway with Active Directory

You can create amazing reports with Active directory information with live refresh . It saves …


  1. Paste this into Powershell ISE. Manipulate for own use
    $x = Read-host -prompt ‘enter IMCEAEX full value’
    $x = $x -replace “IMCEAEX-_”, “X500:/” -replace “\+20″, ” ” -replace “\+28”, “(” -replace “\+29”, “)” -replace “_”, “/” -replace “\+2E”, “.” -replace ‘@.*’, ”;cls;Write-output $x

  2. You forgot about %3d to =

Leave a Reply

Your email address will not be published.