Hi All,

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. At the moment is is invoked as

spamassassin
          unix  -       n       n       -       -       pipe
user=filter argv=/usr/bin/spamc -f -e /usr/sbin/sendmail -oi -f $ {sender} ${recipient}

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:

mrblue:/home/oneman# ls -lh /var/spool/spamassassin/
total 4.6M
-rw-rw-rw-  1 root root  12K 2006-09-26 20:07 auto-whitelist
-rw-rw-rw-  1 root root 5.1K 2006-09-26 20:07 bayes_journal
-rw-rw-rw-  1 root root 632K 2006-09-26 20:07 bayes_seen
-rw-rw-rw-  1 root root 5.2M 2006-09-26 20:07 bayes_toks

I'm probably missing the obvious, but can someone point out to me what to change so filter can access /var/spool/spamassassin ?


TIA

Peter

============ Output of spamassassin debug =============

mrblue:#su filter
[EMAIL PROTECTED]:$spamassassin -D < testmsg

<snip>

debug: using "/dev/null/.spamassassin" for user state dir
debug: mkdir /dev/null/.spamassassin failed: mkdir /dev/null: File exists at /usr/share/perl5/Mail/SpamAssassin.pm line 1453
File exists

<snip>

Cannot write to /dev/null/.spamassassin/user_prefs: Not a directory
Failed to create default user preference file /dev/null/.spamassassin/ user_prefs
debug: using "/dev/null/.spamassassin/user_prefs" for user prefs file
<snip>
debug: bayes: no dbs present, cannot tie DB R/O: /var/spool/ spamassassin/bayes_toks
debug: Score set 1 chosen.
debug: bayes: no dbs present, cannot tie DB R/O: /var/spool/ spamassassin/bayes_toks
<snip>
debug: open of AWL file failed: lock: 27966 cannot create tmp lockfile /var/spool/spamassassin/auto-whitelist.lock.mrblue.27966 for /var/spool/spamassassin/auto-whitelist.lock: Permission denied
<snip>
debug: auto-learning failed: lock: 27966 cannot create tmp lockfile / var/spool/spamassassin/bayes.lock.mrblue.27966 for /var/spool/ spamassassin/bayes.lock: Permission denied

<snip>


Reply via email to