在 Exchange 中查找重复的电子邮件 (SMTP) 地址
在本文中,我们将向您展示如何在 Exchange Server 组织中查找重复的 SMTP 地址。如果您的组织具有非唯一的 SMTP 地址,则 Exchange 在向这些地址发送电子邮件时会返回错误:
Event ID: 9217
Event Source: MSExchangeTransport
More than one Active Directory object is configured with the recipient address username@a-d.site. Messages to this recipient will be deferred until the configuration is corrected in Active Directory.
该电子邮件将不会发送给收件人。
当您在 Exchange Server 中创建新邮箱并收到一条消息表明具有该 SMTP 地址的用户已存在时,您还可能会遇到以下情况:
The proxy address SMTP:user2@a-d.site is already being used by the proxy address or LegacyExchnageDN. Please choose another proxy address.
为了解决此错误,您需要查找已分配了相同 SMTP 地址(别名)的 Active Directory 对象。
您可以使用 Active Directory 用户和计算机控制台 (
aduc.msc) 搜索具有特定 SMTP 地址的 AD 对象:
运行控制台,进入查找 -> 自定义搜索 -> 高级选项卡;
输入以下 LDAP 查询:
proxyaddresses=smtp:jsmith@a-d.site(将用户名和域名替换为您自己的);
点击查找;
控制台将显示具有 proxyaddresses 属性(包含您要查找的电子邮件地址)的所有对象。在此示例中,您可以看到不同的 AD 对象(用户、联系人和 Exchange 通讯组)可以包含相同的代理地址;
使用 Active Directory 属性编辑器手动更改 proxyaddresses 属性中的值。为对象设置唯一的 SMTP 地址。
您还可以使用
Get-ADObjectActive Directory PowerShell 模块中的 cmdlet 用于搜索 AD 中的对象:
Get-ADObject -Properties mail, proxyAddresses -Filter {proxyAddresses -eq "smtp:jsmith@a-d.site"}由于 SMTP 地址不仅可以分配给用户、联系人或通讯组,还可以分配给 Exchange 公用文件夹,因此您有时需要使用 Exchange Server cmdlet 来搜索具有相同 SMTP 地址的对象:
Get-Recipient -resultsize unlimited | where {$_.EmailAddresses -like "*jsmith@a-d.site*"}或者,您可以导出 Exchange 组织中的电子邮件地址的完整列表:
Get-recipient -resultsize unlimited | select Name -expand emailaddresses > C:\PS\Results\all_smtp_adresses.txt用户电子邮件地址可以包含在以下属性中:userPrincipalName、mail、proxyAddresses、LegacyExchangeDN 或 msRTCSIP-PrimaryUserAddress。 Microsoft IdFix(目录同步错误修复工具)是搜索重复和无效电子邮件地址的工具之一。它允许您检查本地 Active Directory 是否可以与 Azure AD 同步。
您可以使用 IdFix 快速查找域内具有非唯一/重复 SMTP 地址的所有电子邮件对象。
完成后,您所需要做的就是编辑找到的对象之一的 SMTP 别名或 UserPrincipalName。



