Monitor Que Lengths

Steve Evans sevans at FOUNDATION.SDSU.EDU
Tue Jan 29 17:05:10 GMT 2002


We're still on 2.6 or something like that.  We starting using Mailscanner in December just before 3.x came out so we've never upgraded yet.  We probably will next month after things calm down a bit.

Thanks for the script idea.  I should probably also have the script check mqueue also shouldn't I.

Steve

-----Original Message-----
From: Julian Field [mailto:jkf at ECS.SOTON.AC.UK]
Sent: Tuesday, January 29, 2002 8:56 AM
To: MAILSCANNER at JISCMAIL.AC.UK
Subject: Re: Monitor Que Lengths


At 16:40 29/01/2002, you wrote:
>I've had mailscanner stop processing mail a couple of times.

What version of MailScanner are you using? This was a known problem with
some of the early releases of version 3. You really need to be running 3.04.

>The mail just keeps building up until I restart the computer.  (resarting
>the service doesn't seem to do it usually).

Running /usr/local/MailScanner/bin/check_mailscanner should restart
MailScanner if it is not running.

>   How could I write a script to check the number of files in mqueue.in
> and mqueue and execute a init6 if it gets over a certain number?

How about something like

#!/bin/sh

# Define this to be your maximum allowed mail queue length
MAXLEN=300

LSLEN=`cd /var/spool/mqueue.in && ls | wc -l`
QUEUELEN=`expr $LSLEN / 2`
if [ $QUEUELEN -gt $MAXLEN ]; then
   /sbin/reboot
fi


--
Julian Field                Teaching Systems Manager
jkf at ecs.soton.ac.uk         Dept. of Electronics & Computer Science
Tel. 023 8059 2817          University of Southampton
                             Southampton SO17 1BJ



More information about the MailScanner mailing list