Turn your spam into colorful art!
Use amavis-stats and rrdtool to chart out your spam/ham/virus history from your mail logs.
Firstly - this is a follow on to this article on Updated Spam/Virus controls with OS X Server. If you can't get that stuff working - this won't either... start there and let it churn for a few days then try this.
1. Update a few perl packages.
CPAN makes it easy.
sudo perl -MCPAN -e shell
Then from the cpan prompt
install Getopt::Std Time::localtime Time::Local
To see if other components are out of date enter "r" at the cpan prompt and most of the perl components will update without a problem.
If you want to try updating the whole shebang - try:
sudo perl -MCPAN -e 'CPAN::Shell->install(CPAN::Shell->r)'
2. Now install rrdtools which will turn your spam into pretty art.
curl -O http://people.ee.ethz.ch/~oetiker/webtools/rrdtool/pub/rrdtool
-1.0.49.tar.gz
tar -zxvf rrdtool-1.0.49.tar.gz
cd rrdtool-1.0.49
./configure --enable-shared
make
sudo make install
sudo make site-perl-install
then because we want rrdtool to be available to "minimal users"
sudo ln -s /usr/local/rrdtool-1.0.49/bin/rrdtool /usr/bin/rrdtool
3. Now for Amavis-stats which will generate the data from your mail files that rrdtools will use.
You should have built the clamav user and groups in the install of clamav so we will use them again here.
curl -O http://rekudos.net/download/amavis-stats.tar.gz
tar -zxvf amavis-stats.tar.gz
cd amavis-stats-0.1.12
./configure --with-amavis-user=clamav --with-amavis-group=clamav
make
sudo make install
Now you'll need to make some edits to the config file for amavis-stats.
sudo pico /etc/amavis-stats/apache.conf
Change the amavis-stats/apache.conf file to look like this:
Alias /amavis-stats /usr/local/share/amavis-stats/ Options +FollowSymLinks AllowOverride None order allow,deny allow from allAlternatively you could just include this in the mail httpd.conf file, or copy the apache.conf file to /etc/httpd/sites.
ls -laF total 120 drwxr-xr-x 7 clamav clamav 238 22 Sep 08:42 ./ drwxr-xr-x 4 root wheel 136 22 Sep 08:37 ../ -rw-r--r-- 1 clamav clamav 43036 22 Sep 08:42 1.rrd -rw-r--r-- 1 clamav clamav 6 22 Sep 08:42 amavis-stats.count -rw-r--r-- 1 clamav clamav 9 22 Sep 08:42 amavis-stats.names -rw-r--r-- 1 clamav clamav 24 22 Sep 08:42 amavis-stats.seen -rw-r--r-- 1 clamav clamav 65 22 Sep 08:42 amavis-stats.state
AFP548
http://www.afp548.com/article.php?story=20040922115018428