OK, out of desperation, here is my startup
script. Diff it against yours and see if there is a problem:
#!/bin/sh # # $Id: spamass-milter-redhat.rc,v 1.2 2002/08/19 20:39:42
dnelson Exp $ # # spamass-milter This script starts and stops the
spamass-milter daemon # # chkconfig: 2345 80 30 # # description:
spamass-milter is a daemon which hooks into sendmail and
routes #
email messages to spamassassin # processname: spamass-milter
#
Source function library. . /etc/rc.d/init.d/functions
# Source
networking configuration. . /etc/sysconfig/network
# Local
spamass-milter config SM_SOCKET=/var/run/spamass.sock SM_EXTRA_FLAGS= [
-x /etc/sysconfig/spamass-milter ] && .
/etc/sysconfig/spamass-milter
# Check that networking is up. [
${NETWORKING} = "no" ] && exit 0
[ -x /usr/sbin/spamass-milter ]
|| exit 0 PATH=$PATH:/usr/bin:/usr/local/bin
RETVAL=0
start()
{ echo -n "Starting
spamass-milter: " daemon
spamass-milter -p ${SM_SOCKET} -f
${SM_EXTRA_FLAGS}
RETVAL=$? echo test $RETVAL -eq
0 && touch /var/lock/subsys/spamass-milter return
$RETVAL }
stop() { echo
-n "Shutting down spamass-milter:
" killproc
spamass-milter
RETVAL=$? echo test $RETVAL -eq
0 && rm -f /var/lock/subsys/spamass-milter }
restart()
{ stop start }
# See how we were called. case "$1"
in start) # Start
daemon. start ;;
stop) # Stop
daemon. stop ;;
restart|reload) restart
;; condrestart) test -f /var/lock/subsys/spamass-milter &&
$0 restart || : ;;
status) status
spamass-milter ;;
*) echo "Usage: $0
{start|stop|reload|restart|condrestart|status}"
exit 1 esac
exit $?
----- Original Message -----
Sent: Tuesday, June 03, 2003 4:01
PM
Subject: Re: Spamass-milter Redhat
Service
I'm still stuck. I had already changed the sendmail.mc
file and rebuilt sendmail.cf, restarted sendmail. I had to in order for
spamass-milter to work from the command line. I have the sock file in
/var/run/spamassassin/spamass.sock. It works from the command line when
run by root so I am assuming the permissions are correct, but when
doing a "service spamass-milter start" as root it errors. I am thinking
I must be missing something blatantly obvious, please excuse my brain block!
Jason
Thomas Cameron wrote:
sure - that makes sense. all I was trying to
convey was that the error (in my case) did not come from the startup
script, it came from the sendmail.mc entry.
TC ----- Original Message ----- From: "Chuck Yerkes"
<address@hidden> To:
<address@hidden> Sent: Tuesday, June 03, 2003 2:19
PM Subject: Re: Spamass-milter Redhat Service
> This presumes that you are running as root (it needs to be >
root to write to /var/run/). On a gateway > machine, that may
not be desired or needed. > > In the past, I've created, in
the /etc/init.d/ script > a diretory that it could write into:
> mkdir /var/run/spamass; chown $SpamAssMilterRunUser
/var/run/spamass > > and spamassmilter can write its socket
into there. > > Quoting Thomas Cameron
(address@hidden): > > I had that problem, too -
the solution is change the line in sendmailmc from > > this:
> > > > INPUT_MAIL_FILTER(`spamassassin',
`S=local:/var/run/sendmail/spamass.sock, > > F=,
T=C:15m;S:4m;R:4m;E:10m') > > > > to this: > >
> > INPUT_MAIL_FILTER(`spamassassin',
`S=local:/var/run/spamass.sock, F=, > > T=C:15m;S:4m;R:4m;E:10m')
> > ----- Original Message ----- > > From: "Jason
Granat" <address@hidden> > > To:
<address@hidden> > > Sent: Tuesday, June 03,
2003 1:06 PM > > Subject: Spamass-milter Redhat Service >
> > > > > > Hello, > > > >
> > I tried using the contrib'd Redhat service and it shuts down and
gives me > > status > > > for spamass-milter but
when I try a service spamass-milter start I get: > > >
> > > Starting spamass-milter: execvp: No such file or
directory > > > > > > I check the file and can't
find any files/directories that don't exist. > > Is it
> > > broken? The contents are below: > > >
> > > #!/bin/sh > > > # > > > # $Id:
spamass-milter-redhat.rc,v 1.2 2002/08/19 20:39:42 dnelson Exp $
> > > # > > > # spamass-milter This script starts
and stops the spamass-milter daemon > > > # > >
> # chkconfig: 2345 80 30 > > > # > > > #
description: spamass-milter is a daemon which hooks into sendmail and
> > routes > > >
#
email messages to spamassassin > > > # processname:
spamass-milter > > > > > > > > > #
Source function library. > > > . /etc/rc.d/init.d/functions
> > > > > > # Source networking configuration.
> > > . /etc/sysconfig/network > > > > >
> # Local spamass-milter config > > >
SM_SOCKET=/var/run/spamassassin/spamass.sock > > >
SM_EXTRA_FLAGS= > > > [ -x /etc/sysconfig/spamass-milter ]
&& . /etc/sysconfig/spamass-milter > > > >
> > # Check that networking is up. > > > [ ${NETWORKING}
= "no" ] && exit 0 > > > > > > [ -x
/usr/local/sbin/spamass-milter ] || exit 0 > > >
PATH=$PATH:/usr/bin:/usr/local/bin > > > > > >
RETVAL=0 > > > > > > start() { > >
> echo -n "Starting
spamass-milter: " > >
> daemon spamass-milter
-p ${SM_SOCKET} -f ${SM_EXTRA_FLAGS} > >
> RETVAL=$? > >
> echo > >
> test $RETVAL -eq 0
&& touch /var/lock/subsys/spamass-milter > >
> return $RETVAL >
> > } > > > > > > stop() { > >
> echo -n "Shutting down
spamass-milter: " > >
> killproc spamass-milter
> > > RETVAL=$?
> > > echo
> > > test
$RETVAL -eq 0 && rm -f /var/lock/subsys/spamass-milter > >
> } > > > > > > restart() { > >
> stop > >
> start > >
> } > > > > > > # See how we were called.
> > > case "$1" in > > > start)
> > > # Start
daemon. > > >
start > > > ;;
> > > stop) > >
> # Stop daemon. >
> > stop > >
> ;; > >
> restart|reload) > >
> restart > >
> ;; > >
> condrestart) > >
> test -f
/var/lock/subsys/spamass-milter && $0 restart || : > >
> ;; > >
> status) > >
> status spamass-milter
> > > ;;
> > > *) > >
> echo "Usage: $0
{start|stop|reload|restart|condrestart|status}" > >
> exit 1 > >
> esac > > > > > > exit $? > > >
> > > > > > > > > > > >
_______________________________________________ > > >
Spamass-milt-list mailing list > > >
address@hidden > > > http://mail.nongnu.org/mailman/listinfo/spamass-milt-list
> > > > > > > > > > >
_______________________________________________ > >
Spamass-milt-list mailing list > > address@hidden
> > http://mail.nongnu.org/mailman/listinfo/spamass-milt-list
> > > _______________________________________________
> Spamass-milt-list mailing list >
address@hidden > http://mail.nongnu.org/mailman/listinfo/spamass-milt-list
>
_______________________________________________ Spamass-milt-list
mailing list address@hidden http://mail.nongnu.org/mailman/listinfo/spamass-milt-list
_______________________________________________ Spamass-milt-list
mailing
list address@hidden http://mail.nongnu.org/mailman/listinfo/spamass-milt-list
|