On Mon, 27 May 2019 19:38:55 -0500 Andy Howell wrote: > On 5/27/19 6:43 PM, Reindl Harald wrote: > > Am 28.05.19 um 01:05 schrieb Andy Howell: > >> 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> > > this line with the trailing slash is wrong anyways, they bayes_db > > is supposed to be the prefix of the files below > > /var/spool/postfix/spamassassin/ > > > Reindl Harald, > > I saw "path" and assumed it was a path, not a prefix. The --dbpath in > the sa-learn command is a path.
Not exactly, if you specify a directory here then the default file prefix bayes is added automatically. > I guess it should be /var/spool/postfix/spamassassin/bayes_db/bayes Yes, if you omit the prefix here it's simply invalid and you fall back to a value of '~/.spamassassin/bayes'. The '-u amavis' argument to sa-learn is wrong too, as this specifies a virtual mail user, not a unix user to run as. If you are not using per unix user files under ~/ you need to run sa-learn as the user that owns the global files. Do not run with 'bayes_file_mode 0775' as suggested in the howto. This is an ugly and insecure kludge to allow unix users to share a single database. Don't test as root as it will mask problems with permissions.