SMTP Addresses Tab: Swap Proxy

Created: 2012-04-20 08:09:59
Modified: 2023-03-30 10:31:59
Tags: Active Directory AD LDS ADAM Address Manipulation Exchange 20xx UnitySync

When syncing LDAP directories, you have the option to manipulate proxyaddress, swapping a secondary smtp up to be the primary *SMTP**.

Typically an Exchange mailbox is given a primary SMTP address. This address is the user’s reply-to address. Secondary smtp addresses can be added that allow the user to receive email using other addresses.

UnitySync’s Swap Proxy function reads through the proxyaddresses using a rule-set. If a match occurs, that address becomes the primary address and the old primary address is pushed into the proxy list.

The swapping logic looks like this:

  • Read the domain part of each proxy addresses and compare, in order, against those you have supplied in the Swap Proxy parameter.

  • When a match is found:

    • Swap the matching secondary smtp proxyaddress, making it the Primary SMTP address.
    • Swap the original Primary SMTP address making it a secondary smtp proxyaddresses

Note, when a Swap takes place, mail and targetaddress are also set using the swapped address.

Example of Standard Swap Proxy Usage

Assume the following three records exist on your Source.

On the ProxyAddresses tab, the Swap Proxy field is set to:


When a match is found:

  • Swap the matching smtp, making it the primary SMTP address.

Resulting three Destination Records:

SMTP: (nothing is swapped)

Notes about Swap Proxy Syntax

It may or may not be necessary to include the @ prefix in the Swap Proxy domains you specify. An example of when it IS necessary is if you have two incoming domains that look like this:

If you specify a SwapProxy of simply, then both smtp addresses above qualify for swapping. Which ever is returned first will be swapped to the primary. If you specifically want the domain to be primary, then you need to specify the Swap Proxy value as

There are some guidelines to the rule-set:

  • The order of the swap proxy list sets the order of the search through the secondary addresses.
  • The swap proxy list is done by subtring matching (no wildcards should be used)
  • If a proxy is not matched the addresses are left alone.
  • UnitySync will use the first proxy it matches.
Share this article:

  1. Directify - Self Service

  2. Mimic - Replication

  3. UnitySync - Sync
  1. emPass - Sync
  1. Profiler
  2. SimpleSync