
dbfunk at engineering
Nov 11, 2011, 12:36 AM
Post #2 of 7
(410 views)
Permalink
|
On Thu, 10 Nov 2011, lists [at] nerdbynature wrote: > Hi there, > > my spamd seems to ignore the ~/.spamassassin/user_prefs file. > > I've searched the archives about this issue, the closest one[0] I came > across was: > > > [...] users can add new rules for their own use in the > > "~/.spamassassin/user_prefs" file, if they like. > > (spamd disables this for security and increased speed.) > > I'm using SA 3.3.1 (from Debian/stable) and enabled 'allow_user_rules' > in local.cf. I intend to use only required_score, whitelist_from > and score - as I understand the comment above, these are not "rules" and > a per-user user_prefs should be evaluated even w/o 'allow_user_rules'. > > When attaching strace(1) to the spamd processes it shows that only > /var/mail/.spamassassin/* is being read, but nothing in /home/* > is ever read. Even if it's a permission issue, I'd expect at least an > -EACCES. > > The setup is as follows: > > * fetchmail fetches mail from a remote server, > * delivers to postfix (localhost:25) > * Postfix delivers to clamsmtpd (for virus-checking) which passes > the message back to postfix, which in turn > * passes it to a spamassassin service > * maildrop delivers the mail to the user's Maildir. > > --- master.cf ---- > spamassassin unix - n n - - pipe > user=mail argv=/usr/bin/spamc -e /usr/sbin/sendmail -oi -f \ > ${sender} ${recipient} > [...] > maildrop unix - n n - - pipe > flags=DRhu argv=/usr/bin/maildrop -d ${recipient} > ----------------- > > When email is being fetched I can see that "spamc -e ..." is being > spawned and spamd:783 is being connected to. > > When running "spamassassin -D < mail.eml" manually as a user, my > user_prefs is of course read and evaulated correctly. > > So, I really like to know why it is ignored when SA is called from > Postfix. Any ideas? > > Thanks, > Christian. How are you telling spamc who the user is? For per-user specific rules spamc has to know who the user is to go get their rules. This is accomplished by one of two methods, either use the '-u username' optional argument or have the process invoking spamc run as the desired user. Usually that is done at delivery time (such as in a procmail recipe). Looking at your config snippets, it looks like you're running spamc as "user=mail" and there's no sign of a '-u' argument to spamc. -- Dave Funk University of Iowa <dbfunk (at) engineering.uiowa.edu> College of Engineering 319/335-5751 FAX: 319/384-0549 1256 Seamans Center Sys_admin/Postmaster/cell_admin Iowa City, IA 52242-1527 #include <std_disclaimer.h> Better is not better, 'standard' is better. B{
|