Add an X- field to let Outlook clients automatically deal with spam

Praetor has an optional action to add X- fields into the message headers.  This ability represents an interesting potential for server-client cooperative processing of email messages.  Praetor will first filter the email messages and tag it with an appropriate X- field, then pass it on to the Exchange server.  When the recipients' Outlook client email program retrieves the messages, it has its own rules and can enact upon the message to suit the recipients' own needs.

A good example to illustrate this capability would be to modify the anti-spam rules so that, instead of having Praetor quarantine the message, choose to accept the message and add to the message header a new X-field called "X-Praetor-Analysis" with its value set to be "Possible-spam".  Then on the recipient side, use the Outlook Rule Wizard to create a rule that automatically moves the message from the normal Inbox into a new subsidiary folder called "Possible spam".  This new folder can then be set with a property to be emptied automatically if older than 30 days.

Here are the steps to accomplish this using a sample anti-spam rule that tests for the From address being the same as the single To recipient address.

1.

On the Praetor machine, use the administration MMC snap-in to modify the anti-spam rule and then select the Actions tab.  Change the primary action from Quarantine to Accept the message and Flag the message as possible spam as the optional action.  You may also want to select Add the reason why the message was caught and Add name of the rule that caught the message action as illustrated below.

Adding the above three optional actions will add 3 lines into the message header in this order:

  1. X-Praetor-Analysis: Possible-spam

  2. X-Praetor-Reason: <text with specific reason how condition was met>

  3. X-Praetor-Rule: <name of rule that caught the message>

The bolded and underlined text will be replaced with the actual reason and rule name.

 

2.

On the recipient's Outlook client prior to the 2003 version, create a new subfolder beneath Inbox, calling it "Possible spam".  

Starting with Outlook 2003, a spam folder already exists off the root node and is called Junk E-mail, so you can skip this step.

 

4.

Use the Outlook Rules Wizard to create a new rule that applies whenever a message arrives.

 

5.

For the condition, select "with specific words in the message header".

For the specific words, enter the message header line and value.

 

6.

Next, specify the action for the Outlook rule — moving it to the specified folder.

Select the destination as the Possible-spam folder that was created in the earlier step or the Outlook 2003 Junk E-mail folder.

 

7.

Complete the rule by naming it appropriately.

 

 

This is a very specific example, but one that is quite useful if you want to give your users the ability to sift through potential spam for the non-spam messages.  It also shows the potential to use Praetor as part of a client-server process in dealing with email, specifically in the creation of automated email agents or robots often referred to as 'bots'.

There are several reserved keywords that can be used within the X-header field which represent variables for attributes (Subject, number of attachments, etc.) of the underlying message itself.  Click here to see the keyword list.