Mail::...::Bayes(3pm)
π NAME π
Mail::SpamAssassin::Plugin::Bayes β bestie, this is the plugin that figures out how spammish your mail is using a Bayesian classifier π¦
β¨ DESCRIPTION β¨
Okay so this is a Bayesian-style probabilistic classifier (yes, probabilistic, we love a little math moment π₯), and it runs on an algorithm based on the one Paul Graham laid out in his A Plan For Spam paper, which lives right here:
http://www.paulgraham.com/spam.html
It also steals some other bits and pieces from Graham Robinson's webpage about the whole thing, over at:
http://radio.weblogs.com/0101454/stories/2002/09/16/spamDetection.html
And it's got the chi-square probability combiner too, as described here:
http://www.linuxjournal.com/print.php?sid=6467
Then all of those results get folded into SpamAssassin as the BAYES_* rules. It's giving iconic, honestly π
π USER SETTINGS π
bayes_stopword_languageslang β (default:en)
This one decides which languages are switched on for bayes stopwords processing. Every language comes with a default stopwords regexp, and any token that matches that regular expression will not be considered during bayes processing π
Wanna add custom regular expressions for extra languages? You can define them in local.cf. No cap. π
You do that by using the bayes_stopword_lang keyword, like so:
bayes_stopword_languages en se
bayes_stopword_en (?:you|me)
bayes_stopword_se (?:du|mig)
Heads up: these regexps are case-insensitive and they get anchored automatically at the beginning and at the end π
And if you want stopwords usage gone, just say bayes_stopword_languages disable. Simple as that.
Only onebayes_stopword_languagesorbayes_stopword_xxconfiguration line can be used. A new configuration line will override the old one β for example, the ones from the SpamAssassin default ruleset (60_bayes_stopwords.cf). So don't be shocked when your old line just... vanishes bestie π
bayes_max_token_lengthβ (default:15)
This sets the maximum number of characters a token is allowed to contain. That's it, that's the whole vibe β¨
That's the whole thing, my love β go forth and classify πΈ
perl v5.40.1 Β· 2026-07-23 Β· mwah, tiny sign-off, you're welcome π«Ά
π¦ where this page comes from
- ubuntu stonking: spamassassin 4.0.2+svn1935691-1build1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms