1mailstats(1) User Commands mailstats(1)
2
3
4
6 mailstats - print statistics collected by sendmail
7
9 mailstats [-o] [-c ] [-C configfile] [-f statisticsfile]
10 [-p] [-P]
11
12
14 The mailstats utility prints out the statistics collected by the send‐
15 mail(1M) program on mailer usage. These statistics are collected if the
16 file indicated by the StatusFile configuration option of sendmail
17 (defined in /etc/mail/sendmail.cf) exists. The default statistics file
18 is /etc/mail/statistics.
19
20
21 To enable mailstats, you must, as root, touch /etc/mail/statistics. See
22 the StatusFile processing option in sendmail(1M).
23
24
25 mailstats first prints the time that the statistics file was created
26 and the last time it was modified. Then, the statistics for each mailer
27 are displayed on a single line, each with the following whitespace-sep‐
28 arated fields:
29
30 M The mailer number.
31
32
33 msgsfr Number of messages from the mailer.
34
35
36 bytes_from Kbytes from the mailer.
37
38
39 msgsto Number of messages to the mailer.
40
41
42 bytes_to Kbytes to the mailer.
43
44
45 msgsrej Number of messages rejected by the mailer.
46
47
48 msgsdis Number of messages discarded by the mailer.
49
50
51 msgsqur Number of messages quarantined by the mailer.
52
53
54 Mailer The name of the mailer.
55
56
57
58 The display of statistics described above is followed by a separation
59 line containing only equal sign (=) characters. After the separation
60 line, a line preceded with a "T" and totaling the values for all of the
61 mailers is displayed. This is followed by another line preceded with a
62 "C" that lists the number of TCP connections.
63
64
65 To reinitialize the statistics file once a night, add an entry to
66 root's crontab(1):
67
68 mailstats -p > /dev/null
69
70
71
73 The following options are supported:
74
75 -c Try to use submit.cf instead of the default send‐
76 mail configuration file.
77
78
79 -C configfile Specify a sendmail configuration file.
80
81
82 -f statisticsfile Specify a sendmail statistics file.
83
84
85 -o Do not display the name of the mailer in the out‐
86 put.
87
88
89 -p Output information in program-readable mode and
90 clear statistics.
91
92
93 -P Output information in program-readable mode with‐
94 out clearing statistics.
95
96
98 See largefile(5) for the description of the behavior of mailstats when
99 encountering files greater than or equal to 2 Gbyte ( 2^31 bytes).
100
102 /dev/null Zero-lined file
103
104
105 /etc/mail/statistics Default sendmail statistics file
106
107
108 /etc/mail/sendmail.cf Default sendmail configuration file
109
110
112 See attributes(5) for descriptions of the following attributes:
113
114
115
116
117 ┌─────────────────────────────┬─────────────────────────────┐
118 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
119 ├─────────────────────────────┼─────────────────────────────┤
120 │Availability │SUNWsndmu │
121 ├─────────────────────────────┼─────────────────────────────┤
122 │Output Stability │Unstable │
123 └─────────────────────────────┴─────────────────────────────┘
124
126 crontab(1), cron(1M), sendmail(1M), attributes(5), largefile(5)
127
128
129
130SunOS 5.11 24 Jun 2004 mailstats(1)