Overview
Deleting an email via the Outlook Connector (OC) fails (soft-delete and hard-delete) due to a mismatch of the containerKey.
The returned list might show duplicates of the affected folder, for example, the lowercase and the uppercase versions of the containerKey string, one with I_d1dff662d979bc438df67d55830af91d and another with I_D1DFF662D979BC438DF67D55830AF91D.
NOTE: This is not a common, but a very specific issue.
Debug logging (across the OC & server):
2015-04-02,7:37:47,621,1,"#00002024","#00002210","info ","marconnector","MapiFolder::CopyMessages Destination folder is local: 1" 2015-04-02,7:37:47,621,1,"#00002024","#00002210","info ","marconnector","StoreData::MoveMessagesWithProgress >>" 2015-04-02,7:37:47,621,1,"#00002024","#00002210","info ","marconnector","StoreData::MoveMessagesWithProgress No progress available, requesting from MAPI support, progress object 15c8cfb8, Hresult 0 " 2015-04-02,7:37:47,621,1,"#00002024","#00002210","info ","marconnector","StoreData::MoveMessagesWithProgress User Id: d1dff662d979bc438df67d55830af91d" 2015-04-02,7:37:47,621,1,"#00002024","#00002210","info ","marconnector","StoreData::GetOutlookWindow No UI Parameter, get Active Window" 2015-04-02,7:37:47,621,1,"#00002024","#00002210","info ","marconnector","StoreData::GetOutlookWindow Active Window, handle 703ae, title VMware Support Request 15630402803 [ ref:_00D409hQR._50080hBTCH:ref ] - Message (HTML) " 2015-04-02,7:37:47,731,1,"#00002024","#00002210","info ","marconnector","StoreData::PrepareTaskDataInformation Preparing data for Outlook changes, duration 109 millis" 2015-04-02,7:37:47,731,1,"#00002024","#00002210","info ","marconnector","InternalStoreData::SendOutlookChanges task timestamp 650045234 " 2015-04-02,7:37:47,871,1,"#00002024","#00002210","info ","marconnector","InternalStoreData::SendOutlookChanges Timestamp from task changed, 650036609 " 2015-04-02,7:37:48,012,1,"#00002024","#00002210","info ","marconnector","InternalStoreData::SendOutlookChanges Current task is running" 2015-04-02,7:37:48,012,1,"#00002024","#00002210","info ","marconnector","InternalStoreData::SendOutlookChanges Timestamp from task changed, 650045234 " 2015-04-02,7:37:48,012,1,"#00002024","#00002210","info ","marconnector","InternalStoreData::SendOutlookChanges Operation has completed." 2015-04-02,7:37:48,012,1,"#00002024","#00002210","info ","marconnector","StoreData::ResolveCompletedTaskData >>" 2015-04-02,7:37:48,012,1,"#00002024","#00002210","error ","marconnector","StoreData::ResolveCompletedTaskData Task of type 1 has failed, error 8004010f" 2015-04-02,7:37:48,012,1,"#00002024","#00002210","info ","marconnector","StoreData::ResolveCompletedTaskData <<" 2015-04-02,7:37:48,012,1,"#00002024","#00002210","info ","marconnector","StoreData::MoveMessagesWithProgress <<" 2015-04-02,7:37:48,012,1,"#00002024","#00002210","info ","marconnector","MapiFolder::CopyMessages << hr = 0x8004010f" 2015-04-02,7:37:47,731,1,"#00002024","#00000cbc","info ","logmartransport","OutlookChangesManager::Run Synchronize now event of type: 1" 2015-04-02,7:37:47,731,1,"#00002024","#00000cbc","info ","logmartransport","OutlookChangesManager::ExecuteChanges >>" 2015-04-02,7:37:47,731,1,"#00002024","#00000cbc","info ","logmartransport","OutlookChangesManager::ExecuteChanges Task found, type[MessageMove], timestamp 650045234" 2015-04-02,7:37:47,731,1,"#00002024","#00000cbc","info ","logmartransport","OutlookChangesTask::SynchronizeOutlookChanges >>" 2015-04-02,7:37:47,731,1,"#00002024","#00000cbc","info ","logmartransport","OutlookChangesTask::SynchronizeOutlookChanges Messages 1 moved to folder 38F87C42-7B34-4745-A531-0555B0AE69EB" 2015-04-02,7:37:47,778,1,"#00002024","#00000cbc","warning","logmartransport","OutlookChangesTask::UpdateFailedEmails Operation for message id -2147398602(99047e9a-a5bb-4ccb-bfdf-c0cd3b7c39e0) has failed with error (WebFolderNotFound)" 2015-04-02,7:37:47,778,1,"#00002024","#00000cbc","info ","logmartransport","OutlookChangesTask::UpdateFailedEmails All messages op failed, error message (WebFolderNotFound)" 2015-04-02,7:37:47,778,1,"#00002024","#00000cbc","info ","logmartransport","OutlookChangesTask::SynchronizeOutlookChanges << (hresult 8004010f)" 2015-04-02,7:37:47,778,1,"#00002024","#00000cbc","info ","logmartransport","OutlookChangesManager::ExecuteChanges Task completed, type[MessageMove], timestamp 650045234" 2015-04-02,7:37:47,778,1,"#00002024","#00000cbc","info ","logmartransport","OutlookChangesManager::ExecuteChanges No more tasks" 2015-04-02,7:37:47,778,1,"#00002024","#00000cbc","info ","logmartransport","OutlookChangesManager::ExecuteChanges <<" 2015-04-02,07:37:47,645,1,"#00001614","#00000017","info ","WSOutlook","INFO: >>MoveEmails(). DBID:99047e9a-a5bb-4ccb-bfdf-c0cd3b7c39e0, MSGID:-2147398602, UGUID:d1dff662d979bc438df67d55830af91d, FID:I_D1DFF662D979BC438DF67D55830AF91D, DESTINATION: 38F87C42-7B34-4745-A531-0555B0AE69EB" 2015-04-02,07:37:47,661,1,"#00001614","#00000017","error ","WSOutlook","ERROR: <<MoveEmails() Failed. Email could not be moved as tag id for folder path passed returned null" 2015-04-02,07:37:47,645,1,"#00000D30","#00000016","info ","EmailMessageRetrieval",">>GetTagID " 2015-04-02,07:37:47,661,1,"#00000D30","#00000016","info ","EmailMessageRetrieval","< GetFoldersList -
Environment
2014 or newer
Resolution
Before You Start
The containerKey data is stored as varbinary(200) in SQL's arc_folder table. When simply selecting such data it would display encoded, like this:
0x495F4431444646363632443937394243343338444636374435353833304146393144
The following queries can be used to convert this data:
- Option 1:
SELECT CAST(CAST(0x495F4431444646363632443937394243343338444636374435353833304146393144 as varbinary(max)) as varchar(max))
Returns:I_D1DFF662D979BC438DF67D55830AF91D
- Option 2:
SELECT CAST('I_D1DFF662D979BC438DF67D55830AF91D' AS varbinary(200)) 0x495F4431444646363632443937394243343338444636374435353833304146393144
For this example this sample data is assumed:
-
objectGUID of the user in question:
d1dff662d979bc438df67d55830af91d
- Inbox folder - incorrect containerKey - string:
I_D1DFF662D979BC438DF67D55830AF91D
- Inbox folder - correct containerKey - string:
I_d1dff662d979bc438df67d55830af91d
- Inbox folder - incorrect containerKey - varbinary(200):
0x495F4431444646363632443937394243343338444636374435353833304146393144
- Inbox folder - correct containerKey - varbinary(200):
0x495F6431646666363632643937396263343338646636376435353833306166393164
Process
NOTE: The data needs to be fixed in SQL. This process requires advanced SQL skills and understanding of the data structures in GFI Archiver databases and is probably best performed by or together with a Product Specialist.
To fix this issue, perform the following procedure:
- Identify the database which contains the problematic containerKeys using the Database Script Executor tool.
- Run the following query against all databases which are mounted into GFI Archiver:
exec dbo.FindTagFromKeyFA @hash=5239753167813761675,@userGuid=N'd1dff662d979bc438df67d55830af91d',@containerKey=0x495F4431444646363632443937394243343338444636374435353833304146393144
- Run the following query against all databases which are mounted into GFI Archiver:
- This will tell which databases contain the problematic rows.
- Create a backup of the database(s) which contain problematic rows.
- Fix the corresponding row by updating its containerKey to the proper lower-key version. Use this query (make sure to use the proper containerKey and tagID value in this
UPDATE
query):
UPDATE arc_folders
SET containerKey = 0x495F6431646666363632643937396263343338646636376435353833306166393164
WHERE tagId = -2147483618 - Restart the GFI Archiver Store Service.
- Verify via "outlook.asmx > GetFoldersList" that the problematic folder does not show in the problematic uppercase form anymore:
- On the GFI Archiver server itself, open
http://localhost/archiver/services/outlook.asmx
. - Select GetFoldersList and enter the affected user's objectGUID and invoke the method.
NOTE: This must be done as a user who has been granted Full Access permissions under Configuration > Roles and Permissions).
- On the GFI Archiver server itself, open
- Delete the OC's cache FDB file.
- Let the OC resync the mailbox.
Confirmation
Deletion of emails for the affected folder works as expected.