tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
From: Murat Balci <balci () bornova ! ege ! edu ! tr>
To: tru64-unix-managers
Subject: SUMMARY : mail statistics ?
Date: Wed, 03 Apr 1996 07:45:02 +0000	[thread overview]
Message-ID: <96076331021129.tru64-unix-managers.marc@archive.invalid> (raw)


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@lpac.ac.uk>
Glenn Rickersey <glennr@wormald.com.au>
Mary Aplin <aplin@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@bornova.ege.edu.tr   Phone :+(90)(232)3881080-253

                 reply	other threads:[~1996-04-03  7:45 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox