Recently I started to come across more Intelligent Message Filter installations having problems with emails not moving to the Junk Email folder. Verifying the configuration is usually the first step. Things like:
However sometimes everything is correctly configured, but the Junk Email folder just won't work.
In IMF a server-side rule performs the movement of emails to Junk. For Outlook 2003 users this rule is created when Outlook logs onto the mailbox for the first time. Otherwise this is created when the Junk E-mail settings are configured at OWA.
When nothing else works, deleting and recreating this rule can be the solution to fix the Junk Email folder. We do this using the MAPI Editor, a download included with the Exchange Server 2003 Tools.
MAPI Editor Prerequisites
The MAPI Editor requires direct access to the Exchange mailbox having Junk Email problems. As the name implies it uses MAPI, an interface that is readily available with Outlook.
Outlook 2003 users will need to make sure that the client is not running in cached mode. The steps for disabling cached mode are described at the end of the article.
Users whose only email client is OWA are likely to be missing MAPI. We can make up for this by installing Outlook or the Exchange MAPI Client. Microsoft is today providing the latter for free with the Exchange Tools. This is good, as we don't have to worry about Outlook licensing.
To get the MAPI client go again to the Exchange Server 2003 Tools. From here scroll down to 'Exchange MAPI Client and Collaboration Data Objects 1.2.1' and start the download. Install this on the machine where the MAPI Editor is to be run. On completing installation no new applications become visible. We just get the MAPI interface, which is all we need.
Recreating the Junk E-mail Rule
Once all prerequisites are in place we can focus on getting the Junk Email rule recreated.
Move the MAPI Editor download to the client machine from which the mailbox is to be accessed. Running the executable will extract the files mfcmapi.exe, mfcmapi.doc and eula.rtf
Run the just extracted mfcmapi.exe to start the editor.
Click OK on the Welcome dialog to get to the main application interface.
Next Logon to the mailbox from Session | Logon and Display Store Table
If the logon pops an error it is likely MAPI is not in place. This is what you get for skipping the MAPI Editor Prerequisites section!
If MAPI is installed but no profiles are configured, the profile configuration wizard comes up. Configure a profile to the mailbox having problems.
Otherwise if profiles are in place, we get the profile selection dialog. Select the MAPI profile and click OK to Logon.
MAPI Editor will now list the profile mailboxes. Double click on the mailbox of interest.
MAPI Editor opens a new dialog showing the internal mailbox folder structure. At the left pane tree collapse the Root Container node. Here amongst others we should see 'Deferred Action' and 'Top of Information Store' as shown below:
If the MAPI Editor does not show the same folder structure as below, and shows a node named "IPM_SUBTREE", then the client is using Outlook 2003 cached mode. In that case, close the MAPI Editor, disable cached mode and restart the procedure. See the end of this article for a step-by-step procedure on disabling cached mode.
Collapse the 'Top of Information Store' to display the standard set of folders that Outlook displays. From here select the Inbox folder.
Right-Click the Inbox and select 'Open Associated Contents Table'. This is where the Rule to move emails to Junk is located.
If running Outlook 2003, we will typically be able to immediately identify the entry of interest from the subject 'Junk E-mail Rule' as shown below.
However if we don't see any of the rules with this subject (as is the case for OWA users) we can still identify the rule from its properties:
From the upper pane select the item to inspect. The lower pane will list the properties for the selected item.
Scroll through the properties looking at the 'Value' column. The Junk E-mail Rule will have one value reading 'JunkEmailRule' without any spaces between words.
If found, we almost certainly identified the rule. As a further confirmation, look for the property named PR_MESSAGE_CLASS and make sure this is set to the value IPM.ExtendedRule.Message
Once identified, make sure the Junk E-mail Rule is selected and from the title menu select Actions | Delete Message.
This will open the Delete Item dialog. From here change the selection to 'Permanent delete passing DELETE_HARD_DELETE (unrecoverable)' and click OK.
The Rule is now deleted. We can close the MAPI Editor.
Opening Outlook 2003 now should automatically recreate this rule. This enables the Junk Email folder for IMF and for Outlook 2003 client side anti-spam filter.
If using OWA or earlier Outlook versions, we need to enable this manually from OWA:
Open the mailbox using OWA
Select Options
Scroll down to the Privacy and Junk E-mail Prevention settings.
Set the Filter Junk E-Mail checkbox
Click Save and Close to save changes.
Disable Outlook 2003 Cache Mode
Here is a walk through disabling Outlook 2003 cache mode:
From Outlook 2003 select: Tools | E-mail Accounts...
Select 'View or change existing e-mail accounts...' and click Next
Click Change to edit the Exchange Email Account settings.
From here clear the 'Use Cached Exchange Mode' checkbox.
On clicking Next, a dialog will prompt us that Outlook should be restarted. Click OK and Finish to save changes.
Close Outlook when ready.
References
Tools for Exchange Server 2003 (sorted by name)
Enabling/Disabling the Junk Email Folder
When IMF Skips Email Processing
IMF SCL Configuration - getting it right
How to delete corrupted and hidden rules from a single mailbox in Outlook 2003