On Mon, Jun 22, 2015 at 8:01 PM, Reindl Harald <h.rei...@thelounge.net> wrote: >> [root@www .spamassassin]# pwd >> /var/log/spamassassin/.spamassassin >> [root@www .spamassassin]# ls -la >> total 1100 >> drwx------ 2 spamd spamd 4096 Jun 22 19:42 . >> drwx------ 3 spamd spamd 4096 Jun 7 00:41 .. >> -rw------- 1 spamd spamd 45056 Jun 22 19:42 bayes_seen >> -rw------- 1 spamd spamd 1290240 Jun 22 19:42 bayes_toks >> -rw-r--r-- 1 spamd spamd 1869 Jun 7 00:41 user_prefs > > > i doubt that SA is using the bayes of root > so you just rain the wrong bayes
So with a default install (CentOS 7 in my case and I suspect pretty much all other systems), bayes will NOT just work by default unless you explicitly modify /etc/mail/spamassassin/local.cf to tell sa-learn to use the bayes db owned by spamd (/var/log/spamassassin/.spamassassin/bayes in my case) and NOT the one owned by root? However, I have done this: bayes_path /var/log/spamassassin/.spamassassin/bayes bayes_file_mode 0777 and after running sa-learn again (as root) on ham, my db is now broken: [root@www .spamassassin]# sa-learn --dump magic bayes: bayes db version 0 is not able to be used, aborting! at /usr/share/perl5/vendor_perl/Mail/SpamAssassin/BayesStore/DBM.pm line 208. bayes: bayes db version 0 is not able to be used, aborting! at /usr/share/perl5/vendor_perl/Mail/SpamAssassin/BayesStore/DBM.pm line 208. ERROR: Bayes dump returned an error, please re-run with -D for more information Can someone clue me in here? Everything is installed as user / group spamd and postfix is set to call spamassassin with user=spamd. And I assume I must run sa-learn as root so that it can access Maildir directories and that bayes_path tells sa-learn where the db is. So now what's the problem? Mike