Mail::...ircuit(3pm)

πŸŽ€ NAME πŸŽ€

Mail::SpamAssassin::Plugin::Shortcircuit β€” short-circuit evaluation for certain rules. πŸ’…

Yes bestie, this is the one that goes "okay we found the thing, everybody else sit DOWN" and skips all the other pending rules. This page lives in the User Contributed Perl Documentation, and it's the manual for the Mail::SpamAssassin::Plugin::Shortcircuit plugin (the header truncates it to Mail::...ircuit(3pm) because Unicode girlies need their space, apparently πŸ¦‹).


✨ SYNOPSIS ✨

loadplugin     Mail::SpamAssassin::Plugin::Shortcircuit

report Content analysis details:   (_SCORE_ points, _REQD_ required, s/c _SCTYPE_)

add_header all Status "_YESNO_, score=_SCORE_ required=_REQD_ tests=_TESTS_ shortcircuit=_SCTYPE_ autolearn=_AUTOLEARN_ version=_VERSION_"

🌸 DESCRIPTION 🌸

This plugin does simple, test-based shortcircuiting. That's the whole personality. πŸ’–

Shortcircuiting a test means: if that test gets hit, all the other pending rules get skipped. The way that one rule just ends the conversation 😭. And on top of that, a symbolic rule named SHORTCIRCUIT will fire too β€” a little commemorative trophy, if you will πŸ†.

The recommended usage, straight from the source: use priority to set rules with strong S/O values (ie. 1.0) so they run first, and then make an instant spam or ham classification based on that. Immediate. Decisive. Main character energy. πŸ‘‘


πŸ’… CONFIGURATION SETTINGS πŸ’…

These are the settings that run the whole shortcircuit situation:

πŸ“ shortcircuit SYMBOLIC_TEST_NAME {ham|spam|on|off}

Shortcircuiting a test will force all other pending rules to be skipped, if that test is hit. Fr fr, everyone else is on read. πŸ™ˆ

Recommended usage: 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.

To override a test that uses shortcircuiting, you can set the classification type to off.

⚠️ Important note, bestie: DNS and other network lookups are launched when SA reaches priority -100. If you want to shortcircuit scanning before any network queries are sent, you need to set lower than -100 priority to any such rule β€” like -200, as in the examples below. Don't get caught slippin'. 🌐

A shortcircuited test will automatically be set to priority -200, but only if the original priority is unchanged at default 0. (If you moved it, it stays where you put it, periodt.)

  • on β€” Shortcircuits the rest of the tests, but does not make a strict classification of spam or ham. Instead it uses the default score for the rule being shortcircuited. So you could, for example, define a rule like this:
body TEST /test/
describe TEST test rule that scores barely over spam threshold
score TEST 5.5
priority TEST -200
shortcircuit TEST on

If a message hits that rule, the final score would be 5.5, as opposed to 100 (the default) if it were classified as spam. Way chiller. 😌

  • off β€” Disables shortcircuiting on said rule. Nothing to see here. 🚫
  • 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. In other words, it's equivalent to:
shortcircuit TEST on
priority TEST -200
score TEST 100
tflags TEST noautolearn
  • 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. In other words, equivalent to:
shortcircuit TEST on
priority TEST -200
score TEST -100
tflags TEST noautolearn nice

🧚 shortcircuit_spam_score n.nn (default: 100)

When shortcircuit is used on a rule, and the shortcircuit classification type is set to spam, this value should be applied in place of the default score for that rule. Slap a number here, it takes over. πŸ’―

πŸ¦‹ shortcircuit_ham_score n.nn (default: -100)

When shortcircuit is used on a rule, and the shortcircuit classification type is set to ham, this value should be applied in place of the default score for that rule. Same deal, opposite direction. 🌈

⭐ shortcircuit_min_ham_score n.nn (default: undef)

When shortcircuit_min_ham_score is set, SpamAssassin will stop processing when the total score will be lower than this value. Like, we're done here, nothing can save it now. πŸ’€

πŸ”₯ shortcircuit_max_spam_score n.nn (default: undef)

When shortcircuit_max_spam_score is set, SpamAssassin will stop processing when the total score will be higher than this value. Yeah it's spam, we don't need to keep reading. πŸ—‘οΈ


πŸ‘‘ TAGS πŸ‘‘

These tags get added to the set you can use in reports, headers, etc.:

  • _SC_ β€” shortcircuit status (classification and rule name) ✨
  • _SCRULE_ β€” rulename that caused the shortcircuit πŸ•΅οΈ
  • _SCTYPE_ β€” shortcircuit classification ("spam", "ham", "default", "none") πŸŽ€

🌈 SEE ALSO 🌈


okay that's the whole page bestie, you're literally a shortcircuit expert now πŸ’œ This lil doc came out of the User Contributed Perl Documentation, it's dated 2026-07-23, and it was built with perl v5.40.1. slay, bye!! πŸ’–βœ¨

πŸ“¦ where this page comes from