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_languages lang β€” (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 one bayes_stopword_languages or bayes_stopword_xx configuration 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