DSA will synchronize any AD attribute but fails to mail enable a user object.
When examining the DSA.log or the Event Viewer the error is:
Target JobID:0 -> object was not modified due to error
Common JobID:0 -> Error 0xe1000040. Per attribute apply failed for object <GUID=8A1C6B2D66204740BD6A14BC37AF72F0>
Error 0xe1000041. Apply of attribute msExchQueryBaseDN with value(s) = <GUID=8645e24c617e2448a274fc298739b369>;OU=OU-NAME,OU=OUNAME,DC=Domain,DC=com failed.
LDAP error 0x13. Constraint Violation (000020B5: AtrErr: DSID-03152392, #1:
0: 000020B5: DSID-03152392, problem 1005 (CONSTRAINT_ATT_TYPE), data 0, Att 70173aa0 (msExchQueryBaseDN)).
This attribute is not populated by default and if it is populated it contains a value which is specific for the source domain only.
Usually this attribute is being used in environments with OWA users and admins use the msExchQueryBaseDN attribute to limit the scope of a Microsoft Active Directory directory service search.
This DN has the syntax OU=User_OU, DC=User_Domain, dc=COM and it cannot be resolved in target domain, this causes the failure.
The attribute mentioned in the error (msExchQueryBaseDN) does not have to be migrated. The value it contains is valid for the source domain only.
Trying to copy and preserve this value from source domain would mean to populate the value in target domain with improper, bogus information.
To resolve the problem this attribute needs to be skipped from synchronization.
To skip the attribute from being synchronized please perform the following:
1. Click on the Synchronization properties and click on Advanced Options.
2. In the Advanced Options window, click on Attributes to Skip button.
3. In Attributes to Skip window select the checkbox Show advanced attributes, find and select msExchQueryBaseDN, ensure it applies to Two-way Sync (is skipped in both directions) and close by clicking OK.
Note: This change does not require a full resync but you need to stop and start dirsync if synchronization was running.
For more information please see also MS KB article 817218: