MFCMAPI Removing Corrupt mailbox items
The Exchange synchronisation engine will try to synchronise all mail items during on-boarding but if it encounters any corrupt items and the
baditemcount has not been modified, the action will fail with an error:
FailureContext : --------
Operation:
ISourceFolder.CopyTo
OperationSide:
Source
Primary
(5552a668-26e6-42af-9d67-552787eabd2f)
PropTags:
[ContainerContents; FolderAssociatedContents; ContainerHierarchy; DisplayName;
RulesTable; 1071710466]
--------
Folder: '/Top
of Information Store/Deleted Items', entryId [len=46,
data=000000006E995C48951065418A2B1EBE623C6D850100882242EA481634449D0B8BFFA203DD8C000000C52EC70000],
parentId [len=46,
data=000000006E995C48951065418A2B1EBE623C6D850100882242EA481634449D0B8BFFA203DD8C000000C52EC10000]
To solve this
error we first need to attempt a mailbox repair using Powershell.
New-MailboxRepairRequest -Mailbox
<name_of_mailbox> -CorruptionType "SearchFolder, FolderView, AggregateCounts, ProvisionedFolder,
MessagePtagCn, MessageId"
To monitor the restore request we need to
examine the application context event logs on the mailbox server hosting the
content.
Examine the event logs and see the result
of the repair request:
Attempt the onboarding request again and
examine the migration log. Any failures are likely to be corrupt items in the
folder referenced in the failure log. In this example, there are multiple,
corrupt items in the deleted items folder
It is likely that any attempt to delete
these using Outlook will fail with the following message:
We will need to use the MFCMAPI tool to
delete these objects.
Unzip the MFCMAPI and ensure that you have FullAccess
permissions to the mailbox within Exchange. We will also need to ensure that
cached Exchange mode is disabled to allow full availability of all mailbox
contents.
Create an Outlook profile in the usual
manner and open MFCMAPI with elevated privilege. Then click Session and Logon:
Select your Outlook profile and click OK
Double click the Object that is listed as
the default store for the profile.
Expand Root Container > Top Of Information Store and right click the folder where the corrupted items are reportedly located and choose Open Contents table.
Locate the corrupted items from their time
stamps and group select, right click and select Delete Message:
Select Permanent delete Passing
DELETE_HARD_DELETE (unrecoverable) and click OK.
Now click Session and Logoff
Repeat the process until no migration
errors are encountered when onboarding the mailbox to Exchange online.