Back to list

How to filter email

Procmail is a server side email filter. It is extremely flexible, but has an obscure configuration syntax which some find confusing. At Vex.Net we have created a tool to make setting up procmail configs simple.

To use this tool, log into the control panel and select "Email Filters." There are three sections on that page although you won't see the third section until you have created at least one "recipe" as described below.

Section 1 is general options. There is a short description on the page. Here are some more complete ones.

  • Skip dups
    This will create a recipe to check your email for duplicates and delete all but the first copy of a message. This is useful if you are on mailing lists and someone sends a message to the list with a copy directly to you. This option will filter out the redundant copy.
  • Spamassassin
    This option will turn on Spamassassin processing on your email. All email to your account will be processed and if it determines that it is spam it will be delivered to your Spam/sure folder. See "Delete spam" option below for an alternative action. You can add email addresses to your whitelist in the control panel to skip Spamassassin for those addresses. Spamassassin also honours your blacklist also set up in the control panel.
  • Bogofilter
    This option will turn on Bogofilter. Bogofilter is another spam processing tool but it can be "trained." On Vex.Net you train Bogofilter by copying email into Spam/ham to tell it what you consider NOT spam and Spam/spam to tell it what you do consider spam. The system will process those messages and then move them into your INBOX.

    Bogofilter save anything that it considers spam in Spam/sure. In addition, it will save borderline spam in Spam/unsure. You should check Spam/sure for false positives and move messages to Spam/ham or delete it as appropriate. Email in Spam/unsure should always be sorted into Spam/ham or Spam/spam to train it. Don't forget the whitelist as well. Whitelisted addresses also skip Bogofilter processing.

    There is no problem turning on both Spamassassin and Bogofilter.

  • Delete spam
    We said above that confirmed spam is saved in Spam/sure. This option allows you to completely delete confirmed spam instead. You should not check this box until you are sure that whitelisting and training have got to the point where nothing but spam lands in Spam/sure.
  • Spamassassin score
    Spamassassin uses a scoring system. Various aspects of a message are scored and if the total is higher than this number it is classified as spam. It defaults to 5. This field will accept a decimal number but will only store one decimal place. Changes to this field will only become effective on the following day.

The next section allows you to create "recipes" for handling situations that don't quite fit whitelisting, blacklisting, Spamassassin or Bogofilter. This section is a bit more complicated. Luckily the above options along with whitelisting and blacklisting will probabyl cover 99% of your needs. You can also edit recipes here. Here are the different fields.

  • Header
    Select the email header that you want to test against. If there is a header that you want to test against that isn't in the drop down then let us know. here are two special "headers", one to test against all of the headers and one to test against the body of the message.
  • Expression
    This is the expression to test for. This could be an email address or subject line, etc.
  • Disposal
    This is what the system does with the message if there is a match. You can put a folder name here such as "Work" or "Hobbies/trains". You can put an email address here to have the message remailed to another address. You can use the special destination "$NULL" to simply delete the matched message.

    There is another special destination "$JOIN" which allows you to combine more than one recipe. If this destination is used then it combines with the following recipe. You can have as many joins as you like. The final, non-join disposal is used if all of the expressions match.

  • When
    This determins when the recipe is run. If not checked (the default) then the recipe is run after any spam processing has completed. If you have an address that is extra important (e.g. sales@...) you may elect to set this flag so that you get all mail to that address no matter whether it is spam or not.

If you have any recipes defined then there will be a third section listing them in the order that they will be run. If the order is important you can move them up and down with the arrows beside the entries. If you have joined recipes they will be moved as a unit. You can also edit your recipes by clicking on the "Edit" link. While editing you can delete a recipe by clearing the Disposal field.

Recent News


2013-03-02
New database server

We have been making improvements to the web...
[ more]


2013-02-27
Scam alert - Domain Registry of Canada

It seems that these guys just won't go away....
[ more]


2013-02-04
New feature on Vex.Phone - SIP address

There is a new feature on the Vex.Phone VoIP...
[ more]


2012-11-20
Mail server installation

The new email server is ready to deploy. It is...
[ more]