antispam:rules

This is where you manage custom anti-spam rules.

warden --task=antispam:rules --oper=<rule_add|rule_del|rules_check|rules_debug|rules_update|rules_compile> 
Option
Value Description
--oper <string> The operation you want to perform. Operations: rule_add, rule_del, rules_check, rules_debug, rules_update, rules_compile
--data_source <string> The datasource file to use. Defaults to /etc/mail/spamassassin/local.cf
--name <string> A test name, consisting of up to 22 uppercase letters, numbers, or underscores. Names that begin T_ refer to rules in testing.
--description <string> A more verbose description of the test, which is used in the reports generated by SpamAssassin. Typically, descriptions are up to 50 characters long.
--type <string> An indication of where to look. Tests can be applied to the message headers only, the message body only, uniform resource identifiers (URIs) in the message body, or the complete message. Types: body, header, mimeheader, uri, rawbody, full, meta, uri_block_cc, uri_block_cont, uri_block_cidr, uri_block_isp, uri_block_exclude
--value <string> A description of what to look for. Tests can specify a header to check for existence, a Perl regular expression pattern to match, a DNS-based blacklist to query, or a SpamAssassin function to evaluate.
--score <string> A score or scores for the test. Tests can have a single score that is always used, or they can have separate scores for messages that test positive under each of a set of conditions.
--tflags <string> Used to set flags on a test. These flags are used in the score-determination back end system for details of the test's behaviour.
--priority <int> Assign a specific priority to a test. All tests, except for DNS and Meta tests, are run in priority order. The default test priority is 0 (zero).
--reload <yes> Reload the service after saving settings.

Examples

warden --task=antispam:rules --oper=rule_add --name='__IS_REDIRECT' --type=header --value='Return-Path =~ /^<SRS0/i'
warden --task=antispam:rules --oper=rule_add --name='REDIRECT_SPAM' --type=meta --value='(__IS_REDIRECT && __IS_ALREADY_SPAM)' --description='Set a high score for spam mail redirects' --score=100 --reload=yes