diff -r 8364d0b242cd -r bf21249327af postfix-mailgraph/postfix-mailgraph.patch
--- a/postfix-mailgraph/postfix-mailgraph.patch Fri Apr 24 17:37:04 2009 +0200
+++ b/postfix-mailgraph/postfix-mailgraph.patch Sun Apr 26 18:18:24 2009 +0200
@@ -1,41 +1,6 @@
Index: mailgraph.cgi
---- mailgraph.cgi.orig 2007-08-29 11:06:01 +0200
-+++ mailgraph.cgi 2007-08-29 19:05:41 +0200
-@@ -160,7 +160,7 @@
-
-
-
--Mail statistics for $host
-+Postfix Mail statistics for $host
-
-
-
-@@ -168,7 +168,7 @@
-
- HEADER
-
-- print "Mail statistics for $host
\n";
-+ print "Postfix Mail statistics for $host
\n";
-
- print "\n";
- for my $n (0..$#graphs) {
-@@ -183,13 +183,6 @@
- }
-
- print <
--
-
- FOOTER
- }
-Index: mailgraph.pl
---- mailgraph.pl.orig 2007-08-29 11:06:01 +0200
-+++ mailgraph.pl 2007-08-29 19:03:59 +0200
+--- mailgraph.pl.orig 2007-08-29 11:06:01.000000000 +0200
++++ mailgraph.pl 2009-04-26 18:06:13.313712038 +0200
@@ -211,6 +211,8 @@
\s
([-\w\.\@:]+) # host -- 6
@@ -45,3 +10,47 @@
(?:\[LOG_[A-Z]+\]\s+)? # FreeBSD
(.*) # text -- 7
$/x or do
+@@ -420,6 +422,7 @@
+ print " --rrd-name=NAME use NAME.rrd and NAME_virus.rrd for the rrd files\n";
+ print " --rbl-is-spam count rbl rejects as spam\n";
+ print " --virbl-is-virus count virbl rejects as viruses\n";
++ print " --multi-rule-spam count several typical reject messages as spam\n";
+
+ exit;
+ }
+@@ -432,7 +435,7 @@
+ 'daemon_pid|daemon-pid=s', 'daemon_rrd|daemon-rrd=s',
+ 'daemon_log|daemon-log=s', 'ignore-localhost!', 'ignore-host=s@',
+ 'only-mail-rrd', 'only-virus-rrd', 'rrd_name|rrd-name=s',
+- 'rbl-is-spam', 'virbl-is-virus'
++ 'rbl-is-spam', 'virbl-is-virus', 'multi-rule-spam'
+ ) or exit(1);
+ usage if $opt{help};
+
+@@ -610,6 +613,18 @@
+ elsif($opt{'rbl-is-spam'} and $text =~ /^(?:[0-9A-Z]+: |NOQUEUE: )?reject: .*: 554.* blocked using/) {
+ event($time, 'spam');
+ }
++ elsif($opt{'multi-rule-spam'} and $text =~ /^(?:[0-9A-Z]+: |NOQUEUE: )?reject: .*: 554.* Client host rejected: Access denied/) {
++ event($time, 'spam');
++ }
++ elsif($opt{'multi-rule-spam'} and $text =~ /^(?:[0-9A-Z]+: |NOQUEUE: )?reject: .*: 450.* Helo command rejected: Host not found/) {
++ event($time, 'spam');
++ }
++ elsif($opt{'multi-rule-spam'} and $text =~ /^(?:[0-9A-Z]+: |NOQUEUE: )?reject: .*: 450.* Sender address rejected: Domain not found/) {
++ event($time, 'spam');
++ }
++ elsif($opt{'multi-rule-spam'} and $text =~ /^(?:[0-9A-Z]+: |NOQUEUE: )?reject: .*: 450.* Client host rejected: cannot find your hostname/) {
++ event($time, 'spam');
++ }
+ elsif($text =~ /^(?:[0-9A-Z]+: |NOQUEUE: )?reject: /) {
+ event($time, 'rejected');
+ }
+@@ -924,6 +939,7 @@
+ --rrd-name=NAME use NAME.rrd and NAME_virus.rrd for the rrd files
+ --rbl-is-spam count rbl rejects as spam
+ --virbl-is-virus count virbl rejects as viruses
++ --multi-rule-spam count several typical reject messages as spam
+
+ =head1 DESCRIPTION
+