Ändrade taket i milter_greylist

Ny plugin för clamav, baserad på Spamassassin
This commit is contained in:
2007-10-31 12:31:30 +00:00
parent 8d3fbc8cc9
commit a68c63509c
2 changed files with 48 additions and 1 deletions

47
clamav Executable file
View File

@@ -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

View File

@@ -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'