I can't seem to get SA & Syslog to log messages to a log file other than maillog. I changed the spamassassin start up script to add "-s local5" to the spamd start up options. I modified syslog.conf to add local5 as an entity. I restarted syslog, courier and spamd. I still get logging messages in /var/log/maillog instead of the desired /var/log/spamd.log. I tested the syslog change using: logger -p local5.warning -t SpamAssassin "testing" This gives me the appropriate message written into the /var/log/spamd.log file so it makes me think the syslog changes actually work. What am I doing wrong?

I am using Courier 0.54.2 on RHEL4. SA is 3.1.8. My Courier maildroprc is:
import RECIPIENT
import SENDER
import HOME
import USER
{
   exception {
    xfilter "/usr/bin/spamc -u $USER"
   }
}

This is working and I am getting email with the SA headers added.



The top part of my /etc/init.d/spamassassin is: . /etc/rc.d/init.d/functions prog="spamd"
# Source networking configuration.
. /etc/sysconfig/network
# Check that networking is up.
[ ${NETWORKING} = "no" ] && exit 0
# Set default spamd configuration.
SPAMDOPTIONS="-d -m5 -H -s local5" SPAMD_PID=/var/run/spamd.pid
# Source spamd configuration.
if [ -f /etc/sysconfig/spamassassin ] ; then
       . /etc/sysconfig/spamassassin
fi
[ -f /usr/bin/spamd -o -f /usr/local/bin/spamd ] || exit 0
PATH=$PATH:/usr/bin:/usr/local/bin
# By default it's all good
RETVAL=0
# See how we were called.
case "$1" in
 start)
       # Start daemon.
       echo -n $"Starting $prog: "
       daemon $NICELEVEL spamd $SPAMDOPTIONS -r $SPAMD_PID
       RETVAL=$?
       echo
       if [ $RETVAL = 0 ]; then
               touch /var/lock/subsys/spamassassin
       fi
;;


My syslog.conf is:
# Log all kernel messages to the console.
# Logging much else clutters up the screen.
#kern.* /dev/console
# Log anything (except mail) of level info or higher.
# Don't log private authentication messages!
*.info;mail.none;authpriv.none;cron.none;local5.none /var/log/messages
# The authpriv file has restricted access.
authpriv.* /var/log/secure
# Log all the mail messages in one place.
mail.* -/var/log/maillog

# Log cron stuff
cron.* /var/log/cron
# Everybody gets emergency messages
*.emerg *
# Save news errors of level crit and higher in a special file.
uucp,news.crit /var/log/spooler
# Save boot messages also to boot.log
local7.* /var/log/boot.log
# Save Spamassassin messages to spamd.log
local5.*                                                /var/log/spamd.log

Reply via email to