summaryrefslogtreecommitdiff
path: root/usr/src/man/man1/mailstats.1
blob: fed9e8f6bb1e4e7f232476f93dd1b7fddf234488 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
'\" te
.\"  Copyright (c) 2004, Sun Microsystems, Inc.  All Rights Reserved
.\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
.\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
.TH MAILSTATS 1 "Jun 24, 2004"
.SH NAME
mailstats \- print statistics collected by sendmail
.SH SYNOPSIS
.LP
.nf
\fBmailstats\fR [\fB-o\fR] [\fB-c\fR ] [\fB-C\fR \fIconfigfile\fR] [\fB-f\fR \fIstatisticsfile\fR]
     [\fB-p\fR] [\fB-P\fR]
.fi

.SH DESCRIPTION
.sp
.LP
The \fBmailstats\fR utility prints out the statistics collected by the
\fBsendmail\fR(1M) program on mailer usage. These statistics are collected if
the file indicated by the \fBStatusFile\fR configuration option of
\fBsendmail\fR (defined in \fB/etc/mail/sendmail.cf\fR) exists. The default
statistics file is \fB/etc/mail/statistics\fR.
.sp
.LP
To enable \fBmailstats\fR, you must, as root, touch \fB/etc/mail/statistics\fR.
See the \fBStatusFile\fR processing option in \fBsendmail\fR(1M).
.sp
.LP
\fBmailstats\fR first prints the time that the statistics file was created and
the last time it was modified. Then, the statistics for each mailer are
displayed on a single line, each with the following whitespace-separated
fields:
.sp
.ne 2
.na
\fBM\fR
.ad
.RS 14n
The mailer number.
.RE

.sp
.ne 2
.na
\fBmsgsfr\fR
.ad
.RS 14n
Number of messages from the mailer.
.RE

.sp
.ne 2
.na
\fBbytes_from\fR
.ad
.RS 14n
Kbytes from the mailer.
.RE

.sp
.ne 2
.na
\fBmsgsto\fR
.ad
.RS 14n
Number of messages to the mailer.
.RE

.sp
.ne 2
.na
\fBbytes_to\fR
.ad
.RS 14n
Kbytes to the mailer.
.RE

.sp
.ne 2
.na
\fBmsgsrej\fR
.ad
.RS 14n
Number of messages rejected by the mailer.
.RE

.sp
.ne 2
.na
\fBmsgsdis\fR
.ad
.RS 14n
Number of messages discarded by the mailer.
.RE

.sp
.ne 2
.na
\fBmsgsqur\fR
.ad
.RS 14n
Number of messages quarantined by the mailer.
.RE

.sp
.ne 2
.na
\fBMailer\fR
.ad
.RS 14n
The name of the mailer.
.RE

.sp
.LP
The display of statistics described above is followed by a separation line
containing only equal sign (\fB=\fR) characters. After the separation line, a
line preceded with a "\fBT\fR" and totaling the values for all of the mailers
is displayed. This is followed by another line preceded with a "\fBC\fR" that
lists the number of TCP connections.
.sp
.LP
To reinitialize the statistics file once a night, add an entry to root's
\fBcrontab\fR(1):
.sp
.in +2
.nf
mailstats -p > /dev/null
.fi
.in -2
.sp

.SH OPTIONS
.sp
.LP
The following options are supported:
.sp
.ne 2
.na
\fB\fB-c\fR \fR
.ad
.RS 21n
Try to use \fBsubmit.cf\fR instead of the default \fBsendmail\fR configuration
file.
.RE

.sp
.ne 2
.na
\fB\fB-C\fR \fIconfigfile\fR\fR
.ad
.RS 21n
Specify a \fBsendmail\fR configuration file.
.RE

.sp
.ne 2
.na
\fB\fB-f\fR \fIstatisticsfile\fR\fR
.ad
.RS 21n
Specify a \fBsendmail\fR statistics file.
.RE

.sp
.ne 2
.na
\fB\fB-o\fR\fR
.ad
.RS 21n
Do not display the name of the mailer in the output.
.RE

.sp
.ne 2
.na
\fB\fB-p\fR\fR
.ad
.RS 21n
Output information in program-readable mode and clear statistics.
.RE

.sp
.ne 2
.na
\fB\fB-P\fR\fR
.ad
.RS 21n
Output information in program-readable mode without clearing statistics.
.RE

.SH USAGE
.sp
.LP
See \fBlargefile\fR(5) for the description of the behavior of \fBmailstats\fR
when encountering files greater than or equal to 2 Gbyte ( 2^31 bytes).
.SH FILES
.sp
.ne 2
.na
\fB\fB/dev/null\fR\fR
.ad
.RS 25n
Zero-lined file
.RE

.sp
.ne 2
.na
\fB\fB/etc/mail/statistics\fR\fR
.ad
.RS 25n
Default \fBsendmail\fR statistics file
.RE

.sp
.ne 2
.na
\fB\fB/etc/mail/sendmail.cf\fR\fR
.ad
.RS 25n
Default \fBsendmail\fR configuration file
.RE

.SH ATTRIBUTES
.sp
.LP
See \fBattributes\fR(5) for descriptions of the following attributes:
.sp

.sp
.TS
box;
c | c
l | l .
ATTRIBUTE TYPE	ATTRIBUTE VALUE
_
Output Stability	Unstable
.TE

.SH SEE ALSO
.sp
.LP
\fBcrontab\fR(1), \fBcron\fR(1M), \fBsendmail\fR(1M), \fBattributes\fR(5),
\fBlargefile\fR(5)