From a68c63509cc20ef1b33e85ec61408f140724c514 Mon Sep 17 00:00:00 2001 From: Fredrik Wahlberg Date: Wed, 31 Oct 2007 12:31:30 +0000 Subject: [PATCH] =?UTF-8?q?=C3=84ndrade=20taket=20i=20milter=5Fgreylist=20?= =?UTF-8?q?Ny=20plugin=20f=C3=B6r=20clamav,=20baserad=20p=C3=A5=20Spamassa?= =?UTF-8?q?ssin?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- clamav | 47 +++++++++++++++++++++++++++++++++++++++++++++++ milter_greylist | 2 +- 2 files changed, 48 insertions(+), 1 deletion(-) create mode 100755 clamav diff --git a/clamav b/clamav new file mode 100755 index 0000000..6b3bdfc --- /dev/null +++ b/clamav @@ -0,0 +1,47 @@ +#!/bin/sh +# +# Plugin to count the ClamAntivirus troughput +# +# Adapted from the spamassassin plugin by David Obando +# +# Magic markers - optional - used by installation scripts and +# munin-config: +# +#%# family=manual +#%# capabilities=autoconf + +if [ "$1" = "autoconf" ]; then + if [ -r /var/log/syslog ]; then + echo "yes" + else + echo "no (cannot read /var/log/syslog)" + fi + exit 0 +fi + +if [ "$1" = "config" ]; then + + echo 'graph_title ClamAv stats' + echo 'graph_args --base 1000 -l 0 ' + echo 'graph_vlabel ClamAv mail/sec' + echo 'graph_order clean infected' + echo 'graph_category Mail' + echo 'clean.label clean' + echo 'clean.type DERIVE' + echo 'clean.min 0' + echo 'clean.draw LINE2' + echo 'infected.label infected' + echo 'infected.type DERIVE' + echo 'infected.min 0' + echo 'infected.draw LINE2' + exit 0 +fi + +# create a secure tmp file +TEMP=`/bin/mktemp /tmp/clamav-XXXXXX` +egrep "X-Virus-Status" /var/log/mail.log >> $TEMP + +echo -n "infected.value " && grep "Infected" $TEMP | wc -l +echo -n "clean.value " && grep "Clean" $TEMP | wc -l + +rm $TEMP diff --git a/milter_greylist b/milter_greylist index 5ad6dda..8c76207 100755 --- a/milter_greylist +++ b/milter_greylist @@ -28,7 +28,7 @@ if [ "$1" = "config" ]; then echo 'graph_info This graph shows the current number of greylisted and whitelisted senders.' echo 'grey.label Greylisted' # echo 'grey.max 10000' -# echo 'grey.min 0' +# echo 'grey.min 1000' echo 'grey.info The number of greylisted hosts.' # echo 'white.label Whitelisted' #echo 'white.max 500'