[prev in list] [next in list] [prev in thread] [next in thread] 

List:       qmail
Subject:    Re: QmailAnalog and 'mailer'?
From:       Charles Cazabon <qmail () discworld ! dyndns ! org>
Date:       2002-04-27 14:26:46
[Download RAW message or body]

Brian Clare <bfc@porte.com> wrote:
> 
> The script is called mailer and is in the qmailanalog/bin/ directory, so 
> I assumed it was part of the .70 release.

No, it's not included in the tarball.

> Anyway, the script is below.  Here's some of the rotated *.s qmail log too.

> @400000003cc794d717cfcd64 new msg 20111

Okay, these are multilog logs, with tai64n timestamps.

> #!/bin/sh
> #
> # Mail all the stats out someplace sensible.
> #
> 
> RAWLOG=/var/log/qmail/*.s
> STATSPROGS="zoverall zdeferrals zfailures zsuccesses zrecipients zrhosts 
> zrxdelay zsenders zsuids zddist"
> RECIPIENTS=bfc@porte.com
> 
> cat <<EOF >/tmp/qmail.$$.comp
> X-Mailer: /bin/cat v1.0
> To: $RECIPIENTS
> Subject: Qmail logs for `hostname`
> --------
> EOF
> 
> # Munge the logs into an intermediary format.
> awk '{$1="";$2="";$3="";$4="";$5="";print}' < /var/log/maillog \
>          | /usr/local/qmailanalog/bin/matchup > $RAWLOG

But your script is looking at /var/log/maillog, which is usually a syslog
resulting from using "splogger qmail" as your logger.  The above script also
expects the logs to be in syslog format, with daemontools-0.53-style tai
timestamps, not tai64n timestamps.

It looks like you're looking for a script that does nightly analysis and mails
the results to you.  I posted a script that does exactly this a while back:

http://www.ornl.gov/its/archives/mailing-lists/qmail/2001/06/msg01283.html

Note that if you need qlogselect, it's missing from Bruce's latest qlogtools
package, but you can grab it here:
http://www.qcc.ca/~charlesc/software/misc/

Charles
-- 
-----------------------------------------------------------------------
Charles Cazabon                            <qmail@discworld.dyndns.org>
GPL'ed software available at:     http://www.qcc.ca/~charlesc/software/
-----------------------------------------------------------------------
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic