I have written a stats utility for qmail-scanner (version
1.22 only) called qms-analog. It requires a patch to the
1.22 distribution in order to generate a suitable log file.
I have nightly emailed stats working for qmail-scanner
version 1.22 with my utility qms-analog.
It works with QmailRocks, qmail-scanner-1.22 (only), clamAV,
and Spamassassin.
Here is the README file from the distro:
qms-analog: Qmail-Scanner Log File Analyzer
-------------------------------------------
Version: 0.1.0
Distribution Files
------------------
Makefile - builds the qms-analog utility
qmail-scanner-1.22.diff - patch file to add event logging
qmailstats - improved script which invokes
qms-analog
qms-analog-types.txt - defines the event log types
qms-analog.c - source file for the utility
README - this file
What You Get
------------
/var/qmail/qmailstats
My updated version that tidies things up a bit and
invokes qms-analog to produce the qmail-scanner stats at the
bottom of the nightly Qmail stats email (see QmailRocks
procedure for details).
/var/qmail/bin/qms-analog
The utility which takes
var/spool/qmailscan/qms-events.log
records as input from stdin and generates statistics on
stdout.
/var/qmail/bin/qmail-scanner-queue.pl
The patched version which generates nice logs in
/var/spool/qmailscan/qms-events.log.
!!!!!!!! ATTENTION: READ THIS FIRST !!!!!!!!
--------------------------------------------
qms-analog requires a patch be applied to your
qmail-scanner-1.22 distribution in order to generate a new,
more legible log file.
The following are minimum requirements for qms-analog to work:
1) qmail-scanner version 1.22
2) ClamAV
3) Spamassassin
If you don't have these, and are unwilling to upgrade or
install them, DO NOT USE qms-analog. I cannot be responsible
for what might happen.
Generally speaking, qms-analog is intended as a supplement
to the QmailRocks system. Using it outside of QmailRocks is
not tested or supported. You are on your own...
If you meet these requirements, let's get started...
Note Concerning Where This Fits In the QmailRocks Procedure
-----------------------------------------------------------
I would suggest installing qmail-scanner-1.22 instead of
1.21 in step 14 of the QmailRocks procedure. Then install
the patch (step A below) prior to configuring
qmail-scanner-1.22 (the two ./configure instructions).
Finally, install qms-analog (step B below) at the
end of step 14 in the QmailRocks procedure.
A. Patching the qmail-scanner-1.22 Distribution
-----------------------------------------------
1) Obtain the source distribution qmail-scanner-1.22.tar.gz.
2) Extract it to the location of your choice.
3) Make a backup copy of the qmail-scanner-1.22 directory
before patching it:
cp -R qmail-scanner-1.22 qmail-scanner-1.22-orig
4) Copy qmail-scanner-1.22.diff from the qms-analog distro
to the qmail-scanner-1.22 directory where the tarball was
extracted.
cp <path_qms_analog>/qmail-scanner-1.22.diff
<path_qm-scanner-1.22>
5) Change directory to the qmail-scanner-1.22 distribution:
cd <path_qm-scanner-1.22>
6) Patch qmail-scanner-1.22:
patch -p1 < qmail-scanner-1.22.diff
7) Configure qmail-scanner-1.22 as described in the
qmail-scanner-1.22 README with the following additions which
can be added as options to the configure script:
a) --sa_delete=x - restored for 1.22 by this patch. The
patch is worth it just for this - x is the amount over
sa_max required to delete a SPAM email msg (I like a value
of 1). Remember a value of "0" disables msg deletion for
SPAM :(. Defaults to disabled.
b) --qms-log=[0|1] - enables or disables generation of
the qms-events.log file (which is needed by qms-analog).
Defaults to enabled.
8) Configure the rest of the QmailRocks system as documented.
B. Building qms-analog and installing it with a new
qmailstats script
-----------------------------------------------------------
1) Become root
2) cd to the qms-analog directory (wherever you extracted it)
3) make all
C. Testing
----------
Allow several logs to accumulate in
/var/spool/qmailscan/qms-events.log.
Execute /var/qmail/qmailstats. This should generate the
nightly email to the postmaster including the qms-analog
stats at the bottom.
D. Notes
--------
If you have any problems, first just restore the original
qmail-scanner-1.22 distribution (we backed it up, right?)
and configure it as normal. Also, let me know, perhaps I can
fix it or help you through a simple problem.
Mark Teel
[EMAIL PROTECTED]
qms-analog-0.1.0.tar.gz
Description: application/gzip