14 April 2011

Problems connecting to Exchange 2010 from different AD

Not while ago we suggested to our customer that has few other companies to merge all email traffic to one Exchange 2010 server. The plan is that all users use email addresses from their original company. This setup would be like some kind of email hosting. After we migrated first of this external companies to centralized mail server we encountered strange behavior on merged company client side.

External company has few users that use Outlook 2007, just like all other users, with a difference that they can't open Out Of Office Assistant (OOF). If they open this wizard they receive this error:

"Your Out of Office settings cannot be displayed, because the server is currently unavailable. Try again later."

They also receive Offline Address Book (OAB) synchronization error:

"Task 'Microsoft Exchange' reported error (0x8004010f): 'The operation failed. An object could not be found.'"

I started troubleshooting this problem and tried all sorts of suggested solutions that I could found on Google. Steps that didn’t help were:
- checked if there is a proxy problem
- check permissions inheritance in AD on problematic users
- reapplied permissions inheritance on problematic users
- created new user from problematic user (copy) and tested new user. New user doesn't have these problems
- other user, except problematic ones, on the same computer doesn't have problems
- problematic user have problems on different computers
- created new mailbox store, move test user there and test if it works
- checked Exchange autodiscovery

Then I noticed something that pointed me to what could be wrong, but still couldn’t solve the problem. When I deleted user, created new one (with the same username) and attached old orphaned mailbox everything worked well until I:
- Unchecked "Automatically update e-mail addresses based on e-mail address policy."
- Set primary email address from name.surname @ domainA.com to name.surname @ domainB.com

After I made this change problem came back. If I apply the setting "Automatically update e-mail addresses based on e-mail address policy." back the problem remains.

I was so desperate at this point that I went sniffing Outlook traffic with WireShark. After this I finally found out what is going on and prepared a workaround. It looks like autodiscovery messes up Outlook to the point that it thinks that OAB and OOF is located on different address (in our case domainB.com) as other services. I’m not quite sure if this is an Exchange 2010/Outlook bug or my misconfiguration.

Workround goes like this:
For existing user:
- change primary email address of a user back to original domain (name.surname @ domainA.com)
- create new profile in Outlook and open Outlook to setup/initialize new profile and wait to receive few emails
- check if OOF and OAB are working
- close Outlook
- change primary email address of a user back to hosted domain (name.surname @ domainB.com)
- check if OOF and OAB still works

For new user:
- leave primary email address as given by Exchange policy (name.surname @ domainA.com)
- create new profile in Outlook and open Outlook to setup/initialize new profile and wait to receive few emails
- check if OOF and OAB are working
- close Outlook
- change primary email address of a user to hosted domain (name.surname @ domainB.com)
- check if OOF and OAB still works

Customer is now happy and so am I :)

This is it for today. Have fun!

No comments:

Post a Comment