How to Use Microsoft Exchange Custom Weighting to Block More UCE

[Today's post comes to us courtesy of Rod White]

Lately, SBS customers have been reporting receiving a large amount unsolicited commercial e-mail (UCE) within Outlook referencing e-cards, greeting card, and postcard from family, friends and mates.  Today's post will cover using a Exchange IMFv2 feature called Custom Weighting that allows filtering on words or phases within the Subject, Body, or Both. Below are the steps to enable the feature within Exchange 2003 with Service Pack 2 IMFv2:

  1. Open Exchange System Manager and expand Global Settings. Right-click on Message Delivery and select Properties.
    image

  2. Select the Intelligent Message Filtering Tab. Select the SCL levels for the “Gateway Blocking Configuration” and “Store Junk E-mail Configuration”. Also select what you would like to happen with the mail option: Archive, Delete, No Action, Reject.
    image 
    If the Archive Option is selected you will find the archive mail in the following location: C:\Program Files\Exchsrvr\Mailroot\vsi 1\UceArchive

    To learn more about the SCL settings look at the following document. Microsoft Exchange Server Intelligent Message Filter v2 Operations Guide: https://www.microsoft.com/downloads/details.aspx?familyid=B1218D8C-E8B3-48FB-9208-6F75707870C2&displaylang=en

  3. Within Exchange System Manager expand Servers>Servername>Protocols>SMTP> Default SMTP Virtual Server. Highlight SMTP Virtual Server and right-click and select properties.
    image

  4. General Tab selected click the advanced button. Highlight the All Unassigned and edit.
    image

  5. Check the “Apply Intelligent Message Filter” and select Ok
    image

  6. Now that we have IMF filters enabled and properly configured let’s look at the Script on the server for Customweight Entry.
    image

  7. Save the file as MSExchange.UceContentFilter.xml Save the file in the C:\Program Files\Exchsrvr\bin\MSCFV2 directory. The MSExchange.UceContentFilter.xml file MUST be saved as UNICODE.
    This is a very important step if the file is not saved a Unicode it will NOT work.
    image

  8. Register the Msexchange.UceContentFilter.dll file on the server from a command prompt using the following command "regsvr32 c:\program files\exchsrvr\bin\mscfv2\msexchange.UceContentFilter.dll"
    image

  9. Once you get the dll registered successfully restart the SMTP service.

  10. Test email to see if the IMF filters the message. This can be done by enabling Message Tracking within exchange and looking to see if the message is (1) in the UceArchive directory or (2) within message tracking.
    image