May 13, 2013

Repairing Mailbox Corruption in Exchange 2010

I recently got through recovering an SBS 2011 server after Active Directory face-planted in the middle of a workday. When I say recover, I mean I repeated the entire migration, using a cleaned up secondary DC - it was a fun weekend (expect another post about that experience). Although I thought we were in the clear, I got a call from the client about 24 hours after we had verified everything was working. He indicated that his iPhone had suddenly stopped receiving mail in the inbox (calendar, contacts, sent items were still fine) and throws up an error after spinning in circles for a few minutes that it "cannot connect to mail server".

I suspected leftover corruption, but we had already run through the normal database repair tools for Exchange and everything else was working fine. I checked the event logs and found:

Event ID 1008

An exception occurred and was handled by Exchange ActiveSync. This may have been caused by an outdated or corrupted Exchange ActiveSync device partnership. This can occur if a user tries to modify the same item from multiple computers. If this is the case, Exchange ActiveSync will re-create the partnership with the device. Items will be updated at the next synchronization. 

Exception message: ICS synchronization failed.

There is a string that appears in that error which ties it to a specific user and ActiveSync device. I ran through the normal troubleshooting, but I had the same issue on a different phone.
The first solution I tried is pretty standard for repairing a corrupt mailbox: Just move it to another database in Exchange. If there are corrupt messages, folders, calendar items, etc. these will be logged and you can specify a threshold for how many of these failures the move should tolerate before giving up (see bad item limits:

However, that move presented a new problem:

Event ID: 1100

Request '(request name removed)' failed.

Error code: -2147221233

MapiExceptionNotFound: Unable to synchronize manifest. (hr=0x8004010f, ec=-2147221233)

Awesome. This mailbox is too corrupt to even move. I thought the next step would likely be an export-to-pst and import back to a clean mailbox (which causes it's own issues), but I found a friend in the new-mailboxrepairrequest cmdlet:

New-MailboxRepairRequest -Mailbox -CorruptionType SearchFolder, AggregateCounts, ProvisionedFolder, FolderView

After running that command, my user immediately was able to access his inbox and the event log errors disappeared. The command will disrupt access to the mailbox temporarily and you won't be able to see the progress. Instead, watch the application event logs for event ID 10048:

Online integrity check for request completed successfully

The event logs will also show you what was corrupted (it was several views in my case).


  1. Thanks A lot. I really appreciate.

  2. Extremely helpful - thank you very much!

  3. Thanks! this saved my bacon. Had issues with not beeing able to move a mailbox from one database to another.
    This command made it possible for the move request to complete. Thanks!

  4. Great post, thanks a lot! ;)

  5. Dude. Thank. You. Luh. You. WORKED

  6. Outstanding... I was out of options... Nice save!

  7. My scenario was exactly the same as Paul's and this worked! Didn't even have to move mailboxes to new database after this, which is nice. I, too, saw corruption in views...not sure what I lost, but happy that email is flowing to users' phones again! Thanks Paul!

  8. Wow, cool, that you have found a solution to this problem. Thank you for sharing experience. Try this cloud server, it is very good data room software

  9. Thanks, it works like a champ....thumbs up mate.