porterj wrote:
> I just set-up spamassassin on a Red Hat Enterprise Linux 4 mail server and it
> appears that spamassassin is working as I am seeing messages that are now
> tagged as spam.
>
> However, in my /var/log/maillog I keep seeing a message similar to the
> following and am unsure how to fix it.  Any help would be appreciated.
>   
Apparently you're calling spamc as root.

For safety, spamd will *NEVER* scan mail while executing as root, so it
is falling back to the user "nobody".

Normally, the bayes and AWL databases are stored in a user's home
directory, however, "nobody" does not have a home directory it can write
to (and should not to maintain security!).

I'm not sure how you've set things up for calling spamc. If you're doing
a "per user" config, this will pretty much only happen for mail going to
root, so no big deal.

If you're always calling spamc as root, I'd suggest creating a non-root
user account that has a home directory to scan mail as. You can get
spamc to use this user, instead of the current user, by adding "-u
scanuser" to your spamc command line.

Also be aware you'll need to su to this user before using sa-learn to
maintain your bayes DB, but that's not so bad.


 

> Begin message in /var/log/maillog
>
> Apr 12 10:27:44 servername spamd[18456]: spamd: setuid to root succeeded
> Apr 12 10:27:44 servername spamd[18456]: spamd: still running as root: user
> not specified with -u, not found, or set to root, falling back to nobody at
> /usr/bin/spamd line 1147, <GEN212> line 4.
> Apr 12 10:27:44 servername spamd[18456]: spamd: processing message
> <[EMAIL PROTECTED]> for root:99
> Apr 12 10:27:45 servername spamd[18456]: mkdir /root/.spamassassin:
> Permission denied at /usr/lib/perl5/vendor_perl/5.8.5/Mail/SpamAssassin.pm
> line
> 1536
> Apr 12 10:27:45 servername spamd[18456]: locker: safe_lock: cannot create
> tmp lockfile /root/.spamassassin/auto-whitelist.lock.servername.domain.com
> .18456 for /root/.spamassassin/auto-whitelist.lock: Permission denied
> Apr 12 10:27:45 servername spamd[18456]: auto-whitelist: open of
> auto-whitelist file failed: locker: safe_lock: cannot create tmp lockfile
> /root/.spamassassin/auto-whitelist.lock.servername.domain.com.18456 for
> /root/.spamassassin/auto-whitelist.lock: Permission denied
> Apr 12 10:27:45 servername spamd[18456]: bayes: locker: safe_lock: cannot
> create tmp lockfile
> /root/.spamassassin/bayes.lock.servername.domain.com.18456 for
> /root/.spamassassin/bayes.lock: Permission denied
> Apr 12 10:27:45 servername spamd[18456]: spamd: clean message (0.0/3.5) for
> root:99 in 0.6 seconds, 8188 bytes.
> Apr 12 10:27:45 servername spamd[18456]: spamd: result: . 0 -
> scantime=0.6,size=8188,user=root,uid=99,required_score=3.5,rhost=servername,raddr=127.0.0.
> 1,rport=55310,mid=<[EMAIL PROTECTED]>,autolearn=failed
>
> End message in /var/log/maillog
>
> Thanks,
> JP
>   

Reply via email to