This is where you can manage anti-spam rule scores.
warden --task=antispam:rules:rulescores --oper=<score_edit|score_del|rules_search|rules_update|rules_compile>
Option |
Value | Description |
|---|---|---|
--oper |
<string> | The operation you want to perform. Operations: score_edit, score_del, rules_search, rules_update, rules_compile |
--data_source |
<string> | The datasource file to use. Defaults to /etc/mail/spamassassin/local.cf |
--name |
<string> | The rule name to edit or search for. When searching you can use % to match wildcards. pattern - seach for the exact rule name equal to pattern. pattern% - search for a rule name starting with pattern. %pattern - search for a rule name ending with pattern. %pattern% - search for a rule name containing pattern. If no name provided will list all rules scores. |
--score |
<string> | The scores (separated by spaces). First score - Used when both Bayes and network tests are disabled. Second score - Used when Bayes is disabled, but network tests are enabled. Third score - Used when Bayes is enabled and network tests are disabled. Fourth score - Used when Bayes is enabled and network tests are enabled. Note: If you only provide the first score then it's always used, no matter the configuration. If you pass four scores, SpamAssassin picks which one to apply based on which features are active for that scan. This allows rule authors tune scores depending on what SpamAssassin knows at runtime. |
--reload |
<yes> | Reload the service after saving settings. |
// edit a custom rule score
warden --task=antispam:rules:rulescores --oper=score_edit --name='DCC' --score='3.25' --reload=yes
// delete a custom rule score
warden --task=antispam:rules:rulescores --oper=score_del --name='DCC' --reload=yes
// list all rule scores
warden --task=antispam:rules:rulescores --oper=rules_search
// list rules starting the pattern: URIBL
warden --task=antispam:rules:rulescores --oper=rules_search --name='URIBL%'
// list rules ending the pattern: PASS
warden --task=antispam:rules:rulescores --oper=rules_search --name='%PASS'
// list rules containing the pattern: BITCOIN
warden --task=antispam:rules:rulescores --oper=rules_search --name='%BITCOIN%'
// run sa-update to update rule scores
warden --task=antispam:rules:rulescores --oper=rules_update
// run sa-compile to re-compile rules
warden --task=antispam:rules:rulescores --oper=rules_compile