How to delete corrupted, hidden inbox rules from a mailbox using MFCMAPI
This is useful when you receive duplicate messages or any of the inbox rules are corrupted or not working as expected. I have included related KB article below for reference.
1. Export all rules from you Outlook so that you may import them back after deleting all rules via MFCMAPI.
On your Outlook client, go to “File”> “ManageRules & Alerts”.
(Please make sure you download the correct release for your Outlook client e.g. 32bit or 64bit version).
4. Start MFCMAPI.EXE as Administrator.
5. Go to “Tools” > “Options”.
6. Make sure that “Use the MDB_ONLINE flag when calling OpenMsgStore”
And “Use the MAPI_NO_CACHE flag when calling OpenEntry” are checked. Click “OK”.
8. Choose the Outlook profile contains the rules you want to delete > “OK”.
10. Expand “Root Container” > Scroll down > Expand “Top Information Store”.
Then right click “Inbox” > “Open associated contents table”.
Select all messages you want to delete > Right click > “Delete message”.
12. Choose “Permanent delete passing DELETE_HARD_DELETE (unrecoverable)" > “Ok”.
13. Once all rules have been deleted, you may import the inbox rules back or create new ones.