antispam:plugin:rulestatistics

Log real-time per-rule statistics for each email, allowing admins to easily analyze rule performance and identify false positives/negatives.

warden --task=antispam:plugin:rulestatistics
Option
Value Default Description
--use_rule_statistics <1|0> 1 Whether to log real-time rule statistics to the database.
--rule_statistics_sync_spam_levels <1|0> 1 Whether to sync the rule_statistics_spam_level and rule_statistics_spam_kill_level with the server wide policy spam levels. Disabling this option allows you to set a custom spam level and spam kill level. This is useful for testing different spam levels without actually changing them under the server wide policy.
--rule_statistics_spam_level <int> 7 The score required for the rule to be logged as spam. This should usually match the spam level set for the server wide policy.
--rule_statistics_spam_kill_level <int> 13 The score required for the rule to be logged as spam when using the "move" or "tag" spam actions with receive spam set to "no". Any score above the spam level but below the spam_kill_level will be treated as "spammy". This should usually match the spam kill level set for the server wide policy. If you are not using the spam kill level then set it to match the rule_statistics_spam_level.
--rule_statistics_log_rule <string1,string2> The rule names to log statistiscs for. If no entries are added then statistics will be logged for all rules.
--rule_statistics_log_rule_add <string> Add a single entry to rule_statistics_log_rule.
--rule_statistics_log_rule_del <string> Remove a single entry from rule_statistics_log_rule.
--rule_statistics_ignore_rule <string1,string2> The rule names to ignore and not log statistics for.
--rule_statistics_ignore_rule_add <string> Add a single entry to rule_statistics_ignore_rule.
--rule_statistics_ignore_rule_del <string> Remove a single entry from rule_statistics_ignore_rule.
--rule_statistics_log_sub_rules <1|0> 0 Whether to log statistics for sub-rules (meta rules starting with double underscores). This adds a lot more database logging so it is not normally recommended to enable on busy servers.
--default <yes> Reset all settings to their default values.
--default_option <option> Reset a specific setting to its default value.
--reload <yes> Reload the service after saving settings.

Examples

// set the rule_statistics_log_rule
warden --task=antispam:plugin:rulestatistics --rule_statistics_log_rule='ALL_TRUSTED,DCC' --reload=yes

// add an entry to rule_statistics_log_rule
warden --task=antispam:plugin:rulestatistics --rule_statistics_log_rule_add='DCC' --reload=yes

// delete an entry from rule_statistics_log_rule
warden --task=antispam:plugin:rulestatistics --rule_statistics_log_rule_del='DCC' --reload=yes

// reset rule_statistics_log_rule to its default value
warden --task=antispam:plugin:rulestatistics --default_option=rule_statistics_log_rule --reload=yes

// reset all settings to their default values
warden --task=antispam:plugin:rulestatistics --default=yes --reload=yes