Intelligent Message Filter, Content Filter, can do more...

WinDeveloper IMF Tune
WinDeveloper IMF Tune

Fixing the Junk Email Folder the Hard Way

Alexander Zammit

Alexander Zammit Photo

A Software Development Consultant with over 20 years of experience. Many of his projects involved Exchange integrated applications, including a FAX server, a mail security product and anti-spam products.

  • Published: Apr 10, 2007
  • Category: Anti-Spam
  • Votes: 5.0 out of 5 - 2 Votes
Cast your Vote
Poor Excellent

There are cases where the Junk Email Folder functionality for the Intelligent Message Filter just won't work. If IMF is correctly configured, if the Junk Email folder is enabled, then it is time to use bad manners.

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.

  1. 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

  2. Run the just extracted mfcmapi.exe to start the editor.

  3. Click OK on the Welcome dialog to get to the main application interface.

  4. Next Logon to the mailbox from Session | Logon and Display Store Table

    Mailbox Logon

    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!

    MAPI Not Installed

  5. 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.

  6. MAPI Editor will now list the profile mailboxes. Double click on the mailbox of interest.

    Profile Store List

  7. 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.

Mailbox Root Container

  1. Collapse the 'Top of Information Store' to display the standard set of folders that Outlook displays. From here select the Inbox folder.

  2. Right-Click the Inbox and select 'Open Associated Contents Table'. This is where the Rule to move emails to Junk is located.

    Open Associated Contents Table

  3. 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.

    Junk E-mail Rule

    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:

    1. From the upper pane select the item to inspect. The lower pane will list the properties for the selected item.

    2. 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.

    3. 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

  4. Once identified, make sure the Junk E-mail Rule is selected and from the title menu select Actions | Delete Message.

  5. This will open the Delete Item dialog. From here change the selection to 'Permanent delete passing DELETE_HARD_DELETE (unrecoverable)' and click OK.

    Deleting Rule

  6. The Rule is now deleted. We can close the MAPI Editor.

  7. 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:

    1. Open the mailbox using OWA

    2. Select Options

    3. Scroll down to the Privacy and Junk E-mail Prevention settings.

    4. Set the Filter Junk E-Mail checkbox

    5. Click Save and Close to save changes.

    Enabling Junk E-mail Filtering

Disable Outlook 2003 Cache Mode

Here is a walk through disabling Outlook 2003 cache mode:

  1. From Outlook 2003 select: Tools | E-mail Accounts...

  2. Select 'View or change existing e-mail accounts...' and click Next

  3. Click Change to edit the Exchange Email Account settings.

  4. From here clear the 'Use Cached Exchange Mode' checkbox.

    Disable Outlook Cache Mode

  5. On clicking Next, a dialog will prompt us that Outlook should be restarted. Click OK and Finish to save changes.

  6. 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

User Comments - Page 1 of 1

Add New Comment...

Kirk Kiefer 11 Jul 2008 12:35
In response to Renet 123-

I got the same error, so I found and downloaded the Mapi Editor directly:

http://www.microsoft.com/DownLoads/details.aspx?familyid=55FDFFD7-1878-4637-9808-1E21ABB3AE37&displaylang=en

Worked just as the instructions said it would.
Alexander Zammit 23 Apr 2008 00:58
Have you got Outlook 2003 somewhere?

1. Connect this to the mailbox.
2. Go to Tools | Options | Junk Email
3. Set filtering level to Low
4. Save changes.

Check OWA now.
cscholz 23 Apr 2008 00:07
I've done every step from you article on an Exchange 2007 System. It works, but i've recognized the following Problem.

When I access the UserMailbox over OWA and go to the junk-e-mail options i've got the following error:

Problem beim Versuch, Ihr Postfach zu verwenden. Wenden Sie sich an den technischen Support für Ihre Organisation.
(Translation: problem while accessing your mailbox. Contact your...)

[...]

Call stack

Microsoft.Exchange.Data.Storage.JunkEmailRule.GetRuleFromServer()
Microsoft.Exchange.Data.Storage.JunkEmailRule..ctor(MailboxSession session)
Microsoft.Exchange.Data.Storage.MailboxSession.get_JunkEmailRule()
[...]

When i open the Mailbox with the Editor again, i can see that outlook hasn'h created the junkemail entry.

is there any solution.
Alexander Zammit 16 Apr 2008 08:45
Are you referring to the MAPI Client or MAPI Editor?

This procedure should not be performed directly on an Exchange server machine.

Furthermore the MAPI Client is only required if you don't have Outlook already installed. If you do then skip the MAPI client installation.
renet123 16 Apr 2008 07:38
I download the MAPI tool, and when installing, says that it is not compatable with my exchange 2003 install.. further reading, the download says: "This package will not install on a system on which any version of Microsoft Outlook or Microsoft Exchange Server 2003 or earlier is installed. "
Copyright © 2005 - 2020 All rights reserved. ExchangeInbox.com is not affiliated with Microsoft Corporation