Share via


How to Rewrite All E-Mail Messages from a Single E-Mail Domain

Microsoft Exchange Server 2007 will reach end of support on April 11, 2017. To stay supported, you will need to upgrade. For more information, see Resources to help you upgrade your Office 2007 servers and clients.

 

Applies to: Exchange Server 2007, Exchange Server 2007 SP1, Exchange Server 2007 SP2, Exchange Server 2007 SP3

Exchange Server 2007 lets you to rewrite the headers of e-mail messages that are sent to and from specific internal domain names when messages are sent to and from the Internet. This enables the organization to make the internal e-mail addresses appear to originate from another domain.

Note

You cannot administer the Address Rewriting agent by using the Exchange Management Console. To administer the Address Rewriting agent, you must use the Exchange Management Shell. For more information about how to use the Exchange Management Shell, see Using the Exchange Management Shell.

For more information about address rewriting, see Planning for Address Rewriting.

Before You Begin

To perform the following procedure on a computer that has the Edge Transport server role installed, you must log on by using an account that is a member of the local Administrators group on that computer.

Also, before you perform this procedure, read How to Create a New Address Rewrite Entry.

Important

The Address Rewriting Inbound agent and the Address Rewriting Outbound agent must be enabled for address rewrite entries to be applied to e-mail messages that enter and leave a computer that has the Edge Transport server role installed. If address rewrite entries have been created, but the Address Rewriting agents are disabled, Exchange Server 2007 does not apply the address rewrite entries. To determine whether the Address Rewriting agents are enabled on a computer that has the Edge Transport server role installed, run the following command:
Get-TransportAgent
For more information about the Get-TransportAgent command, see Get-TransportAgent.
To enable the Address Rewriting agent if it is not enabled, run the following command:
Enable-TransportAgent -Identity "Address Rewriting Inbound agent"
Enable-TransportAgent -Identity "Address Rewriting Outbound agent"
For more information about the Enable-TransportAgent command, see Enable-TransportAgent.

Procedure

When you configure Exchange Server 2007 to rewrite a single domain, the headers of e-mail messages that are sent to and from that domain are rewritten. For example, in the following procedure, the headers of e-mail messages that are sent from mailboxes in the internal contoso.com domain are rewritten so that the messages appear to originate from the northwindtraders.com domain when they are sent to the Internet. When new messages, or replies to messages that originated from the rewritten domain, arrive at the computer that has the Edge Transport server role installed, Exchange Server 2007 rewrites the recipient address in the header of the inbound messages that have the internal domain contoso.com and delivers the message to the recipient.

To create a new address rewrite entry that rewrites the headers of messages that are sent to and from mailboxes in the internal domain, use the following command syntax:

New-AddressRewriteEntry -Name <address rewrite entry name> -InternalAddress <internal domain> -ExternalAddress <external domain>

To use the Exchange Management Shell to create a new address rewrite entry that will rewrite a single domain

  • Run the following command:

    New-addressRewriteEntry -Name "Contoso to Northwindtraders" -InternalAddress contoso.com -ExternalAddress northwindtraders.com
    

For More Information

For detailed syntax and parameter information, see New-AddressRewriteEntry.

For more information about address rewriting, see the following topics: