Customize Outlook View based on SpamAssasin’s tagging

Uncategorized

Read on if you use IMAP and Outlook and your IMAP account is configured to use SpamAssasin and it is configured with SpamBox. SpamAssasin can be instructed to put all mails that it tags as SPAM into a different spam folder. If you use Outlook, you might want to review this folder and check for false positives. Since I get almost 200-300 spam messages each day, it becomes difficult to browse through the spam folder looking for false positives. I would prefer some way to see messages that fall in the category of “MaybeSpam” – these messages would have SPAM scores upto a certain threshold. I have personally set up my account to treat anything above 2.2 to be SPAM and I personally consider a score between 2.3 to 10.0 to be “MaybeSpam” since I often end up with false positives in that range.
So I defined a view in Outlook that only shows me messages that have a higher probability of being false positives and hides all messages which get a very high spam score.

You may use this filter for the view for looking at your Spam folder. It is simple to set it up:

       

  1. Browse to your SPAM folder in Outlook
  2.    

  3. View > Current View > Define Views …
  4.    

  5. Click on “New…” and select the table type. You can name it as “MaybeSpam”
  6.    

  7. Click on “Ok” and you will be presented with a “Customize View” window
  8.    

  9. Click on “Filter” and move to the tab called “SQL”. Check the box called “Edit these criteria directly …”
  10.    

  11.       Copy and paste the following text into that window [Note: you might have to use CTRL+V since context menus are disabled in that window]
       

    "urn:schemas:httpmail:subject" LIKE '%**SPAM**2.%'
    OR
    "urn:schemas:httpmail:subject" LIKE '%**SPAM**3.%'
    OR
    "urn:schemas:httpmail:subject" LIKE '%**SPAM**4.%'
    OR
    "urn:schemas:httpmail:subject" LIKE '%**SPAM**5.%'
    OR
    "urn:schemas:httpmail:subject" LIKE '%**SPAM**6.%'
    OR
    "urn:schemas:httpmail:subject" LIKE '%**SPAM**7.%'
    OR
    "urn:schemas:httpmail:subject" LIKE '%**SPAM**8.%'
    OR
    "urn:schemas:httpmail:subject" LIKE '%**SPAM**9.%'
    OR
    "urn:schemas:httpmail:subject" LIKE '%**SPAM**10.%'
    OR
    "urn:schemas:httpmail:subject" LIKE '%**SPAM**11.%'
    

       

  12.    

  13. Click “Ok” and click “Ok” again.
  14.    

  15. You have just made yourself a new view which will only show you messages whose SpamAssasin score is between 2.0 to 11.9

Feel free to change the values of the numbers in the ‘LIKE’ clause in the SQL statments to suit your setting. Hope it works for everyone.