I have installed spamassassin, per the instructions on Scalix's wiki, and it is working, with some important caviats. So I asked for help on the spamassassin user list, and got some, but I think I am butting up against some Centos specific issues...
This is what I am seeing in the maillog:
Aug 17 14:39:59 z9m9z sendmail[13082]: l7HIdvGf013082: Milter add: header: X-Spam-Checker-Version: SpamAssassin 3.1.9 (2007-02-13) on\n\tz9m9z.htt-consult.com Aug 17 14:39:59 z9m9z spamd[13032]: spamd: connection from localhost.localdomain [127.0.0.1] at port 40454 Aug 17 14:39:59 z9m9z spamd[13032]: spamd: setuid to root succeeded Aug 17 14:39:59 z9m9z spamd[13032]: 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 1161, <GEN10> line 4. Aug 17 14:39:59 z9m9z spamd[13032]: spamd: processing message 461628246.59720704082024@melitta.dk for root:99
and:
Aug 17 14:39:59 z9m9z spamd[13032]: mkdir /root/.spamassassin: Permission denied at /usr/lib/perl5/vendor_perl/5.8.8/Mail/SpamAssassin.pm line 1536 Aug 17 14:39:59 z9m9z spamd[13032]: locker: safe_lock: cannot create tmp lockfile /root/.spamassassin/auto-whitelist.lock.z9m9z.htt-consult.com.13032 for /root/.spamassassin/auto-whitelist.lock: Permission denied Aug 17 14:39:59 z9m9z spamd[13032]: auto-whitelist: open of auto-whitelist file failed: locker: safe_lock: cannot create tmp lockfile /root/.spamassassin/auto-whitelist.lock.z9m9z.htt-consult.com.13032 for /root/.spamassassin/auto-whitelist.lock: Permission denied
So over at spamassassin list I was told not to let spamassassin run as root. To create a user: spamfilter. and add -u spamfilter to the start command.
So I created the user and group. I ran the spamassassin --lint and -D --lint
Then I went to /etc/rc.d/init.d/spamassassin and change the lines:
# Set default spamd configuration. SPAMDOPTIONS="-d -c -m5 -H" SPAMD_PID=/var/run/spamd.pid
to
# Set default spamd configuration. SPAMDOPTIONS="-u spamfilter -d -c -m5 -H" SPAMD_PID=/var/run/spamd.pid
And then did:
/etc/rc.d/init.d/spamassassin restart
and spamassassin is still running as root and I am still getting these errors....
Robert Moskowitz rgm@htt-consult.com wrote: I have installed spamassassin, per the instructions on Scalix's wiki, and it is working, with some important caviats. So I asked for help on the spamassassin user list, and got some, but I think I am butting up against some Centos specific issues...
So over at spamassassin list I was told not to let spamassassin run as root. To create a user: spamfilter. and add -u spamfilter to the start command.
So I created the user and group. I ran the spamassassin --lint and -D --lint
Then I went to /etc/rc.d/init.d/spamassassin and change the lines:
# Set default spamd configuration. SPAMDOPTIONS="-d -c -m5 -H" SPAMD_PID=/var/run/spamd.pid
to
# Set default spamd configuration. SPAMDOPTIONS="-u spamfilter -d -c -m5 -H" SPAMD_PID=/var/run/spamd.pid
And then did:
/etc/rc.d/init.d/spamassassin restart
and spamassassin is still running as root and I am still getting these errors....
Robert,
check if you have the directory /home/spamfilter
and try adding the extra (-u spamfilter) param in /etc/sysconfig/spamassassin
mark pryor wrote:
*/Robert Moskowitz rgm@htt-consult.com/* wrote:
I have installed spamassassin, per the instructions on Scalix's wiki, and it is working, with some important caviats. So I asked for help on the spamassassin user list, and got some, but I think I am butting up against some Centos specific issues... So over at spamassassin list I was told not to let spamassassin run as root. To create a user: spamfilter. and add -u spamfilter to the start command. So I created the user and group. I ran the spamassassin --lint and -D --lint Then I went to /etc/rc.d/init.d/spamassassin and change the lines: # Set default spamd configuration. SPAMDOPTIONS="-d -c -m5 -H" SPAMD_PID=/var/run/spamd.pid to # Set default spamd configuration. SPAMDOPTIONS="-u spamfilter -d -c -m5 -H" SPAMD_PID=/var/run/spamd.pid And then did: /etc/rc.d/init.d/spamassassin restart and spamassassin is still running as root and I am still getting these errors....
Robert,
check if you have the directory /home/spamfilter
and try adding the extra (-u spamfilter) param in /etc/sysconfig/spamassassin
OK that worked. It is now running as user spamfilter, but things are still not working.
2264 root 15:48 /usr/bin/spamd -u spamfilter -d -c -m5 -H -r /var/run/spamd.pid 2301 spamfilter 15:48 spamd child 2302 spamfilter 15:48 spamd child
Aug 17 16:00:31 z9m9z sendmail[3913]: l7HK0VeM003913: from=1-809368-htt-consult.com?dm@mx121.susanshopping.com, size=6708, class=0, nrcpts=1, msgid=1-809368-6vhNLrr-70zbBFrP70h@mx121.susanshopping.com, proto=ESMTP, daemon=MTA, relay=localhost.localdomain [127.0.0.1] Aug 17 16:00:31 z9m9z spamd[2301]: spamd: connection from localhost.localdomain [127.0.0.1] at port 36972 Aug 17 16:00:31 z9m9z spamd[2301]: spamd: creating default_prefs: /root/.spamassassin/user_prefs Aug 17 16:00:31 z9m9z spamd[2301]: mkdir /root/.spamassassin: Permission denied at /usr/lib/perl5/vendor_perl/5.8.8/Mail/SpamAssassin.pm line 1536 Aug 17 16:00:31 z9m9z spamd[2301]: config: cannot write to /root/.spamassassin/user_prefs: Permission denied Aug 17 16:00:31 z9m9z spamd[2301]: spamd: failed to create readable default_prefs: /root/.spamassassin/user_prefs Aug 17 16:00:31 z9m9z spamd[2301]: mkdir /root/.spamassassin: Permission denied at /usr/lib/perl5/vendor_perl/5.8.8/Mail/SpamAssassin.pm line 1536 Aug 17 16:00:31 z9m9z spamd[2301]: spamd: processing message 1-809368-6vhNLrr-70zbBFrP70h@mx121.susanshopping.com for root:502 Aug 17 16:00:33 z9m9z spamd[2301]: mkdir /root/.spamassassin: Permission denied at /usr/lib/perl5/vendor_perl/5.8.8/Mail/SpamAssassin.pm line 1536 Aug 17 16:00:33 z9m9z spamd[2301]: locker: safe_lock: cannot create tmp lockfile /root/.spamassassin/auto-whitelist.lock.z9m9z.htt-consult.com.2301 for /root/.spamassassin/auto-whitelist.lock: Permission denied Aug 17 16:00:33 z9m9z spamd[2301]: auto-whitelist: open of auto-whitelist file failed: locker: safe_lock: cannot create tmp lockfile /root/.spamassassin/auto-whitelist.lock.z9m9z.htt-consult.com.2301 for /root/.spamassassin/auto-whitelist.lock: Permission denied Aug 17 16:00:33 z9m9z spamd[2301]: spamd: identified spam (8.5/5.0) for root:502 in 2.6 seconds, 7247 bytes.
And there are no files within /home/spamfilter/.spamassassin