Migrate LegacyExchangeDN

Preserve reply functionality by migrating legacyExchangeDN to X500 addresses.

Last updated: 2025-01-15 How To

LegacyExchangeDN Migration Flow

📧
Source
legacyExchangeDN
🔄
Transfer X500
Cloudiway Task
Target
proxyAddresses

Overview

Why LegacyExchangeDN Matters

When users reply to older emails after migration, Outlook uses the original legacyExchangeDN stored in cached recipient addresses. Without migrating this value to the target system, replies will bounce with "recipient not found" errors.

The Problem

Old emails contain the source system's legacyExchangeDN. The target system doesn't recognize these addresses by default, causing delivery failures when users reply to pre-migration messages.

Primary Method: Transfer X500 Task

Using Cloudiway's Built-in Feature

Cloudiway offers a global task that automatically migrates legacyExchangeDN values to X500 proxy addresses in Office 365.

1

Navigate to Mail Migration in your project

2

Ensure the mapping table is properly populated

3

Select Transfer X500 from the global tasks menu

4

The task reads source legacyExchangeDN and adds it to target proxyAddresses

Requirement

The mapping table must be populated with source and target user mappings before running the Transfer X500 task. The task uses this mapping to identify which target users should receive each legacyExchangeDN value.

Azure AD Connect Environments

Critical Limitation

When your on-premises Active Directory synchronizes with Office 365 through Azure AD Connect, the Office 365 tenant becomes read-only for synchronized attributes. Cloudiway cannot directly modify user proxy addresses in this scenario.

Why This Happens

Azure AD Connect establishes the on-premises Active Directory as the authoritative source. Any changes to synced attributes must be made in on-premises AD, then replicated to Office 365.

Manual Migration Steps

For Azure AD Connect environments, follow this manual process to migrate legacyExchangeDN values:

1

Export LegacyExchangeDN

Export the legacyExchangeDN values from your source system.

# On-premises using CSVDE:

csvde -f export.csv -r "(objectClass=user)" -l "mail,legacyExchangeDN"

# Office 365 using PowerShell:

Get-Mailbox | Select PrimarySmtpAddress,LegacyExchangeDN | Export-Csv export.csv
2

Import to Active Directory

Use PowerShell to add X500 addresses to the proxyAddresses attribute in your on-premises Active Directory.

# PowerShell script to add X500:

Import-Csv export.csv | ForEach-Object {
  $user = Get-ADUser -Filter "mail -eq '$($_.mail)'"
  $x500 = "X500:" + $_.legacyExchangeDN
  Set-ADUser $user -Add @{proxyAddresses=$x500}
}
3

Wait for Azure AD Connect Sync

Allow Azure AD Connect to replicate the changes to Office 365. This typically occurs within 30 minutes but may vary based on your sync schedule.

Tip: Force a sync with Start-ADSyncSyncCycle -PolicyType Delta

Important Disclaimer

Cloudiway does not provide support for Active Directory or Azure AD Connect configurations. The steps above are provided as general guidance only. Consult your IT team or Microsoft documentation for specific implementation details.

Was this article helpful?

We value your feedback

Help us improve your experience

What would you like to share with us?

Need direct support? Open a ticket