Sendmail -q15m unchangeable?

mikea mikea at MIKEA.ATH.CX
Mon Sep 29 19:50:46 IST 2003


On Mon, Sep 29, 2003 at 08:17:31PM +0200, Raymond Dijkxhoorn wrote:
> Hi!
>
> > /etc/sysconfig/sendmail
>
> Close :)
>
> > /usr/sbin/sendmail -q15m
>
> I would edit /etc/sysconfig/MailScanner
>
> #
> # Sendmail Settings
> #
> SENDMAIL=/usr/sbin/sendmail
> QUEUETIME=5m
> INQDIR=/var/spool/mqueue.in
> INPID=/var/run/sendmail.in.pid
> OUTPID=/var/run/sendmail.out.pid

As would I. But if your mail is running slow, then I suspect it isn't
sendmail queue time that is the problem. You might find it useful to
monitor MailScanner and sendmail behavior. I use some shell scripts
for this. each displaying to a separate window on my console:

========================================================

$ cat bin/waitcount
#       monitor MailScanner output containing "messages"
while (true)
        do
        clear
#       grep -i waiting /var/log/maillog|tail -50
        grep -i "[0-9] messages" /var/log/maillog|tail -50
#       echo waitcount -- time and date now `date`
        echo `date | cut -d " " -f 2-20` -- waitcount
        sleep 15
        clear
        done

========================================================

$ cat bin/scancount
#       monitor MailScanner output containing "scanning"
while (true)
        do
        clear
        grep -i "scanning" /var/log/maillog|tail -55
#       echo scancount -- time and date `date`
        echo `date | cut -d " " -f 2-20` -- scancount
        sleep 15
        clear
        done

========================================================

$ cat bin/mailaccepted
#
#       mailaccepted
#
#       greps lines with "message accepted" out of /var/log/maillog
#
#       cuts out interesting fields.
#
#       Typical maillog "message accepted" line:
#       Sep  9 14:39:13 isdmon2 sendmail[86887]: h89Jd97I086837:
#       ^    ^ ^            ^       ^         ^
#        1   2 3            4       5         6                  7
#       to=<rmaese at FD9NS01.OKLADOT.STATE.OK.US>, delay=00:00:04,
#                  ^
#                  8
#       xdelay=00:00:00, mailer=relay, pri=120808, relay=[10.36.36.31]
#       [10.36.36.31], dsn=2.0.0, stat=Sent (Message accepted for delivery)
#    interesting fields are marked by "^"

while (true)
        do
        clear
        grep -i "message accepted" /var/log/maillog|tail -56 | cut -d " " -f 1-4,6-8
        echo `date | cut -d " " -f 2-20` -- mailaccepted
        sleep 15
        clear
        done

========================================================

$ cat bin/mqq
#! /bin/sh
#       mqq -- repeatedly display mail queue contents
while (true)
do
k; mq
sleep 5
done

========================================================

You need to know what's actually going on inside the box, how long
mail is taking to go through MailScanner, and so on, and the only way
to find out is by instrumenting your box to watch things.

--
Mike Andrews
mikea at mikea.ath.cx
Tired old sysadmin since 1964



More information about the MailScanner mailing list