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
|
.TH s/qmail: qmail-mrtg 8
.SH NAME
qmail-mrtg \- prepare s/qmail logs for MRTG analysis
.SH SYNOPSIS
.B qmail-mrtg [ -1 | -2 | -3 | -4 | -5 | -6 | -a | -b | -c | -d | -e | -f | -g | -h | -i | -j | k | -z | -A | -B ] [time]
.SH DESCRIPTION
.B qmail-mrtg
reads the
.B multilog
tagged
.B s/qmail
logs with TAI64N timestamps on standard input
to produce a counter for specifc
.B s/qmail
events and display them on standard output
suitable for MRTG processing.
.SH USAGE
.B qmail-mrtg
can be used to analyse
.BR qmail-send ,
.BR qmail-smtpd ,
and
.B qmail-pop3d
logs in order to feed the results into MRTG.
Typically,
.B qmail-mrtg
is called by the
.B crontab
facility together with a configuration files telling
.B qmail-mrtg
what to analyse.
.SH ARGUMENTS
.B qmail-mrtg
posses three different sets of commands.
Reading
.B qmail-send
logs:
.I -1
Deliveries/TLS transmitted,
.I -2
Message KBytes enqueued,
.I -3
Local/Remote Concurrency,
.I -4
Failure/Deferred Messages,
.I -5
Bounces/Triple bounces,
.I -6
qmtp/qmtps Messages.
.B qmail-smtpd
logs:
.I -a
total sessions,
.I -b
accepted/rejected sessions,
.I -c
rejected sessions (MTA),
.I -d
rejected originator,
.I -e
rejected recipient,
.I -f
rejected data (Mime + Loader),
.I -g
rejected data (Virus + Spam),
.I -h
authenticated sessions,
.I -i
accepted/rejected TLS sessions,
.I -j
recognized/rejected SPF sessions.
.I -k
deferred SMTP sessions (greylisted).
Summaries are provided by
.I -z
total sessions, including
.B qmail-smtpd
and
.BR tcpserver /
.BR sslserver /
.BR rblsmtpd .
.BR qmail-pop3d /
.B qmail-popup
logs:
.I -A
accepted/rejected POP3 user,
.I -B
.BR qmail-pop3d /
.BR tcpserver /
.B sslserver
connections.
The intervals to evaluate the information given on STDIN
defaults to
.IR 305\ secs
and can be changed by the second argument for
.BR qmail-mrtg .
.SH "CONFIGURATION FILES"
.B qmail-mrtg
depends on a configuration file for each service.
Sample configuration files are provided.
.SH "CRON INVOCATION"
Since
.B qmail-mrtg
typically is invoked by the
.B cron
facility, additional information neeeds to be supplied:
.EX
*/5 * * * * env LANG=C mrtg /etc/qmail-mrtg.send.cfg &>/dev/null
*/5 * * * * env LANG=C mrtg /etc/qmail-mrtg.smtpd.cfg &>/dev/null
*/5 * * * * env LANG=C mrtg /etc/qmail-mrtg.pop3d.cfg &>/dev/null
.EE
Note: The default interval of
.IR 305\ secs
allows a certain overlap for cron not to loose events at the very
edge.
.SH "CREDITS"
.B MRTG
is a program created by Tobias Oetiker and Dave Rand
(http://oss.oetiker.ch/mrtg/).
.SH "SEE ALSO"
mrtg(1),
crontab(5),
cron(8),
qmail-log(8),
qmail-send(8),
qmail-smtpd(8),
qmail-popup(8).
|