1--- What qmailanalog needs from your log
2
3Before using qmailanalog, make sure that your qmail log contains
4microsecond timestamps: e.g.,
5
6   901967408.113926 new msg 19287
7   901967408.116537 info msg 19287: bytes ...
8
9Several programs can generate these timestamps: splogger, accustamp,
10logger2, etc. The default qmail installation sends logs through splogger
11and then through syslogd:
12
13   Aug  1 05:30:08 host qmail: 901967408.113926 new msg 19287
14   Aug  1 05:30:08 host qmail: 901967408.116537 info msg 19287: bytes ...
15
16To remove the "Aug 1 05:30:08 host qmail:" added by syslogd, feed your
17logs through
18
19   awk '{$1="";$2="";$3="";$4="";$5="";print}'
20
21Note that the syslog mechanism is inherently unreliable: it does not
22guarantee that all messages will be logged. For reliable logs, try the
23logging utilities in the daemontools package.
24
25
26--- Feeding the log through matchup
27
28The qmailanalog/bin/matchup program monitors qmail's delivery attempts.
29It prints various information in a form suitable for further analysis.
30
31If you have saved the complete qmail log, you can simply run matchup
32with the log as input, and use the matchup output as described below.
33
34Running matchup again and again on a growing log is unnecessarily slow.
35You can save time by breaking the log into a series of chunks and
36running matchup just once on each chunk. (You can also save space by
37discarding a chunk once matchup is done with it.) Note that matchup
38keeps track of messages and delivery attempts across chunks; see the
39matchup man page for the correct command lines.
40
41You could pipe qmail's log directly through matchup before it is logged,
42Beware, however, that matchup will quit if it runs out of memory.
43
44
45--- Using the matchup results
46
47You can feed the matchup output through any of the qmailanalog/bin/z*
48scripts. Each script explains its output. Use zoverall for basic
49statistics, zsendmail for a sendmail-flavored log.
50
51The qmailanalog/bin/x* scripts extract information about particular
52messages, senders, or recipients. You can feed the x* output through the
53z* scripts.
54