Adapt to default behaviour of postfix logger on clamav-milter rejections.

Mon, 02 Nov 2009 22:32:28 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Mon, 02 Nov 2009 22:32:28 +0100
changeset 235
8b7e29d77c37
parent 234
b0dde56e4a08
child 236
8b89c85ab535

Adapt to default behaviour of postfix logger on clamav-milter rejections.

postfix-mailgraph/postfix-mailgraph.patch file | annotate | diff | comparison | revisions
postfix-mailgraph/postfix-mailgraph.spec file | annotate | diff | comparison | revisions
     1.1 --- a/postfix-mailgraph/postfix-mailgraph.patch	Mon Nov 02 22:31:34 2009 +0100
     1.2 +++ b/postfix-mailgraph/postfix-mailgraph.patch	Mon Nov 02 22:32:28 2009 +0100
     1.3 @@ -63,7 +63,21 @@
     1.4   			elsif($text =~ /^(?:[0-9A-Z]+: |NOQUEUE: )?reject: /) {
     1.5   				event($time, 'rejected');
     1.6   			}
     1.7 -@@ -924,6 +939,7 @@
     1.8 +@@ -628,7 +643,12 @@
     1.9 + 			}
    1.10 + 		}
    1.11 + 		elsif($prog eq 'cleanup') {
    1.12 +-			if($text =~ /^[0-9A-Z]+: (?:reject|discard): /) {
    1.13 ++			if($text =~ /^(?:[0-9A-Z]+: )?milter-reject: /) {
    1.14 ++				if($text =~ /Intercepted/) {
    1.15 ++					event($time, 'virus');
    1.16 ++				}
    1.17 ++			}
    1.18 ++			elsif($text =~ /^[0-9A-Z]+: (?:reject|discard): /) {
    1.19 + 				event($time, 'rejected');
    1.20 + 			}
    1.21 + 		}
    1.22 +@@ -924,6 +944,7 @@
    1.23    --rrd-name=NAME    use NAME.rrd and NAME_virus.rrd for the rrd files
    1.24    --rbl-is-spam      count rbl rejects as spam
    1.25    --virbl-is-virus   count virbl rejects as viruses
     2.1 --- a/postfix-mailgraph/postfix-mailgraph.spec	Mon Nov 02 22:31:34 2009 +0100
     2.2 +++ b/postfix-mailgraph/postfix-mailgraph.spec	Mon Nov 02 22:32:28 2009 +0100
     2.3 @@ -32,7 +32,7 @@
     2.4  Group:        Mail
     2.5  License:      GPL
     2.6  Version:      1.14
     2.7 -Release:      20090420
     2.8 +Release:      20091101
     2.9  
    2.10  #   list of sources
    2.11  Source0:      http://mailgraph.schweikert.ch/pub/mailgraph-%{version}.tar.gz

mercurial