michael@201: Index: mailgraph.cgi michael@201: --- mailgraph.cgi.orig 2007-08-29 11:06:01 +0200 michael@201: +++ mailgraph.cgi 2007-08-29 19:05:41 +0200 michael@201: @@ -183,13 +183,6 @@ michael@201: } michael@201: michael@201: print < michael@201: - michael@201: -
michael@201: -Mailgraph $VERSION michael@201: -by David Schweikert michael@201: - michael@201: -
michael@201: michael@201: FOOTER michael@201: } michael@171: Index: mailgraph.cgi michael@199: --- mailgraph.pl.orig 2007-08-29 11:06:01.000000000 +0200 michael@199: +++ mailgraph.pl 2009-04-26 18:06:13.313712038 +0200 michael@171: @@ -211,6 +211,8 @@ michael@171: \s michael@171: ([-\w\.\@:]+) # host -- 6 michael@171: \s+ michael@171: + <[^>]+> # OSSP fsl log level michael@171: + \s+ michael@171: (?:\[LOG_[A-Z]+\]\s+)? # FreeBSD michael@171: (.*) # text -- 7 michael@171: $/x or do michael@199: @@ -420,6 +422,7 @@ michael@199: print " --rrd-name=NAME use NAME.rrd and NAME_virus.rrd for the rrd files\n"; michael@199: print " --rbl-is-spam count rbl rejects as spam\n"; michael@199: print " --virbl-is-virus count virbl rejects as viruses\n"; michael@199: + print " --multi-rule-spam count several typical reject messages as spam\n"; michael@199: michael@199: exit; michael@199: } michael@199: @@ -432,7 +435,7 @@ michael@199: 'daemon_pid|daemon-pid=s', 'daemon_rrd|daemon-rrd=s', michael@199: 'daemon_log|daemon-log=s', 'ignore-localhost!', 'ignore-host=s@', michael@199: 'only-mail-rrd', 'only-virus-rrd', 'rrd_name|rrd-name=s', michael@199: - 'rbl-is-spam', 'virbl-is-virus' michael@199: + 'rbl-is-spam', 'virbl-is-virus', 'multi-rule-spam' michael@199: ) or exit(1); michael@199: usage if $opt{help}; michael@199: michael@199: @@ -610,6 +613,18 @@ michael@199: elsif($opt{'rbl-is-spam'} and $text =~ /^(?:[0-9A-Z]+: |NOQUEUE: )?reject: .*: 554.* blocked using/) { michael@199: event($time, 'spam'); michael@199: } michael@199: + elsif($opt{'multi-rule-spam'} and $text =~ /^(?:[0-9A-Z]+: |NOQUEUE: )?reject: .*: 554.* Client host rejected: Access denied/) { michael@199: + event($time, 'spam'); michael@199: + } michael@199: + elsif($opt{'multi-rule-spam'} and $text =~ /^(?:[0-9A-Z]+: |NOQUEUE: )?reject: .*: 450.* Helo command rejected: Host not found/) { michael@199: + event($time, 'spam'); michael@199: + } michael@199: + elsif($opt{'multi-rule-spam'} and $text =~ /^(?:[0-9A-Z]+: |NOQUEUE: )?reject: .*: 450.* Sender address rejected: Domain not found/) { michael@199: + event($time, 'spam'); michael@199: + } michael@199: + elsif($opt{'multi-rule-spam'} and $text =~ /^(?:[0-9A-Z]+: |NOQUEUE: )?reject: .*: 450.* Client host rejected: cannot find your hostname/) { michael@199: + event($time, 'spam'); michael@199: + } michael@199: elsif($text =~ /^(?:[0-9A-Z]+: |NOQUEUE: )?reject: /) { michael@199: event($time, 'rejected'); michael@199: } michael@235: @@ -628,7 +643,12 @@ michael@235: } michael@235: } michael@235: elsif($prog eq 'cleanup') { michael@235: - if($text =~ /^[0-9A-Z]+: (?:reject|discard): /) { michael@235: + if($text =~ /^(?:[0-9A-Z]+: )?milter-reject: /) { michael@235: + if($text =~ /Intercepted/) { michael@235: + event($time, 'virus'); michael@235: + } michael@235: + } michael@235: + elsif($text =~ /^[0-9A-Z]+: (?:reject|discard): /) { michael@235: event($time, 'rejected'); michael@235: } michael@235: } michael@235: @@ -924,6 +944,7 @@ michael@199: --rrd-name=NAME use NAME.rrd and NAME_virus.rrd for the rrd files michael@199: --rbl-is-spam count rbl rejects as spam michael@199: --virbl-is-virus count virbl rejects as viruses michael@199: + --multi-rule-spam count several typical reject messages as spam michael@199: michael@199: =head1 DESCRIPTION michael@199: