mailstats.1 (2010 09)

m
mailstats(1) mailstats(1)
NAME
mailstats - print mail traffic statistics
SYNOPSIS
mailstats [-C cffile ][
-f stfile ][-o][-p]
DESCRIPTION
mailstats reads and interprets the sendmail statistics file, and then prints out the mail traffic
statistics. The statistics file is the one set by the
StatusFile option in the
/etc/mail/sendmail.cf
. The default statistics file is
/etc/mail/sendmail.st
. If the statis-
tics file exists,
sendmail collects statistics about your mail traffic and stores them in that file. This file
does not grow.
Statistics are gathered on a per-mailer basis for each mailer defined in the
sendmail configuration file.
Statistics are kept on the number of messages and the number of bytes for all inbound and outbound
traffic.
The
mailstats utility displays the time at which statistics collection was started on the first line.
Then, the statistics of each mailer is displayed on a single line, each with the following white space
separated fields (see the "EXAMPLES" section below):
M The mailer number.
msgsfr Number of messages from the mailer.
bytes_from Kbytes from the mailer.
msgsto Number of messages to the mailer.
bytes_to Kbytes to the mailer.
msgsrej Number of messages rejected.
msgsdis Number of messages discarded.
Mailer The name of the mailer.
After this display, a line totaling the values for all of the mailers is displayed, separated from the previ-
ous information by a line containing only equals (‘‘=’’) characters.
Note
mailstats can be used by privileged users only.
Options
The options are as follows:
-C cffile Read the specified cffile instead of the default /etc/mail/sendmail.cf
file.
-f stfile Read the specified statistics file, stfile, instead of the statistics file specified in the
/etc/mail/sendmail.cf file.
-o Do not display the name of the mailer in the output.
-p Output information in program-readable mode and clear statistics.
To clear the statistics file, execute, as root:
cp /dev/null statistics- file
RETURN VALUE
The
mailstats utility exits with 0 on success, and >0 if an error occurs.
DIAGNOSTICS
mailstats generates error messages if the statistics file is not accessible or if the size of the statistics
file has changed. Error messages are:
mailstats: file size changed
Either statistics- file is zero length, meaning that no mail has been transferred since it was
cleared out, or its size has changed. Since the size of this file is supposed to remain constant,
any change in size means that the file is invalid.
HP-UX 11i Version 3: September 2010 1 Hewlett-Packard Company 1

Summary of content (2 pages)