Thursday, September 24, 2009

Weird iPhone issue when trying to sync with Exchange

Ok, so first off I solved the issue I was seeing, but I have to post it anyway because I spent much too long figuring it out. Secondly, if you're having an error about encryption and you recently upgraded to the iPhone 3.1 OS, this isn't that problem. However, you can find the Apple discussion about that issue at:


The problem I had may be a problem with the iPhone, or it might be an Exchange issue. I honestly don't know, which is another reason I decided to post this. Ok, here goes

I received a new iPhone 3G a few days ago. I already support about a dozen or so iPhone users using Exchange email and have had no complaints. However, I finally ran into something that wasn't normal. We have a single Exchange 2003 server hosting email for a few different domain names. For this to make sense, lets say those domains are email1.com and email2.com. The server itself is in the DNS as exchange.email1.com, which is manually set in the ActiveSync configuration when it asks for the server name. I have successfully setup email for users in both email1.com and email2.com with no problems. Now is where the weirdness begins...

We have a proprietary application that requires users to have no more than 8 characters in their username, but we standardize on using the entire last name in the email address. For an example, let's say we have two employees named John and Tom Anderson. John works the email1.com company and Tom works for the email2.com company. This means their usernames would be janderso and tanderso, but their default email addresses would be janderson@email1.com and tanderson@email2.com. The problem I have found is that this is fine for janderson@email1.com and ActiveSync on the iPhone works correctly. However, tanderson@email2.com has no such luck and the account will verify but will not sync. This is true with SSL turned on or off. On occassion it will work, but eventually it will fail and anything synchronized to the phone will mysteriously disappear and then the phone begins giving errors connecting.

Now what I found will fix this problem is matching the username to the email address. In my case, I was able to change the logon for this particular user since they didn't need access to the proprietary application. Changing the username from tanderso to tanderson, then leaving the email as tanderson@email2.com and reconfiguring ActiveSync on the iPhone worked. This was not required for users with an email address of user@domain1.com who are able to have differing usernames and email addresses without any issue.

I first ran into this with an iPhone with a 3.1 OS installed, but have since been able to test it on the 3.0.1 OS and it failed there as well. Like I said, this may be a problem with the iPhone software or my Exchange server, but since I don't know which it is hopefully if it is an iPhone problem this will save you the time of trying to figure out what is going on.

No comments: