如何重写来自子域的所有电子邮件

 

适用于: Exchange Server 2007 SP3, Exchange Server 2007 SP2, Exchange Server 2007 SP1, Exchange Server 2007

上一次修改主题: 2007-08-13

本主题说明如何使用 Exchange 命令行管理程序在安装了 Microsoft Exchange Server 2007 边缘传输服务器角色的计算机上创建新的地址重写条目,用于重写从多个子域发送的所有电子邮件。在重写多个子域时,可以创建以下类型的地址重写条目:

  • 影响所有子域的地址重写条目

  • 只影响特定子域的地址重写条目

  • 影响标识为异常的子域以外的所有子域的地址重写条目

note注意:
不能使用 Exchange 管理控制台管理地址重写代理。若要管理地址重写代理,必须使用 Exchange 命令行管理程序。有关如何使用 Exchange 命令行管理程序的详细信息,请参阅使用 Exchange 管理外壳

有关地址重写的详细信息,请参阅规划地址重写

开始之前

若要在安装了边缘传输服务器角色的计算机上执行以下步骤,必须使用作为该计算机上的本地管理员组成员的帐户进行登录。

此外,在执行这些步骤之前,请阅读如何新建地址重写条目

Caution警告:
在创建重写多个域的地址重写条目之前,必须先准备子域。有关详细信息,请参阅准备重写多个域中的地址

New-AddressRewriteEntry cmdlet 包含 TemplateInstance 参数。通过 TemplateInstance 参数可以将一个地址重写条目的配置复制到另一个地址重写条目。地址重写条目可用于复制的属性是 OutboundOnly 属性和 ExceptionList 属性。有关如何使用现有地址重写条目作为模板的详细信息,请参阅模板

重写来自所有子域的电子邮件

若要创建一个地址重写条目,用于重写来自所有子域的所有电子邮件的邮件头,请使用以下命令语法:

New-AddressRewriteEntry -Name <address rewrite entry name> -InternalAddress <*.internal domain> -ExternalAddress <external domain> -OutboundOnly $True

使用 Exchange 命令行管理程序创建一个新的地址重写条目,用于重写从多个子域及其父域发送的所有电子邮件

  • 运行以下命令:

    New-AddressRewriteEntry -Name "Rewrite all contoso.com sub-domains" -InternalAddress *.contoso.com -ExternalAddress contoso.com -OutboundOnly $True 
    

在 Exchange Server 2007 Service Pack 1 (SP1) 中重写来自特定子域的电子邮件

若要在 Exchange 2007 SP1 中创建一个地址重写条目,用于重写来自特定域的电子邮件的邮件头,请使用以下命令语法:

New-AddressRewriteEntry -Name <address rewrite entry name> -InternalAddress <internal domain 1> -ExternalAddress <external domain> -OutboundOnly $True
New-AddressRewriteEntry -Name <address rewrite entry name> -InternalAddress <internal domain n> -ExternalAddress <external domain> -OutboundOnly $True

在 Exchange 2007 SP1 中使用 Exchange 命令行管理程序创建一个新的地址重写条目,用于重写从特定子域发送的所有电子邮件

  • 运行以下命令:

    New-AddressRewriteEntry -Name "Rewrite sales.contoso.com to contoso.com" -InternalAddress sales.contoso.com -ExternalAddress contoso.com -OutboundOnly $True
    New-AddressRewriteEntry -Name "Rewrite marketing.contoso.com to contoso.com" -InternalAddress marketing.contoso.com -ExternalAddress contoso.com -OutboundOnly $True
    New-AddressRewriteEntry -Name "Rewrite research.contoso.com to contoso.com" -InternalAddress research.contoso.com -ExternalAddress contoso.com -OutboundOnly $True
    

在 Exchange 2007 的正式发布 (RTM) 版本中重写来自特定子域的电子邮件

若要在 Exchange 2007 RTM 中创建一个地址重写条目,用于重写来自特定域的电子邮件的邮件头,请使用以下命令语法:

New-AddressRewriteEntry -Name <address rewrite entry name> -InternalAddress <*.internal domain 1> -ExternalAddress <external domain> -OutboundOnly $True
New-AddressRewriteEntry -Name <address rewrite entry name> -InternalAddress <*.internal domain n> -ExternalAddress <external domain> -OutboundOnly $True

在 Exchange 2007 RTM 中使用 Exchange 命令行管理程序创建一个新的地址重写条目,用于重写从特定子域发送的所有电子邮件

  • 运行以下命令:

    New-AddressRewriteEntry -Name "Rewrite sales.contoso.com to contoso.com" -InternalAddress *.sales.contoso.com -ExternalAddress contoso.com -OutboundOnly $True
    New-AddressRewriteEntry -Name "Rewrite marketing.contoso.com to contoso.com" -InternalAddress *.marketing.contoso.com -ExternalAddress contoso.com -OutboundOnly $True
    New-AddressRewriteEntry -Name "Rewrite research.contoso.com to contoso.com" -InternalAddress *.research.contoso.com -ExternalAddress contoso.com -OutboundOnly $True
    

重写来自所有子域(异常子域除外)的电子邮件

若要创建一个地址重写条目,用于重写来自所有子域(特定子域除外)的所有电子邮件的邮件头,请使用以下命令语法:

New-AddressRewriteEntry -Name <address rewrite entry name> -InternalAddress <*.internal domain> -ExternalAddress <external domain> -OutboundOnly $True -ExceptionList <excluded domain name 1, excluded domain name 2>

使用 Exchange 命令行管理程序创建一个新的地址重写条目,用于重写从多个子域及其父域(指定的子域除外)发送的所有电子邮件

  • 运行以下命令:

    New-AddressRewriteEntry -name "Rewrite all contoso.com sub-domains except legal.contoso.com" -InternalAddress *.contoso.com -ExternalAddress contoso.com -OutboundOnly $True -ExceptionList legal.contoso.com, corp.contoso.com
    

详细信息

有关语法和参数的详细信息,请参阅 New-AddressRewriteEntry

有关地址重写的详细信息,请参阅以下主题: