Office 365 Active Directory Sync

By steve, 15 February, 2016

I was recently involved in troubleshooting an issue where an on-premis exchange deployment was bouncing e-mails with an error that the user did not have an MDB assigned. This was a multi-tenant exchange deployment, so we could not use the official hybrid mode, but we were using one of the sync tools to keep usernames and passwords for the local users in sync with the office 365 users. Our issue was that another tenant was trying to send mail, and because we had populated the proxyaddress attribute, Exchange was trying to deliver the mail to the local user even though the domain was added as an external relay.

The solution was to add the primary e-mail address for the user (STMP:user@userdomain.com) into the targetAddress attribute. It appears that the presence of this attribute for an AD object causes any mail directed at one of their addresses in the proxyaddress list to bypass any local rules, and the mail will be forwarded to the targetaddress using the matching send connector. This works even if the targetaddress is the same as the original recipient address.

Note: If the DNS for the domain directs mail back to your exchange environment and you redirect back to the same e-mail address, you can easily create mail loops, since mail will go out the send connector, then the external mail server will send it back into your organisation, which will send it back out the send connector until the message reaches the maximum hop count limit.

Comments