Hi All,
With the great help of Michel Valliancourt I managed to solve my
bayesian problem. Solution, for the archives, is below
On 26-sep-2006, at 21:13, Peter Teunissen wrote:
After having trained SA with sufficient amounts of ham & spam, I
have bayesian testing working. When I test it with spamassassin -D
< testmessage as root it works flawlessly. But, when postfix
invokes spamc with user filter, bayes always fails.
I tested this by running spamassassing -D < tesmessage as user
filter and saw some permission errors as shown in the debug output
at the end of this mail.
I see two things going wrong:
1. it tries to create userprefs for filter, not lethal I guess. How
can I keep SA from doing this when invoked from postfix? I use it
system wide, so no user prefs are needed. There's no option for
spamc mentioned in the manpage to make it run system wide only.
Turned out that since I created the user filter spamd runs as with /
dev/null for a home folder. Changed that to the directory where my
bayes db resides. Problem 1 solved.
2. More seriously, it cannot access /var/spool/spamassassin, so it
can't use the bayes DB or the whitelist. But this directory is
world readable and writable:
I had, due to a lack of knowledge on unix file permissions, not made
the directory accesible to the user SA runs at; it could read and
write the dir, but not execute. I changed the directory so it is
owned by user filter and chmoded it to 0755. The contents are also
owned by filter and chmoded to 0660.
Eh voila, bayesian works.
Thanks Michel!
Peter