SUMMARY : mail statistics ?

From: Murat Balci <balci_at_bornova.ege.edu.tr>
Date: Wed, 3 Apr 1996 11:45:02 +0400 (EET DST)

Hi,
Yesterday I asked :

Is there any utility that counts daily mail incoming/outgoings ?
I know mailstats but, its fairly raw..

- o -
Thanx to :
Arrigo Triulzi <arrigo_at_lpac.ac.uk>
Glenn Rickersey <glennr_at_wormald.com.au>
Mary Aplin <aplin_at_alpha.loyno.edu>

- o -

Arrigo Triulzi said :

You might want to consider the mailstats in sendmail 8.7.5 which is
less raw and more woffly, I even have a script sending me stats on a
weekly basis - I get things like this:

Statistics from Mon Apr 1 00:01:15 1996
 M msgsfr bytes_from msgsto bytes_to Mailer
 0 0 0K 900 6544K prog
 1 0 0K 744 6558K *file*
 3 1557 13637K 277 734K local
 5 283 996K 1602 13491K esmtp
========================================
 T 1840 14633K 3523 27327K

which is clearer than the standard OSF/1 system. The script I use is:


#!/bin/sh

CFFILE=/etc/sendmail.cf
STATSFILE=/var/adm/sendmail/sendmail.st
MAILSTATS=/usr/local/sendmail/sbin/mailstats
OLDSTATSDIR=/usr/adm/sendmail/stats.old

NEWSTATSFILE=${OLDSTATSDIR}/sendmail.st-`date '+%y-%b-%d-%H:%M'`

if [ -s ${STATSFILE} -a -f ${MAILSTATS} ]
then
  mv ${STATSFILE} ${NEWSTATSFILE}
  touch ${STATSFILE} ; chmod 644 ${STATSFILE}
  ${MAILSTATS} -C ${CFFILE} -f ${NEWSTATSFILE}
fi

exit 0

which resets the statistics on a weekly basis when placed in a cron
job like:

1 0 * * 1 /usr/local/sendmail/sbin/sendmailstats | Mail -s "Weekly mail
statistics (`date`
for gateway)" postmaster

direct from Allman's sendmail bible.

>> I did it, thanx.

- o -

Glenn Rickersey said :

Tom Christiansen wrote something ages ago called "ssl".

It looks at sendmail debug logs and outputs things like most
from/to sizes from/to.

perl.com /pub/perl/scripts/ssl from memory.

>> I got it, It works great :)

- o -

and Mary Aplin said :

I wrote a program to do this, but it is in VAX DCL. (I didn't know C at
the time.) If you have access to DCL and would like it, let me know.

>> and I'm witing for it..

- o -

Thanx for all.
Sincerely.
murat.


----
Murat Balci	UNIX sys. Admin	  http://bornova.ege.edu.tr/~balci
s-mail : Ege Universitesi B.A.U.M - Bornova, IZMIR, TURKIYE.
e-mail : balci_at_bornova.ege.edu.tr   Phone :+(90)(232)3881080-253
Received on Wed Apr 03 1996 - 11:14:53 NZST

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:46 NZDT