Mailing List Archive

spamd not accessing user rules
I am using SA2.63 on a RH7.2 system. spamd, running as "mail" is called
from procmail as $USER, which is set by fetchmail as the user whose mail is
being downloaded. My setup is a common bayes database in
/etc/mail/spamassassin for two users.

The SA report inserted in each message shows that only the default rules are
applied, but none of the user rules, which are in /etc/mail/spamassassin.
If spamassassin is run directly from the command line as "root" and as
"mail", all rules are applied.

Here is the maillog with procmail set to verbose and spamd set to debug.

procmail: Executing "/usr/bin/spamc,-u,Gorm"
Feb 16 12:54:04 myserver spamd[25419]: logmsg: connection from localhost
[127.0.0.1] at port 49161
Feb 16 12:54:04 myserver spamd[25419]: connection from localhost [127.0.0.1]
at port 49161
Feb 16 12:54:04 myserver spamd[25436]: debug: read_scoreonly_config: cannot
open
"/home/Gorm/.spamassassin/user_prefs": Permission denied
Feb 16 12:54:04 myserver spamd[25436]: debug: user has changed
Feb 16 12:54:04 myserver spamd[25436]: debug: bayes: 25436 untie-ing
Feb 16 12:54:04 myserver spamd[25436]: debug: mkdir /home/Gorm/.spamassassin
failed: mkdir /home/Gorm/.spamassassin: Permission denied at
/usr/lib/perl5/site_perl/5.6.1/Mail/SpamAssassin.pm line 1279
Feb 16 12:54:04 myserver spamd[25436]: debug: bayes: no dbs present, cannot
scan: /home/Gorm/.spamassassin/bayes_toks

During troubleshooting, I changed permissions on /home/Gorm to allow user
"mail" to create a directory, but as can be seen above, that was denied too
by file permissions.

Background: The system worked normally until I re-organised one large
local rules file into five files. I tried removing one file at a time to
test for a bad file, but nothing changed. (Of course, I tried --lint too).
I also deleted the bayes database files, but that did not help either.

I'm a semi-newbie, so the logs give me a tease, but not something that I can
figure out. All help appreciated.
Re: spamd not accessing user rules [ In reply to ]
On Mon, 16 Feb 2004 13:53:28 -0800
Raquel Rice <raquel@thericehouse.net> wrote:

> On Mon, 16 Feb 2004 16:28:26 -0500
> "Gorm Jensen" <gjensen@magma.ca> wrote:
>
> > I am using SA2.63 on a RH7.2 system. spamd, running as "mail" is
> > called from procmail as $USER, which is set by fetchmail as the
> > user whose mail is being downloaded. My setup is a common bayes
> > database in/etc/mail/spamassassin for two users.
> >
> > The SA report inserted in each message shows that only the default
> > rules are applied, but none of the user rules, which are in
> > /etc/mail/spamassassin. If spamassassin is run directly from the
> > command line as "root" and as"mail", all rules are applied.

spamd should be started by root with the '-u mail' option. procmailrc
(maybe in /etc) needs DROPPRIVS=yes near the top. /etc/mail/spamassassin
should be owned by user mail, along with all files in the directory
including the bayes_* files.

Alex