spamassassin-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Hardin <>
Subject Re: training bayes database
Date Tue, 08 May 2018 19:08:24 GMT
On Tue, 8 May 2018, Matthew Broadhead wrote:

> system setup centos-release-7-4.1708.el7.centos.x86_64, 
> spamassassin-3.4.0-2.el7.x86_64, amavisd-new-2.11.0-3.el7.noarch
> /etc/mail/spamassassin/
> required_hits 5
> report_safe 0
> rewrite_header Subject [SPAM]
> use_bayes          1
> bayes_auto_learn   1
> bayes_auto_expire  1
> # Store bayesian data in MySQL
> bayes_store_module Mail::SpamAssassin::BayesStore::MySQL
> bayes_sql_dsn       DBI:mysql:sa_bayes:localhost:3306
> it is storing the info to the database ok.  but it doesn't seem to be 
> filtering any mail.

(1) What is the output of:     /usr/bin/sa-learn --dump magic

(2) What user are you running sa-learn as for training, and what user is 
spamd running as?

(3) Are you seeing any BAYES_nn rule hits on messages at all, on either 
ham or spam?

(4) How large is your environment (rough # and diversity of users)?

I'm not familiar with SQL Bayes, others may have other 

Some general comments:

I don't recommend using auto-learn for initial bayes training at least, 
particularly in smaller environments. Manual initial training with careful 
review, followed by manual training of misclassifications after review, is 
more reliable. Others may offer different advice, particularly for large 
installs with a diverse user community (which I don't manage).

Always keep your training corpora so that you can review and fix training 
errors, and wipe and retrain from scratch if Bayes goes completely off the 
rails for some reason.

If you're not auto-learning, auto-expire is not needed. If you *are*, it's 
recommended to expire from a scheduled job rather than take the hit from 

  John Hardin KA7OHZ              FALaholic #11174     pgpk -a
  key: 0xB8732E79 -- 2D8C 34F4 6411 F507 136C  AF76 D822 E6E6 B873 2E79
   Gun Control enables genocide while doing little to reduce crime.
  Today: the 73rd anniversary of VE day
  • Unnamed multipart/mixed (inline, None, 0 bytes)
View raw message