How do I get spamassassin to honor the setting of bayes_path in
/etc/spamassassin/local.cf ?
bayes_path /var/spool/postfix/spamassassin/bayes_db
It never gets used. I can get sa-learn to create the files there by
specifying the path:
sa-learn --username=amavis
--dbpath=/var/spool/postfix/spamassassin/bayes_db/ <maildir path>
But without it:
sa-learn --username=amavis --dump magic
ERROR: Bayes dump returned an error, please re-run with -D for more
information
Specifying the path shows the sa-learn worked:
sa-learn --username=amavis
--dbpath=/var/spool/postfix/spamassassin/bayes_db/ --dump magic
0.000 0 3 0 non-token data: bayes db version
0.000 0 83126 0 non-token data: nspam
0.000 0 3206 0 non-token data: nham
0.000 0 2610795 0 non-token data: ntokens
0.000 0 1390571060 0 non-token data: oldest atime
0.000 0 1558992503 0 non-token data: newest atime
0.000 0 1516395140 0 non-token data: last journal
sync atime
0.000 0 1558984675 0 non-token data: last expiry atime
0.000 0 17058550 0 non-token data: last expire
atime delta
0.000 0 445687 0 non-token data: last expire
reduction count
If I try to test known spam email with spamassassin on the command line,
it ignores the bayes_path setting.
spamassassin -D -t < spam.email
Gives the message:
bayes: no dbs present, cannot tie DB R/O: /root/.spamassassin/bayes_toks
I am using:
postfix 3.3.0-1ubuntu0.2
amavisd-new 1:2.11.0-1ubuntu1.1
spamassassin 3.4.2-0ubuntu0.18.04.1
Thanks,
Andy