This is an old revision of the document!
Statement | DefineRule |
---|---|
Version | 2.1.9+ |
Purpose | Defines a rule name, default weighting and description. See Rule names and weights |
The DefineRule statement requires a name, default weight and description, in the format
DefineRule "<name>" <default weight> "<description>"
Defining rules like this allows the filter script to be customisable by the user without them having to edit the script itself, as the rule weightings can be modified via Settings → Spam Filter → General → Rule Weights
in VPOP3's Administration Settings.
In Version 2.2.1 and later, you can have multiple 'default weight' values, the ${WeightBank} variable specifies which to use. If ${WeightBank} is 0, the first value is used, if it is 1, the second is used and so on. If ${WeightBank} is greater than the number of values for a particular rule, then the last one is used.
The following example defines a rule called 'surbl.org' with a default weighting of 1.2 and an associated description.
DefineRule "surbl.org" 1.2 "URL in message in multi.surbl.org"