Andy Balaam wrote:
> [9398] dbg: bayes: tie-ing to DB file R/O /etc/spamassassin/bayes_toks
> [9398] warn: bayes: cannot open bayes databases
> /etc/spamassassin/bayes_* R/O: tie failed: Permission denied
> [9398] dbg: bayes: untie-ing DB file toks
<snip>
> [9398] dbg: bayes: not scoring message, returning undef
> [9398] dbg: bayes: opportunistic call attempt failed, DB not readable
> [9398] error: bayes: locker: safe_lock: cannot create tmp lockfile
> /etc/spamassassin/bayes.lock.10.0.1.2.9398 for
> /etc/spamassassin/bayes.lock: Permission denied

I tracked this down to the fact that because the spamd process changes
its own effective userid and groupid manually, it was not enough for
spamd to be a member of the spam-reporters group (which had permissions
on the relevant files and dirs), I had to explicitly tell spamd to
change its group to be spam-reporters at the same time it changed its
user from root to spamd.

I did this by modifying my /etc/default/spamassassin file so that the
OPTIONS line looked like this:

OPTIONS="--create-prefs --max-children 5 --username spamd --groupname
spam-reporters --helper-home-dir ${SAHOME} -s ${SAHOME}spamd.log"

(all one line)

Then, when I restarted spamd, I finally started getting BAYES_ tags in
my incoming emails!

Thanks for your help Theo, it pointed me on my way very nicely.

Andy

Reply via email to