This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
reference:spamrules_statement_definerule [2011/08/23 10:49] – created simon | reference:spamrules_statement_definerule [2018/11/14 10:45] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 5: | Line 5: | ||
The **DefineRule** statement requires a name, default weight and description, | The **DefineRule** statement requires a name, default weight and description, | ||
- | DefineRule "< | + | DefineRule "< |
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 '' | 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 '' | ||
Line 11: | Line 11: | ||
In Version 2.2.1 and later, you can have multiple ' | In Version 2.2.1 and later, you can have multiple ' | ||
+ | It is unusual to define more than two default weights, as these are commonly just used for deciding whether or not the message has a high Bayes score. | ||
- | =====Example===== | + | |
+ | =====Examples===== | ||
The following example defines a rule called ' | The following example defines a rule called ' | ||
< | < | ||
DefineRule " | DefineRule " | ||
</ | </ | ||
+ | |||
+ | |||
+ | The following example defines a rule called ' | ||
+ | < | ||
+ | DefineRule " | ||
+ | </ | ||
+ | |||
+ | =====Using===== | ||
+ | When adding values to the spam score variable: ${Score}, you can tell VPOP3 to associate that score change with the rule, by adding the rule name in square brackets afterwards, for instance | ||
+ | |||
+ | ${Score} += 50 [MyMultipleWeightRule] |