AnonSec Shell
Server IP : 85.193.89.191  /  Your IP : 18.191.239.146
Web Server : Apache
System : Linux 956367-cx40159.tmweb.ru 3.10.0-1160.105.1.el7.x86_64 #1 SMP Thu Dec 7 15:39:45 UTC 2023 x86_64
User : bitrix ( 600)
PHP Version : 8.1.27
Disable Function : NONE
MySQL : OFF  |  cURL : OFF  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /proc/982/root/usr/share/munin/plugins/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     

Current File : /proc/982/root/usr/share/munin/plugins/qmailscan
#!/usr/bin/sh
# -*- sh -*-

: << =cut

=head1 NAME

qmailscan - Plugin to graph output from qmailscan and clamav

=head1 CONFIGURATION

No configuration necessary.

=head1 AUTHOR

Contributed by David Obando (david@cryptix.de) - 03.12.2005

=head1 LICENSE

GPLv2

=cut

# define the logfiles. when you rotate them at any other time than 00:00 you have to define two logfiles:
LOG0=/var/spool/qmailscan/quarantine.log
LOG1=/var/spool/qmailscan/quarantine.log.1


if [ "$1" = "autoconf" ]; then
        echo yes
        exit 0
fi

if [ "$1" = "config" ]; then

        echo 'graph_title Virus types'
        echo 'graph_args --base 1000 -l 0 '
        echo 'graph_vlabel Daily Virus Types'
        echo 'graph_category Mail'
        grep "$(date "+%d %b %Y")" "$LOG0" "$LOG1" | \
               grep -vE 'Disallowed  characters found in MIME headers|Disallowed breakage found in header name - potential virus|Disallowed MIME comment found in header name - potential virus' | \
               sed 's/clamdscan.*$//' | sed 's/[ \t]*$//' | \
               cut -f 5 | sort | uniq -c | sort -r | sed 's/\.\|-/_/g' | while read -r i; do
                       name=$(echo "$i" | awk '{print $2}')
                       echo "$name.label $name"
                       echo "$name.draw LINE2"
               done

        exit 0
fi

grep "$(date "+%d %b %Y")" "$LOG0" "$LOG1" | \
        grep -vE 'Disallowed  characters found in MIME headers|Disallowed breakage found in header name - potential virus|Disallowed MIME comment found in header name - potential virus' | \
        sed 's/clamdscan.*$//' | sed 's/[ \t]*$//' | \
        cut -f 5 | sort | uniq -c | sort -r | sed 's/\.\|-/_/g' | while read -r i; do
                name=$(echo "$i" | awk '{print $2}')
                printf "%s.value " "$name"
                echo "$i" | awk '{print $1}'
        done

Anon7 - 2022
AnonSec Team