User Tools

Site Tools


reference:spamrules_statement_definesetting

Spam Filter Rules: DefineSetting

Statement DefineSetting
Version 2.1.9+
Purpose Defines a generic setting, the default value and description

The DefineSetting statement requires a name, default value and description, in the format

DefineSetting "<name>" <default value> "<description>"

Defining settings like this allows the filter script to be customisable by the user without them having to edit the script itself, as the rule settings can be modified via Settings → Spam Filter → General → Script Configuration in VPOP3's Administration Settings.

Settings can be referred to in the script by using the variable name ${setting_<settingname>}.

Examples

Defining a setting

DefineSetting Redirect "" "The user to redirect detected spam to (leave blank for none)"

Entering a setting value into the log file

#This logs the 'Redirect' setting value
Log "${setting_redirect}"
reference/spamrules_statement_definesetting.txt · Last modified: 2018/11/14 10:45 by 127.0.0.1