RSS

迁移到exchange server 2007需要注意LegacyExchangeDN

15 Apr

在迁移的case中,最需要注意2点

1、outlook的自动完成。

迁移完成后,用户使用outlook的N2K缓存发信时,可能会收到NDR

2、outlook能正确的回信。

迁移过程中,迁移成功的用户收到同一组织内的未迁移用户邮件,回信时可能受到NDR

 

为什么呢?因为LegacyExchangeDN属性。

outlook自动缓存已发送邮件账户的地址。而迁移过程中,实际上仅迁移了用户的smtp地址以及邮件内容,LegacyExchangeDN是不会被迁移的!

 

为了解决这个问题,需要请出X500地址来解决问题。

X500地址可以作为一个兼容地址使得混合模式下的exchange2007-exchange早期版本,或者其他ad集成邮件方案正确收信发信。

1、在两个组织间使用Miis或者ILM(2.0马上就发布了)进行GAL同步,这样迁移到的邮箱上的LegacyExchangeDN值将被添加一个X500地址,上面记录了被迁移邮箱的旧LegacyExchangeDN值。

2、如果是在同一个exchange 2007组织内迁移账户,使用迁移向导或者move-mailbox命令会自动添加一个x500地址。

3、如果两个组织无法连接,怎么办?在被迁移组织中导出一份LegacyExchangeDN列表为csv文件,然后在exchange 2007服务器这边添加X500地址

csv格式为2行,一行为用户alias,一行为LegacyExchangeDN

Import-CSV file.csv | foreach {
$temp = Get-Mailbox -identity $_.alias
$temp.EmailAddresses += “X500” + $_.legacyexchangedn
set-mailbox -instance $temp}
 

或者土一点,写个自己的迁移程序

$SourceRecipient = Get-Recipient $emailaddress
If ($SourceRecipient.RecipientType -eq "MailUser") {
$OldLegacyExchangeDN = [string]$SourceRecipient.LegacyExchangeDN
$DistinguishedName = [string]$SourceRecipient.Identity.ToCanonicalName()
$EmailAddresses = $SourceRecipient.EmailAddresses
Disable-MailUser $DistinguishedName -confirm:$false 
 
$TargetRecipient = Enable-Mailbox -identity $DistinguishedName -database 'Server01/SG01/DB01'
Set-Mailbox $TargetRecipient -EmailAddresses $EmailAddresses
 
If ([string]$TargetRecipient.LegacyExchangeDN -ne $OldLegacyExchangeDN) {
$EmailAddresses += [Microsoft.Exchange.Data.CustomProxyAddress]("X500:" + $OldLegacyExchangeDN)
Set-Mailbox $TargetRecipient -EmailAddresses $EmailAddresses
}
 
"Conversion of user from MailUser to Mailbox complete."
} 
 
Else { throw "This script only converts MailUser objects to Mailbox objects" }
Advertisements
 
 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: