MailScanner prevents bayes mysql autolearn

ADMX - Antal Delahaije antal at admx.nl
Wed Jun 10 21:20:45 UTC 2015


Hi,

I've configurerd the latest MailScanner 4.85.2 in combination with MailWatch 1.2.0 beta 8. Everything works fine except for bayes autolearning.

If I set 'SpamAssassin User State Dir = /var/spool/MailScanner/spamassassin' the bayes files are written into this directory but it also creates a journal which always is created with 0600 permissions thus MailWatch cannot access this journal until I manually set permission to 0660. This journal merges with the bayes database and a new file with the same 0600 permissions is created. Whatever I do to this folder permissions or set in MailScanner.conf, it always is permission 0600.

Then I figured out bayes can also write to MySQL database so I've configured something like below in my spam.assassin.prefs.conf.

bayes_store_module Mail::SpamAssassin::BayesStore::MySQL
bayes_sql_dsn      DBI:mysql:sa_bayes:127.0.0.1:3306
bayes_sql_username sauser
bayes_sql_password password
bayes_sql_override_username postfix

This works great for all e-mails I manually learn with 'sa-learn -p /etc/MailScanner/spam.assassin.prefs.conf --ham/--spam file' command or I learn from the MailWatch frontend, no more errors here!

After a while I noticed MailScanner said it was autolearning but still creating the local bayes files in '/var/spool/MailScanner/spamassassin'. I tried disabling the 'SpamAssassin User State Dir' but this completely stopped autolearning.

I think MailScanner is somehow preventing spamassassin to autolearn via MySQL. Is this possible what I am doing via MailScanner? Maybe some misconfiguration?

Or does anybody know the solution to get autolearn working the conventional way?

Best regards,

Antal.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mailscanner.info/pipermail/mailscanner/attachments/20150610/1615dd3e/attachment.html>


More information about the MailScanner mailing list