I suspect you are not comparing apples to apples here, I asked for the command you use when running manually, I am assuming a) you are not logging in as the user spamd and b) you are not running:
(as user spamd) $ spamd -x -H /home/spamd -d -d -c -a
Because this is the command your start up script is using:
$ spamd -x -u spamd -H /home/spamd -d -d -c -a
Use only one method for the switches either the /etc/sysconfig/spamassassin or the spamd line in the script, both is confusing and redundant.
Personally I would delete the /etc/sysconfig/spamassassin file, no need to change the startup script it will ignore the absence. Try the option switches you want to use from the command line, with -D appended to view the output eg.
$ spamd -d -c -a -D
If it doesn't work, try, from the command line:
$ spamd -D
.... and add the switches till it breaks.
NOTE:
If you plan to run spamd as user spamd, make sure the user spamd exists and append it to the line in the startup script (after logging in as spamd and testing it first) eg.
else OPTIONS="-d -c -a -u spamd" fi .... and if you need to define the home dir.
else OPTIONS ="-d -c -a -u spamd -H /home/spamd" fi
Terry....
Russell Mann wrote:
Yeah I can confirm a spamd startup script works....
Send yours, also send what you use from the command line, what OS you use. etc. etc.
tm.
I did send that stuff before - trying to save some list bandwidth. Ce'st la vie. Here goes:
RedHat 6.2, Perl 5.6.1, SpamAssassin 2.55
Hello,
This morning I came into the office to find that qmail-scanner had gone insane and lots all nights emails for me. I rebooted the system to try to get everything back to ground zero. The problem was that the spamd init script decided to hang and not allow the boot to progress.
I ssh'd in and killed it off, so the rest of the system could boot up. Then I went hunting for the problem. Turns out that spamd works find if invoked from the command line with a "background" ampersand (&). It doesn't work fine when invoked by "service spamassassin start" (a.k.a. /etc/rc.d/init.d/spamassassin start)
Here's what I see in the "ps fax" when trying to start the service:
19828 pts/0 S 0:00 | \_ sh /sbin/service spamassassin start 19834 pts/0 S 0:00 | \_ sh /etc/rc.d/init.d/spamassassin start 19845 pts/0 S 0:00 | \_ initlog -q -c spamd 19846 pts/0 S 0:02 | \_ perl /usr/local/bin/spamd
It just hangs there. The prompt for the screen starting it stays at:
Starting spamd:
Any suggestions on how to put together an init script that won't hang my system on boot?
Thanks,
Russell
Here's my init script (copied from the recommended RedHat script from SA tarball)
#!/bin/sh # # spamassassin This script starts and stops the spamd daemon # # chkconfig: 2345 80 30 # # description: spamd is a daemon process which uses SpamAssassin to check # email messages for SPAM. It is normally called by spamc # from a MDA.
# Source function library. . /etc/rc.d/init.d/functions
# Source networking configuration. . /etc/sysconfig/network
# Check that networking is up. [ ${NETWORKING} = "no" ] && exit 0
# Source spamd configuration. if [ -f /etc/sysconfig/spamassassin ] ; then . /etc/sysconfig/spamassassin else OPTIONS="-d -c -a" 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 $OPTIONS RETVAL=$? echo [ $RETVAL = 0 ] && touch /var/lock/subsys/spamd ;; stop) # Stop daemons. echo -n "Shutting down spamd: " killproc spamd RETVAL=$? echo [ $RETVAL = 0 ] && rm -f /var/lock/subsys/spamd ;; restart) $0 stop $0 start ;; condrestart) [ -e /var/lock/subsys/spamd ] && $0 restart ;; status) status spamd ;; *) echo "Usage: $0 {start|stop|restart|status|condrestart}" exit 1 esac
exit 0
----------------------------------------------------
I don't know what "daemon" is for. I just copied this from the SA redhat startup script dir.
per request:
$ more /etc/sysconfig/spamassassin # Hint : if you want to enable SpamAssassin debugging # (the debug output goes to /var/log/maillog) then use : # SPAMDOPTIONS="-x -u spamd -H /home/spamd -d -D" # Don't leave debugging turned on unnecessarily though, # because it will slow down a busy server. # # Otherwise, for normal operation (debugging disabled) use : SPAMDOPTIONS="-x -u spamd -H /home/spamd -d"
------------------------------------------------------- This SF.Net email sponsored by: ApacheCon 2003, 16-19 November in Las Vegas. Learn firsthand the latest developments in Apache, PHP, Perl, XML, Java, MySQL, WebDAV, and more! http://www.apachecon.com/ _______________________________________________ Spamassassin-talk mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/spamassassin-talk