Skip to content

How to delete corrupted hidden Exchange inbox rules using MFCMAPI

One of our users is experiencing a strange situation when they connect to their Exchange mailbox (Outlook). The email from recipients is automatically sent to a specific folder instead of the inbox folder, and other emails are flagged, and so on. This issue could be related to a corrupted hidden Exchange inbox rule in Outlook. In this article, we will show you how to find and delete corrupted hidden Exchange inbox rules using MFCMAPI.

Outlook email manage rules

A user notices that the incoming emails are automatically forwarded to another folder or flagged for no reason. To understand this situation, you should check if an Exchange inbox rule could be causing this issue.

Check the user’s Outlook rule:

  1. Open your Outlook app
  2. Go to File
  3. Click Rules & Alerts

The outcome could be:

  • There are no inbox rules (empty)
  • The inbox rules don’t match the situation
  • The inbox rules are there, but you can’t edit or delete

Some Exchange inbox rules don’t appear in Outlook, which means the rules are hidden or corrupted. To remove these hidden, corrupted exchange inbox rules, you need to use the MFCMAPI tool. The MFCMAPI shows the structure of the Exchange mailbox and mail items.

Troubleshoot corrupted hidden Exchange inbox rules

The user has an existing inbox rule that can’t be seen or managed in Outlook. This issue is related to a corrupted hidden inbox rule.

The MFCMAPI tool shows the user Outlook mailbox content and rules. The problem is that the tool can’t distinguish between a legitimate and a corrupted hidden inbox rule.

If you have any existing inbox rules you want to keep, you must export the rules and save them as a backup. Once you export the rules, you need to delete all the rules manually in your Outlook.

Later, you can import the rules from the backup later.

Export set of rules in Outlook

Some have important mail rules they want to keep in Outlook. Therefore you need to export them all, and you can import them later.

How to export mail rules in Outlook:

  1. Open Outlook app
  2. Go to File
  3. Click Manage Rules & Alerts
  4. Click Options
  5. Click Export Rules
Exchange inbox rules export Outlook

Save the rules as a .rwz file. You will need this file later to upload and import the rules back into your Outlook.

Delete corrupted hidden Exchange inbox rules using MFCMAPI

Before you start, you must delete all the mail rules in the user’s Outlook to avoid any mistakes. To access the Outlook mail profile, you need the user credentials.

Note: If you want to keep any mail rules, export all mail rules to save as backup from Outlook (see above step) and then delete all rules manually.

There should be no more email rules in the user’s Outlook profile, meaning the Rules and Alerts window should be empty. In the next step, you will delete all the (existing and corrupted) rules with the MFCMAPI tool.

Download MFCMAPI

Before downloading the tool, check if your Outlook app is x32 bit or x64 bit. The 64-bit builds will only work on a machine with 64-bit Outlook installed. All other machines should use the 32-bit builds, regardless of the operating system.

Since we only want to run the tool, look for .exe files.

  1. Download the latest version of the tool MFCMAPI
Download MFCMAPI tool

Use MFCMAPI tool to delete all corrupted hidden rules in Outlook

The MFCMAPI tool is portable, so you don’t need to install the setup.

  1. Open the downloaded MFCMAPI.exe zip file
  2. Double-click the application MFCMapi.exe
Open MFCMAPI tool and double click application
  1. Click Run
Run the application MFCMAPI
  1. Click OK on the welcome screen
Delete corrupted hidden Exchange inbox rules using MFCMAPI 1
  1. Click Session > Logon
Delete corrupted hidden Exchange inbox rules using MFCMAPI 2
  1. Select Outlook
  2. Click OK

Note: You need to set up an Outlook profile so you can select it in MFCMAPI.

Delete corrupted hidden Exchange inbox rules using MFCMAPI 3

Note: A specific Outlook mail profile can serve as a container for different Exchange objects such as user mailbox, online archive, Public Folder, or other (shared) mailboxes to which the user has Full Access to these mailboxes.

When we use the MFCMAPI to log into a specific Exchange user mailbox (Amanda Hansen@m365info.com), we see a couple of other databases with the yellow icon.

  1. Right-click on the user mailbox Amanda.Hansen@m365info.com
  2. Click Open store

Or double-click the user mailbox to view the content of Amanda’s mailbox.

Delete corrupted hidden Exchange inbox rules using MFCMAPI 4

It opens a new window.

  1. Click the small arrow to expand the Root Mailbox
