DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

mailstats(ADMN)


mailstats -- print statistics collected by sendmail

Syntax

/usr/bin/mailstats [ -C config_file ] [ -p ] [ -f filename ] [ -o ]

Description

mailstats prints out statistics on mailer usage as collected by the sendmail(ADMN) program. sendmail collects these statistics into the file specified by the ``S'' configuration option of sendmail, but collects these statistics only if this file exists. This file must be created manually by the system administrator.

By default, mailstats reads the file specified by the ``S'' configuration option of sendmail for the statistics to display. The -f option allows you to specify a different source file. The -p option outputs information in program-readable mode and clears statistics.

The default sendmail configuration file where mailstats looks for the ``S'' configuration option setting is /usr/lib/sendmail.cf. The -C option allows you to specify a different configuration file.

mailstats first displays the start time for the statistics in the format of ctime(S). The statistics for each mailer are displayed on a single line with the following fields separated by whitespace:


M
shows the mailer number

msgsfr
shows the number of mail messages received by sendmail from this mailer

bytes_from
shows the collective size, in 1024 byte units, of the messages counted in the previous column

msgsto
shows the number of mail messages sent by sendmail using this mailer

bytes_to
shows the collective size, in 1024 byte units, of the messages counted in the previous column.

msgrej
the number of messages rejected.

msgsdis
the number of messages discarded.

Mailer
shows the name of the mailer. The mailer name can be suppressed using the -o option.
After this display, a line totaling the values for all of the mailers is displayed (preceeded with a ``T''), separated from the previous information by a line containing only equals (``='') characters. Another line preceeded with a ``C'' lists the number of connections.

An entry can be added to /usr/spool/cron/crontabs/root to reinitialize the statistics once every day/night. Copy /dev/null into the statistics file (/usr/lib/sendmail.st) or otherwise truncate it to reset the counters.

Files

/usr/lib/sendmail.st default statistics file
/usr/lib/sendmail.cf sendmail configuration file
/usr/spool/cron/crontabs/root
/dev/null

See also

sendmail(ADMN), sendmail.cf(SFF)
© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003