MailScanner processes die and don't restart

Joan Bryan joan.bryan at KCL.AC.UK
Fri Jun 20 17:06:45 IST 2003


Hello

I just run a daily script to check the number of mailscanner processes
running, below, and just restart mailscanner manually, if I get a
message. I think it is mainly malformed messages that cause the
mailscanner processes to die, and I haven't had any of these for ages
and we have over 250k messages daily.

#!/bin/sh
# Check certain processes for falling over on mailserver
UTILDIR=/usr/local/utils
cd $UTILDIR
ps -ef >t1
#
# Check number of child mailscanners running
#
NOMSCANNERS=`grep "/usr/local/MailScanner/lib" t1  | wc | awk '{ print $1 }'`
NOMSCANNERSREQ=`grep Child /usr/local/MailScanner/etc/MailScanner.conf | awk -F"
 " '{ print $4}'`
if [ $NOMSCANNERS -lt $NOMSCANNERSREQ ]; then
   /usr/ucb/mail -s "Not enough mailscanners:$NOMSCANNERS available"
sysadmin at kcl.ac.uk <t1
fi

HTH

Joan

On Fri, 20 Jun 2003 11:45:16 -0400 Vasantha Narayanan
<vnarayan at HAVERFORD.EDU> wrote:

> Hi,
>
> We've 15 MailScanner processes running on our system.  When a MailScanner
> process dies of old age, another one seems to restart almost
> immediately.  But occasionally new ones don't seem to start after old one
> dies.  And, even though I've "check_mailscanner" running in cron every 20
> minutes, it has no effect, i.e, it does not start new processes because I
> think the "check_mailscanner" script is not designed to start MailScanner
> processes as long as some MailScanner processes are running.  As a result
> what happens is, when such a situation arises, we've only about 3
> MailScanner processes running and that is not enough to process all our
> mail.  Hence a lot of mail gets held up in the incoming queue.  To solve
> the problem, I've had to manually kill the remaining few MailScanner
> processes and then restart it using "check_mailscanner".    But by then so
> much mail is in the queue that it takes a long time for the mail to get
> cleared resume normal mail processes.
>
> Is there a script that will keep track of how many processes are supposed
> to be running and if it is short of that, it will start that many
> more?   Is there some other solution to this problem?
>
> Thanks.
>
> Vasantha

----------------------
Joan Bryan
Unix Systems Administrator
Information Systems
Telephone: +44 (0) 20 7848 2671
mailto:joan.bryan at kcl.ac.uk



More information about the MailScanner mailing list