novice - RBL questions & init.d script

Peter Bonivart peter at UCGBOOK.COM
Thu Mar 11 22:13:31 GMT 2004


shanna leonard wrote:
> finally got it configured,(solaris 9 w/ sendmail) and starting to test it.

Nice. ;-)

> init.d script:
>
> I am wondering about restarting Mailscanner.  i see the
> check_mailscanner script, which appears to start it, but does not stop it.
>
> I wonder if someone has a  init.d script to stop/start at boot time, etc.

I saw Julians post but if you want a separate script for MS:

/-------------------
#!/sbin/sh

# mailscanner - controls MailScanner
# 2003-05-19 Peter Bonivart, CSC

DIR=/opt/MailScanner

case "$1" in
start)
   $DIR/bin/check_mailscanner
   ;;
stop)
   echo Shutting down MailScanner...
   pkill -x MailScanner
   > $DIR/MailScanner.pid
   ;;
reload)
   echo Reloading MailScanner...
   pkill -HUP -x MailScanner
   ;;
status)
   if [ "pgrep MailScanner" ]; then
     ps -ef | grep MailScanner | grep -v grep | awk '{print "MailScanner
is running as",$1,"with pid",$2}'
   else
     echo MailScanner is not running
   fi
   ;;
*)
   echo "Usage: $0 { start | stop | reload | status }"
   exit 1
   ;;
esac

exit 0
-------------------/

I just change how Sendmail starts to suit MS and then use the above
script to control MS itself.

--
/Peter Bonivart

--Unix lovers do it in the Sun

Sun Fire V210, Solaris 9, Sendmail 8.12.10, MailScanner 4.25-14,
SpamAssassin 2.63 + DCC 1.2.30, ClamAV 0.67 + GMP 4.1.2



More information about the MailScanner mailing list