Custom Mapping: Add SMTP/smtp proxyaddresses at Sync time

Created: 2017-04-07 11:02:39
Modified: 2023-08-28 10:08:04
Tags: Active Directory Custom Mapping Exchange 20xx Javascript UnitySync

Syncing to an Active Directory (AD) Destination, the default mapping for proxyaddresses (shown below) will sync all Source SMTP/smtp addresses. The corresponding contact created on the Destination will contain all these same addresses. This default is usually all that is needed for a typical directory sync.


We do recommend that you use Address Policies whenever possible as they offer more flexibility in the address format being created. Though these address policies are typically enabled, it’s possible you may need to enable them at sync time. Instructions for this are available in our knowledge base.

Occasionally, there might be the need to add an additional single smtp address on the Destination contact.

  • Leave the default mapping in place.
  • Add the below mapping. This will take the primary smtpname and append the domain name specified to add a single smtp address.

Rarely, there may be a need to add another smtp address (with the same domain) based on ALL Source smtp addresses. This is possible via a custom mapping that calls an eval.js javascript sub routine.

Example Scenario:

Source values are:

  • proxyaddresses:
  • proxyaddresses:

Desired Destination values are:

  • proxyaddresses:
  • proxyaddresses:
  • proxyaddresses:
  • proxyaddresses:

IMPORTANT NOTE: The first two sync directly from the Source, while the second two are created at sync time from the Source values and the desired domain.

The solution for this includes a custom mapping which calls a javascript function:

  1. In a custom object map file, leave the default mapping as-is
  2. Add a new line with this additional mapping for proxyaddresses:


  3. Per this article, edit the eval.js file to add this sub routine:

    function grabproxy(proxies)  
    names = proxies.split("@");  
    return names[0];  
Share this article:

  1. Directify - Self Service

  2. Mimic - Replication

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