Versions Compared


  • This line was added.
  • This line was removed.
  • Formatting was changed.


  • if you're running SA 2.5x, the 'middle ground' of Bayes scores – around the 0.5 mark, where the classifier didn't find enough info in the message to make a reliable determination – does not produce a rule hit. In other words, you won't see BAYES_40 or BAYES_50 listed in the rules-hit report. This is normal. SA 2.60, however, has tiny scores assigned for these rules, since this was becoming an FAQ. (wink)
  • SA 2.60 will only use Bayes if the DB_File perl module is installed. The package itself will install fine, but the Bayesian filtering parts will not be used (since SA can be run just fine without Bayes). Run "spamassassin -D --lint" and keep an eye out for a line like:
No Format
debug: bayes: Not available for scanning, DB_File not installed
  • you might be using spamd, and running 'sa-learn' as a different user. Check your /var/log/maillog syslog file, then the spamd switches and configuration, to see what username the mail is being scanned as. Obviously, if you learn messages into one user's database, the learning will not be used when scanning messages as a different user.
  • there's a minimum threshold on how many messages must be in the Bayes database, before SA will use it while scanning. By default, there must be 200 ham messages and 200 spam messages learned before it will be used.

This is a default, conservative setting; SA's Bayes is often used in an administration-free mode, and we determined experimentally that lower thresholds require more 'babysitting'.


No Format
sa-learn --ham --no-rebuild ham_directory
sa-learn --spam --no-rebuild spam_directory
sa-learn --rebuild