[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [cobalt-users] mailscanner error
- Subject: Re: [cobalt-users] mailscanner error
- From: "Steve Bassi" <steve@xxxxxxxxx>
- Date: Wed Sep 18 04:14:09 2002
- List-id: Mailing list for users to share thoughts on Sun Cobalt products. <cobalt-users.list.cobalt.com>
----- Original Message -----
From: "David Lucas" <david@xxxxxxxxxxxxxxxx>
To: <cobalt-users@xxxxxxxxxxxxxxx>
Sent: Wednesday, September 18, 2002 5:40 AM
Subject: [cobalt-users] mailscanner error
> Can anyone tell me what the following means? It appears I am only getting
> mail from one account.
> Yesterday or the day before I installed openwebmail from pkgmaster.com.
>
> [root f-prot]# /etc/rc.d/init.d/mailscanner status
> Checking MailScanner daemons:
> MailScanner: ERROR!
> incoming sendmail: ok
> outgoing sendmail: ok
> [root f-prot]#
>
yes it is nothing to worry about , just an error in mailscanners original
script.
It does not stop anything from funtioning and I have made a fix for it,
which will be in the next version - as soon as I have time to do it.
The problem was the /etc/rc.d/init.d/mailscanner file to start and stop
mailscanner.
if you replace your existing script, /etc/rc.d/init.d/mailscanner, with the
following, all will be fine.
Rgds Bassi
#!/bin/sh
#
# mailscanner This shell script takes care of starting and stopping
# MailScanner, and its associated copies of sendmail.
#
# chkconfig: 2345 80 30
# description: MailScanner is an open-source E-Mail Gateway Virus Scanner.
# processname: mailscanner
# config: /home/opt/MailScanner/etc/mailscanner.conf
# pidfile: /home/opt/MailScanner/var/virus.pid
# Source function library.
. /etc/rc.d/init.d/functions
# Source networking configuration.
. /etc/sysconfig/network
# Source mailscanner configureation.
if [ -f /etc/sysconfig/mailscanner ] ; then
. /etc/sysconfig/mailscanner
else
QUEUETIME=15m
fi
# Check that networking is up.
[ ${NETWORKING} = "no" ] && exit 0
[ -f /home/opt/MailScanner/bin/check_mailscanner ] || exit 0
[ -f /usr/sbin/sendmail ] || exit 0
RETVAL=0
# See how we were called.
case "$1" in
start)
# Start daemons.
echo 'Starting MailScanner daemons:'
/usr/bin/newaliases > /dev/null 2>&1
if test -x /usr/bin/make -a -f /etc/mail/Makefile ; then
make -C /etc/mail -q
else
for i in virtusertable access domaintable mailertable ; do
if [ -f /etc/mail/$i ] ; then
makemap hash /etc/mail/$i < /etc/mail/$i
fi
done
fi
echo -n ' incoming sendmail: '
/usr/sbin/sendmail -bd -ODeliveryMode=queueonly \
-OQueueDirectory=/home/spool/mqueue.in
success
echo
echo -n ' outgoing sendmail: '
/usr/sbin/sendmail $([ -n "$QUEUETIME" ] && echo -q$QUEUETIME)
success
echo
echo -n ' MailScanner: '
/home/opt/MailScanner/bin/check_mailscanner >/dev/null
RETVAL=$?
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/mailscanner
success
echo
;;
stop)
# Stop daemons.
echo 'Shutting down MailScanner daemons:'
[ -f /home/opt/MailScanner/var/virus.pid ] && {
kill -1 `cat /home/opt/MailScanner/var/virus.pid`
}
rm -f /home/opt/MailScanner/var/virus.pid
echo -n ' MailScanner: '
pid=`ps -axww | grep "/MailScanner" | grep -v "grep" | head -1 | awk
{'print $1'}`;
if [ -z "$pid" ] ; then success; else failure; fi
echo
echo -n ' incoming sendmail: '
killproc sendmail 2>/dev/null
echo
echo -n ' outgoing sendmail: '
killproc /usr/sbin/sendmail 2>/dev/null
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/mailscanner
;;
status)
# Work out if all of MailScanner is running
echo 'Checking MailScanner daemons:'
echo -n ' MailScanner: '
pid=`ps -axww | grep "/MailScanner" | grep -v "grep" | head -1 | awk
{'print $1'}`;
if [ -z "$pid" ] ; then failure; else success; fi
echo
# Now the incoming sendmail
echo -n ' incoming sendmail: '
pid=`ps ax | grep 'sendmai[l]: accepting connections'`
if [ -z "$pid" ] ; then failure; else success; fi
echo
# Now the outgoing sendmail
echo -n ' outgoing sendmail: '
# More complex regexp to handle other RedHats
pid=`ps ax | egrep '\[sendmail\]|sendmai[l] -q[0-9]*[mhd]'`
if [ -z "$pid" ] ; then failure; else success; fi
echo
;;
restart|reload)
$0 stop
sleep 2
$0 start
RETVAL=$?
;;
*)
echo "Usage: mailscanner {start|stop|status|restart}"
exit 1
esac