Delete corrupted hidden Exchange inbox rules using MFCMAPI 5
  1. Click the small arrow to expand the folder IPM_SUBTREE
  2. Right-click the Inbox folder
  3. Select Open associated contents table
Delete corrupted hidden Exchange inbox rules using MFCMAPI 6

It opens a new window Inbox (Hidden Contents), which displays the internal structure of the Inbox folder. The window includes many columns, but you only need to find the Message Class column.

  1. Scroll to the right to go to the column header Message Class
Delete corrupted hidden Exchange inbox rules using MFCMAPI 7
  1. Select the column Message Class to sort the contents of the table alphabetically
  2. Right-click the inbox rule saved as an object with the value IPM.Rule.Version2.Message
  3. Select Delete Message

These messages correspond to each rule configured for the public folder.

Delete corrupted hidden Exchange inbox rules using MFCMAPI 8

A new window opens with the name Delete Item.

  1. Select Permanent delete passing DELETE_HARD_DELETE (unrecoverable)
  2. Click OK

Note: If you have multiple messages with the value IPM.Rule.Version2.Message, you need to delete them individually.

Delete corrupted hidden Exchange inbox rules using MFCMAPI 9
  1. Close all the windows of MFCMAPI when you are completely done deleting rules.

Open Outlook after deleting corrupted rules

Return to the user’s Outlook from which you removed the corrupted inbox rules. You might get a warning prompt, like the below example.

The rules on this computer do not match the rule on Microsoft Exchange. Only one set of rules can be kept. You will usually want to keep the rules on the server. Which rules do you want to keep?

If you can’t see a warning prompt, go to File > Manage Rules & Alerts.

  1. Select Server
Keep the rules on the server in Outlook manage rules and alerts

The Rules and Alerts window opens.

  1. Verify that the rules section is empty
  2. Click OK
Deleted all corrupted hidden Exchange mailbox rules in Outlook

You successfully deleted all hidden and corrupted rules in Outlook.

Import set of rules in Outlook

Now you can import the rules you saved as a backup earlier.

How to import rules in Outlook:

  1. Open Outlook app
  2. Go to File
  3. Click Manage Rules & Alerts
  4. Click Options
  5. Click Import Rules
Exchange inbox Outlook to import rules
  1. Find and select the .rwz file you saved earlier
  2. Click Open
  3. Click OK to save the rule
Exchange inbox import rules .rwz file in Outlook

That’s it!

Read more: Manage focused inbox in Microsoft 365 using PowerShell »

Conclusion

You learned how to find and delete corrupted hidden Exchange inbox rules using MFCMAPI. First, the user needs to export Outlook rules to save it as a backup. Then download the MFCMAPI tool to access the user’s Outlook inbox and permanently delete all the corrupted rules. When the user opens Outlook, they can import the backup.

Did you enjoy this article? You may also like Fix Outlook error 500 repeating redirects. Don’t forget to follow us and share this article.

o365info Team

o365info Team

This article was written by our team of experienced IT architects, consultants, and engineers.

This Post Has 10 Comments

  1. Thank you so much, this detailed guide was so helpful. Our OutofOffice software seems to have created one hidden/corrupted forwarding rule. I was able to remove it.

  2. THANKS SO MUCH for this detailed solution. Grateful for people like you who take the time to lay this out so clearly that even a non-techie like me can figure it out.

  3. I am following your article.

    In my case I don’t see IPM.Rule.Version2.Message. Instead I have “IPM.ExtendedRule.Message” option.

    Do I delete it?

    Regards,

    Jyothi

    1. Hi Jyothi,

      I had the same issue, managed to get around this a different way and not using MFCMAPI.

      Give yourself Full Access to the mailbox and then create an Outlook profile with the mailbox as the primary email address. Set your mail profile to prompt you to choose which one opens when you start Outlook.

      Once you’ve done this you can run “Outlook.exe /cleanviews” and then it deletes all the mail rules including the hidden ones.

      Obviously if there are legitimate rules export these before doing this, when you import them again it doesn’t import the broken hidden rule.

      Thanks,
      Adam

  4. I also experience this problem; my upgraded Outlook (2016) remembers a rule from a previous email address and is sending all my current emails to my old employer (which was used at the old employer as a backup email file). I did not have a message class file called IPM.Rule.Version2.Message, but instead deleted a file I thought would apply “IPM.ExtendedRule.Message”. I hope I haven’t messed something else up by permanently deleting the Extended Rule file. What do I do if the IPM.Rule.Version2.Message file does not exist?

Leave a Reply

Your email address will not be published. Required fields are marked *