.\" @(#)mailstats 40.1 89/09/22 SMI;
'\" macro stdmacro
.\" Copyright (c) 1988 Sun Microsystems, Inc. - All Rights Reserved.
.\"
.nr X
.if \nX=0 .ds x} mailstats 1M "BSD Compatibility Package" "\&"
.if \nX=1 .ds x} mailstats 1M "BSD Compatibility Package"
.if \nX=2 .ds x} mailstats 1M "" "\&"
.if \nX=3 .ds x} mailstats "" "" "\&"
.TH \*(x}
.SH NAME
\f4mailstats\f1 \- print statistics collected by sendmail
.SH SYNOPSIS
\f4/usr/ucb/mailstats\f1
[
\f2filename\f1
]
.SH DESCRIPTION
\f4mailstats\f1
prints out the statistics collected by the
\f4sendmail\f1
program on mailer usage.
These statistics are collected if the file indicated by the
\f4S\f1
configuration option of
\f4sendmail\f1
exists.
\f4mailstats\f1
first prints the time that the statistics file was
created and the last time it was modified.
It will then print a table with one row for each mailer specified in
the configuration file.
The first column is the mailer number, followed by the symbolic
name of the mailer.
The next two columns refer to the number of messages received by
\f2sendmail\f1,
and the last two columns refer to messages sent by
\f2sendmail\f1.
The number of messages and their total
size (in 1024 byte units) is given.
No numbers are printed if no messages
were sent (or received) for any mailer.
.P
You might want to add an entry to
\f4/var/spool/cron/crontab/root\f1
to reinitialize the statistics file once a night.
Copy
\f4/dev/null\f1
into the statistics file or otherwise truncate it
to reset the counters.
.SH FILES
.PD 0
.\".TP 20
.\"\f4/etc/sendmail.st\f1
.\"default statistics file
.\".TP
.\"\f4/etc/sendmail.cf\f1
.\"sendmail configuration file
.TP
\f4/var/spool/cron/crontab/root\f1
.TP
\f4/dev/null\f1
.PD
.SH SEE\ ALSO
\f4sendmail\fP(1M).
.SH NOTES
\f4mailstats\f1
should read the configuration file instead of having
a hard-wired table mapping mailer numbers to names.
