How to use the Exchange 2007/2003 Address Rewrite Feature

In this article I will show you how to use the Exchange Server Address Rewrite feature. This feature allows Exchange Administrators to centrally rewrite outgoing SMTP addresses. Exchange Server Address Rewrite is available as an additional tool for Exchange Server 2003 which can be downloaded for free at the Microsoft website. In Exchange Server 2007, Address rewrite is natively integrated into the core messaging system in the form of Exchange Management Shell CMD’lets.

Let’s begin

This article briefly explains why the Exchange Address Rewrite feature could be necessary in your Exchange Server environment. Address Rewrite is mostly focused on Exchange Server 2007 but I will also explain the Exarcfg tool for Exchange Server 2003.

What is Exchange Address Rewrite?

Exchange Address Rewrite is the process of rewriting e-mail addresses for all outgoing messages on a special SMTP virtual server (true for Exchange Server 2003). Exchange Address Rewrite is especially used in merger or acquisition scenarios where two Exchange organizations are to be merged into one but, until these two organizations are completely merged, every organization uses its own SMTP namespace while for all outgoing SMTP messages the new or unique SMTP address space is used.

One example:

NWtraders has acquired Contoso and for a limited time, until the acquisition is finalized, all users of Contoso should use the SMTP E-mail address space of NWTraders for outgoing messages.

There are some steps to perform when you enable Address Rewrite. If you would like to use this feature you must perform the following steps:

  • Enable Address Rewrite for all outgoing messages for users of the Contoso Exchange organization
  • Create contacts in Active Directory for all Contoso Mail enabled users with a target SMTP address for Contoso and a primary SMTP address for NWtraders
  • Create an SMTP connector with an address space of Contoso
  • Enable Address Rewrite on the corresponding Exchange SMTP virtual Servers

Exchange Address Rewirte requires that the following work properly:

  • All SMTP messages must be externally submitted through the Exchange Bridgehead server
  • All SMTP messages must be sent to the Internet

Please note:
Exchange Address Rewrite is NOT used for sending internal E-Mails from one Exchange Server to another in your Exchange Organization. There is one exception from this rule: All native SMTP clients like Mozilla, Thunderbird or Microsoft Outlook Express use Exchange Address Rewite because these messages will be sent directly to the SMTP driver.

Downloading and Installing Exchange Address Rewrite

Because Exchange Server 2003 has no native integration with Exchange Address Rewrite, you must download the Address Rewrite tool called EXARCFG.EXE from the Microsoft website. You will find the download link at the end of this article.

After downloading the tool, simply extract the download package and open a command prompt to use the EXARCFG tool, as shown in the following screenshot.


Figure 1: Exarcfg Syntax

The parameters are self explanatory and require only a little attention.

The EXARCFG parameter –E enables Address Rewrite while the parameter –D disables Exchange Address Rewrite. The only parameter you should pay more attention to is the –V parameter which specifies which Exchange Virtual SMTP Server should be used.


Figure 2: Enabling Exarcfg for the Exchange Server London.nwtraders.msft

These were the necessary steps for using Exchange Address Rewrite in Exchange Server 2003. Using Exchange Address Rewrite in Exchange Server 2007 is a bit different from Exchange Server 2003.

Exchange Address Rewrite in Exchange Server 2007

Exchange Address Rewrite in Exchange Server 2007 is already installed with the core messaging subsystem but is not enabled. You have to use the Exchange Management Shell to activate Exchange Address Rewrite.

One other new feature of Exchange Address Rewrite in Exchange Server 2007 is that you can enable this feature on a per user, SMTP domain and/or SMTP subdomain base and not for the whole Exchange 2003 Virtual SMTP Server as in Exchange Server 2003.

You configure Address Rewriting agents on the SMTP receive connector and send connector on a computer that has the Edge Transport server role installed.

Please note:
The Exchange Server 2007 Address Rewrite Agent is only available on Edge Transport servers.

Enumerating Installed Transport Agents

The following Exchange Management Shell CMD’lets show the installed Transport Agents on a Hub Transport Server. As you can see there is no Transport Agent for the Address Rewrite feature.


Figure 3: Installed Transport Agents on Hub Transport Server

When you start the Exchange Management Shell CMD’let to enumerate the Exchange 2007 Transport Agents on a Exchange 2007 Edge Transport Server, you can see the Transport Agent for Incoming and Outgoing SMTP message transfer.


Figure 4: Installed Transport Agents on Edge Transport Server

Display Exchange Server 2007 Address Rewrite Entries

If you would like to see for which users, Domains or subdomains Address Rewrite is enabled, start the Exchange Management Shell CMD’let from the following screenshot.


Figure 5: Display installed Address Rewrite entries

With Exchange Server 2007 Address Rewrite you can rewrite SMTP addresses based on:

  • Single Address
  • Single Domain
  • Multiple Subdomains

How to enable Address Rewrite for a Single Address

New-AddressRewriteEntry -name “[email protected] to [email protected]” -InternalAddress [email protected] -ExternalAddress [email protected] Single Domain

How to enable Address Rewrite for a Single domain

New-AddressRewriteEntry -name “IT TRAINIHG GROTE to TELTA” -InternalAddress it-training-grote.de -ExternalAddress telta.de

How to display Address Rewrite entries after configuring some entries

You have to use the Exchange Management Shell to display configured Address Rewrite entries as shown in the following screenshot.


Figure 6: Display installed Address Rewrite entries

What SMTP Header fields are rewritten and which are not?

Exchange Server 2007 Address Rewrite doesn’t rewrite all the SMTP Header fields. The following table from Microsoft lists the SMTP Header fields that are rewritten for inbound or outbound messages.

SMTP Header field

Outbound

Inbound

Envelope From (MAIL FROM)

Rewritten

Not rewritten

Envelope To (RCPT TO)

Not rewritten

Rewritten

Body To

Rewritten

Not rewritten

Body Cc

Rewritten

Not rewritten

Body From

Rewritten

Not rewritten

Body Sender

Rewritten

Not rewritten

Body Reply-To

Rewritten

Not rewritten

Body Return-Receipt-To

Rewritten

Not rewritten

Body Disposition-Notification-To

Rewritten

Not rewritten

Body Resent-From

Rewritten

Not rewritten

Body Resent-Sender

Rewritten

Not rewritten

Table 1: SMTP Header fields that are rewritten and those that are not with Exchange Server 2007 Address Rewrite

Conclusion

Exchange Server 2003/2007 Address Rewrite is a great tool that rewrites SMTP addresses and is especially useful in Exchange environments within a merger or acquisition scenario. You should carefully plan the implementation of Exchange Address Rewrite. Setting up Exchange Address Rewrite is really simple but the underlying organizational process should be carefully considered.

Related Links

Exarcfg Download

Planning for Address Rewriting

Overview of the Exchange Server 2003 Resource Kit Tools

Supporting Two SMTP Mail Domains and Sharing an SMTP Mail Domain with Another System

How to create a new Address Rewrite Entry

Hub Transport Servers in Exchange Server 2007

About The Author

Leave a Comment

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Scroll to Top