DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

mailstats(1M)


mailstats -- print statistics collected by sendmail

Synopsis

/etc/mail/mailstats [ -C config_file ] [ -f filename ] [ -o ]

Description

mailstats prints out statistics on mailer usage as collected by the sendmail(1M) 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 default sendmail configuration file where mailstats looks for the ``S'' configuration option setting is /etc/sendmail.cf. The -C option allows you to specify a different configuration file.

The first row of mailstats' output is the date and time at which the collection of the displayed statistics began. Beneath the date and time row is a table in the following format:

   M  msgsfr  bytes_from  msgsto  bytes_to  msgsrej  msgsdis  Mailer
The table will contain one row for each mailer that is specified in the sendmail configuration file for which messages have been sent or received. No numbers are printed if no messages were sent (or received) for any mailer. The table columns contain the following:

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

msgsrej
shows the number of mail messages rejected by sendmail using this mailer

msgsdis
shows the number of mail messages discarded by sendmail using this mailer

Mailer
shows the name of the mailer. The mailer name can be suppressed using the -o option.
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 (/etc/mail/sendmail.st) or otherwise truncate it to reset the counters.

Files


/etc/mail/sendmail.st
Default statistics file.

/etc/sendmail.cf
sendmail configuration file.

/usr/spool/cron/crontabs/root

/dev/null

Examples

   Statistics from Sat Oct 10 14:14:39 1993
    M msgsfr bytes_from  msgsto   bytes_to    Mailer
    3     23        457K      3          3K   local
    5      3          3K     13         13K   tcp
In the above example, the first row indicates that the mailer statistics displayed represent a time period between Sat Oct 10 14:14:39 1993 and the time mailstats was invoked. From mailer program number 3, which is the ``local'' mailer, sendmail has received 23 messages (accounting for a total of 457KB); sendmail has delivered 3 messages to the ``local'' mailer (accounting for a total of 13K bytes).

References

sendmail(1M)
© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 25 April 2004