[Mimedefang] Graphing Utilities

John Kirkland jpk at bl.org
Mon Sep 23 02:18:01 EDT 2002


All,

Enclosed is the README for the Mimedefang Graphing Utilities that I
mentioned on the list earlier today (yesterday... depending on your
timezone).  I've completed the first set of features that I wanted to get
working, and here it is.

DEMO:  http://www.westover.org/~jpk/spam
FILES: http://www.bl.org/~jpk/graphdefang

Regards,
John Kirkland


DESCRIPTION
-----------

GraphDefang is a perl utility that parses custom mimedefang syslog
files and creates a set of configurable charts (png files) with the data.
These log files can either come from syslog within mimedefang-filter or
from parsing through MimeDefang Quarantine Directories with an enclosed
shell script.

The following attributes are definable:

        * Chart Type  (stacked_bar or line)
        * Chart Time  (hourly, weekly, or monthly)
        * X-Axis      (Summary, VirusName, Sender, Recipient, Subject)
        * Y-Axis      (Spam Counts, Virus Counts, or both)
        * Top Number of Items to Display

You can see the output in action at:

        http://www.westover.org/~jpk/spam

DOWNLOAD
--------

         http://www.bl.org/~jpk/graphdefang


REQUIRED PERL MODULES
---------------------

GD
GD::Graph
Date::Parse;
Date::Format;


INCLUDED FILES
--------------

createlog.sh      => Shell script to create input log files from
                     MimeDefang Quarantine Directories
graphdefanglib.pl => Calculation and graphing routines.
graphdefang.pl    => Front-end perl script.
index.php         => Very simple php file to display the resulting png
                     files
README            => This file
TODO              => Prioritized list of next things to work on.
COPYING           => Copy of the GPL


INSTALLATION INSTRUCTIONS
-------------------------

1.  Install Required Perl Modules


2.  Create 'local3' syslog entries.

I added the following lines to my /etc/syslog.conf file:

# Mimedefang

local3.=info        /var/log/mimedefang/spamstats
local3.=warning     /var/log/mimedefang/virusstats


3.a.  Add syslog'ing to mimedefang-filter

[Filter instruction cut from this email... they are in the README]

3.b.  Alternatively, you can extract log files from the contents of your
      existing Quarantine Directories (assuming you have these!);
      Use createlog.sh for this task.

4.  Modify INCOMING dirs in graphdefang.pl to point to log files
    (either from syslog or from the quarantine files).

5.  Modify OUTGOING dir in graphdefanglib.pl to point to web directory.

6.  Copy index.php to the OUTGOING web directory.

7.  Run graphdefang.pl via cron.  I run mine hourly.


LICENSE
-------
GraphDefang is released under the GPL license.  A copy of the GPL is
included in this distribution under the file, COPYING.




More information about the MIMEDefang mailing list