Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Spam Assassin (start stop)

Status
Not open for further replies.

datadan

IS-IT--Management
Joined
Jul 22, 2002
Messages
283
Location
US
on a rh9 system I was told to use:
spamd -d -q -x --max-children=20 -H /etc/razor -u maildrop -r /var/run/spamd/spamd.pid

to start and
kill `cat /var/run/spamd/spamd.pid`
to stop.

However I always get:

cat: /var/run/spamd/spamd.pid: No such file or directory
kill: usage: kill [-s sigspec | -n signum | -sigspec] [pid | job]... or kill -l [sigspec]

When trying to stop and the following when trying to start.

Could not create INET socket: Address already in use IO::Socket::INET: Address already in use

/var/run/spamd/spamd.pid exists:
-rw-r--r-- 1 maildrop maildrop 5 Jul 23 07:30 spamd.pid

Am I using the right start/stop switches?
Thanks,
 
Delete the spamd.pid file and try again. You're not going to be able to start the process correctly with an existing .pid file and the stop won't work because the pid number won't match anything.

 
No - kill woulnd't report 'no such file or directory' - that looks like an output of 'cat'.
And 'Jul 23' looks somewhat actual.

Are you sure there is no typo?
What happens, if you type 'cat ...pid' from commandline?
What, if you type 'ps -C spamd'? Same pid?

seeking a job as java-programmer in Berlin:
 
/etc/sysconfig/spamassassin:
# Options to spamd
SPAMDOPTIONS="-d -c -a -m5 -H"

/etc/init.d/spamassassin:
# Source spamd configuration.
if [ -f /etc/sysconfig/spamassassin ] ; then
. /etc/sysconfig/spamassassin
else
SPAMDOPTIONS="-d -c -a -m5 -H"
fi

[ -f /usr/bin/spamd -o -f /usr/local/bin/spamd ] || exit 0
PATH=$PATH:/usr/bin:/usr/local/bin

# See how we were called.
case "$1" in
start)
# Start daemon.
echo -n "Starting spamd: "
daemon spamd $SPAMDOPTIONS
RETVAL=$?
echo
[ $RETVAL = 0 ] && touch /var/lock/subsys/spamassassin
;;
stop)
# Stop daemons.
echo -n "Shutting down spamd: "
killproc spamd
RETVAL=$?
echo
[ $RETVAL = 0 ] && rm -f /var/lock/subsys/spamassassin
;;
restart)
$0 stop
$0 start
;;
condrestart)
[ -e /var/lock/subsys/spamassassin ] && $0 restart
;;
status)
status spamd
;;
*)
echo "Usage: $0 {start|stop|restart|status|condrestart}"


Click below for S8700 Media Server information
 
I'll tell you this honestly. I would never call
spamassassin natively after using amavisd.
The configuration and problems you are experiencing
are all alleviated.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top