How can I use the Shortcircuit plugin to reduce CPU load?

Important: The Shortcircuit plugin is recommended for advanced administrators only.

The Shortcircuit plugin can stop processing SpamAssassin rules once a specific rule is matched. Shortcircuiting a test will force all other pending rules to be skipped, if that test is hit (saving on CPU usage). In addition, a symbolic rule, SHORTCIRCUIT, will fire. Recommended usage is to use priority to set rules with strong S/O values (ie. 1.0) to be run first, and make instant spam or ham classification based on that.

Enable the Shortcircuit plugin in Warden

Navigate to Warden -> Settings -> Plugin Settings and check the Shortcircuit plugin and press the update button to save the page.

Shortcircuit

Adding Shortcircuit Rules

Shortcircuit rules can be added under Warden -> Settings -> Plugin Settings -> Shortcircuit -> Shortcircuit.

Shortcircuit

Format

SYMBOLIC_TEST_NAME {spam|ham|on|off}

Options

spam Shortcircuit the rule using a set of defaults; override the default score of this rule with the score from shortcircuit_spam_score, set the noautolearn tflag, and set priority to -200.
ham Shortcircuit the rule using a set of defaults; override the default score of this rule with the score from shortcircuit_ham_score, set the noautolearn and nice tflags, and set priority to -200.
on Shortcircuits the rest of the tests, but does not make a strict classification of spam or ham. Rather, it uses the default score for the rule being shortcircuited.
off Disables shortcircuiting on said rule.


Examples

If you have taken the time to correctly specify your Warden -> Settings -> Anti-spam Settings -> Network Settings -> Trusted networks you could shortcircuit the ALL_TRUSTED rule so that mail from the trusted networks is shortcircuited. Go to Warden -> Settings -> Plugin Settings -> Shortcircuit and set Shortcircuit to:

ALL_TRUSTED on

If you have a very well well-trained accurate Bayes database you could shortcircuit the BAYES_99 rule and/or BAYES_00 rule so that mail that Bayes thought was most definitely spam or ham is shortcircuited and all other tests would be skipped. Go to Warden -> Settings -> Plugin Settings -> Shortcircuit and set Shortcircuit to:

BAYES_99 spam
BAYES_00 ham
  • Shortcircuit, CPU, performance, optimize
  • 0 Los Usuarios han Encontrado Esto Útil
¿Fue útil la respuesta?

Artículos Relacionados

How can I change the interface language of the extension?

You can change the interface language under Settings -> Application Settings -> Locale...

How can I disable admin email notifications in Amavis?

Amavis has different default options for controlling where virus, spam, banned file attachments,...

How can I whitelist or blacklist a mail server from greylisting?

To Whitelist a Mail Server From Greylisting Navigate to Warden -> Settings ->...

How can I enable third party anti-virus signatures within Warden to improve the ClamAV detection rate?

Warden supports enabling third party anti-virus signatures to improve the detection rate. These...

How can I setup a local caching DNS resolver to speed up DNS queries used by Amavis?

Run the following command to check if local DNS caching is enabled: host -tTXT...