User Tools

Site Tools


reference:spam_filter_rules

Spam Filter Rules

VPOP3 Versions 2.1.7 and later have a built-in spam filter system which supports a simple script language optimised for content- and spam-filtering of email messages.

This reference contains a definition of the spam filtering script language supported by VPOP3. Note that as later versions of VPOP3 are released, more language features may be added, so this reference indicates in which version of VPOP3 a particular feature was added.

Language Introduction

The VPOP3 Spam Filter scripting language is a very basic language designed to make it easy to implement message content filtering tasks.

The language supports basic variables, conditional statements, simple loops, jumps, tests on message content, and simple actions to perform on the messages.

The language is intended to be used by advanced users with some programming experience. VPOP3 comes with a pre-configured spam filter script, and it is recommended that you use that, and modify the configuration of that script using the Settings → Spam Filter (Utilities → SpamFilter in version 2) settings pages unless you are willing and able to modify and create a program using the filtering language.

If you do need to create custom spam filter scripts and want us to do it for you, that is possible, but it is not covered by our standard support services. If you contact us with details of what you want to do, we can tell you how much it will cost for us to do it.

Spam Filter Rules Files

VPOP3 reads the spam filter rules from the spamrules.txt file in the VPOP3 folder on the VPOP3 server's hard disk.

This file can include other files by using the include statement.

For instance, the default spamrules.txt file contains the statements

include spamrules_initialise.txt
include spamrules_userlocal.txt
include spamrules_localmail.txt
include spamrules_userchecks.txt
include spamrules_checks.txt
include spamrules_userprocess.txt
include spamrules_processresults.txt
include spamrules_userfinal.txt

This means that VPOP3 reads the spamrules_initialise.txt, spamrules_userlocal.txt, spamrules_localmail.txt, spamrules_userchecks.txt, spamrules_checks.txt etc files in the specified order.

The standard spam filter rules files that are distributed with VPOP3 are:

  • spamrules.txt - this is the main file, which, by default, includes the other files
  • spamrules_initialise.txt - this contains the initialisation of some variables which must come first in the script
  • spamrules_localmail.txt - this contains some standard rules to process messages sent by local users, for instance to add recipients of locally sent mail to the whitelist, process messages to 'notspam@' and 'spam@' etc
  • spamrules_checks.txt - this contains all the spam tests
  • spamrules_processresults.txt - this contains the standard behaviour to perform depending on the calculated spam 'score'

These above files may be overwritten by future installations of VPOP3 and by the update procedure of the Spam Filter subscription.

The spamrules_user*.txt files are for adding your own customised script entries, without them being overwritten by future installations of VPOP3.

Language reference

Statements

Examples

reference/spam_filter_rules.txt · Last modified: 2018/11/14 10:45 (external edit)