diff options
author | Julien Valroff <julien@kirya.net> | 2011-03-13 08:44:39 +0100 |
---|---|---|
committer | Julien Valroff <julien@kirya.net> | 2011-03-13 08:44:39 +0100 |
commit | c6eee8fb7e2ba294afaae402177794247de1957d (patch) | |
tree | dc4f5d9757008c0356fe7ae1328519c664a8fb25 /debian/patches | |
parent | 540516f10765b5ee116dab1bcc5e6e451fa717bc (diff) |
Add greylisting support
Diffstat (limited to 'debian/patches')
-rw-r--r-- | debian/patches/050_greylist.diff (renamed from debian/patches/051_postgrey.diff) | 21 | ||||
-rw-r--r-- | debian/patches/101_dspam-virus-notifications.diff | 2 | ||||
-rw-r--r-- | debian/patches/102_clamav-milter.diff | 2 | ||||
-rw-r--r-- | debian/patches/series | 1 |
4 files changed, 16 insertions, 10 deletions
diff --git a/debian/patches/051_postgrey.diff b/debian/patches/050_greylist.diff index b3683e7..598deb8 100644 --- a/debian/patches/051_postgrey.diff +++ b/debian/patches/050_greylist.diff @@ -11,7 +11,7 @@ Origin: http://www.bakarasse.de/pages/en/linux/mailgraph.php +my $ypoints_grey = 96; my $rrd = '/var/lib/mailgraph/mailgraph.rrd'; # path to where the RRD database is my $rrd_virus = '/var/lib/mailgraph/mailgraph_virus.rrd'; # path to where the Virus RRD database is - my $tmp_dir = '/var/lib/mailgraph/'; # temporary directory where to store the images + my $tmp_dir = '/var/lib/mailgraph'; # temporary directory where to store the images @@ -28,12 +29,14 @@ ); @@ -24,7 +24,7 @@ Origin: http://www.bakarasse.de/pages/en/linux/mailgraph.php - spam => '999999', + sent => '000099', # rrggbb in hex + received => '009900', -+ rejected => 'AA0000', ++ rejected => 'AA0000', + bounced => '000000', + virus => 'DDBB00', + spam => '999999', @@ -78,7 +78,7 @@ Origin: http://www.bakarasse.de/pages/en/linux/mailgraph.php } print <<FOOTER; -@@ -232,6 +266,11 @@ +@@ -229,6 +263,11 @@ graph_err($graphs[$1]{seconds}, $file); send_image($file); } @@ -93,7 +93,7 @@ Origin: http://www.bakarasse.de/pages/en/linux/mailgraph.php --- a/mailgraph.pl +++ b/mailgraph.pl @@ -381,7 +381,7 @@ - my $rrd_virus = "/var/lib/mailgraph/mailgraph_virus.rrd"; + my $rrd_virus = "mailgraph_virus.rrd"; my $year; my $this_minute; -my %sum = ( sent => 0, received => 0, bounced => 0, rejected => 0, virus => 0, spam => 0 ); @@ -193,7 +193,7 @@ Origin: http://www.bakarasse.de/pages/en/linux/mailgraph.php elsif($text =~ /^(?:[0-9A-Z]+: |NOQUEUE: )?reject: /) { event($time, 'rejected'); } -@@ -853,6 +879,16 @@ +@@ -853,6 +879,21 @@ event($time, 'virus'); } } @@ -207,10 +207,15 @@ Origin: http://www.bakarasse.de/pages/en/linux/mailgraph.php + event($time, 'delayed'); + } + } ++ elsif($prog eq 'grossd') { ++ if($text =~ /a\=greylist/) { ++ event($time, 'greylisted'); ++ } ++ } } sub event($$) -@@ -870,14 +906,16 @@ +@@ -870,14 +911,16 @@ return 1 if $m == $this_minute; return 0 if $m < $this_minute; @@ -233,7 +238,7 @@ Origin: http://www.bakarasse.de/pages/en/linux/mailgraph.php } } $this_minute = $m; -@@ -887,6 +925,8 @@ +@@ -887,6 +930,8 @@ $sum{rejected}=0; $sum{virus}=0; $sum{spam}=0; @@ -242,7 +247,7 @@ Origin: http://www.bakarasse.de/pages/en/linux/mailgraph.php return 1; } -@@ -919,8 +959,9 @@ +@@ -919,8 +964,9 @@ --daemon-log=FILE write verbose-log to FILE instead of /var/log/mailgraph.log --ignore-localhost ignore mail to/from localhost (used for virus scanner) --ignore-host=HOST ignore mail to/from HOST regexp (used for virus scanner) diff --git a/debian/patches/101_dspam-virus-notifications.diff b/debian/patches/101_dspam-virus-notifications.diff index 96d4068..bd5a04b 100644 --- a/debian/patches/101_dspam-virus-notifications.diff +++ b/debian/patches/101_dspam-virus-notifications.diff @@ -5,7 +5,7 @@ Forwarded: no --- a/mailgraph.pl +++ b/mailgraph.pl -@@ -774,6 +774,9 @@ +@@ -800,6 +800,9 @@ if($text =~ /spam detected from/) { event($time, 'spam'); } diff --git a/debian/patches/102_clamav-milter.diff b/debian/patches/102_clamav-milter.diff index c9eac04..25c49f3 100644 --- a/debian/patches/102_clamav-milter.diff +++ b/debian/patches/102_clamav-milter.diff @@ -4,7 +4,7 @@ Forwarded: no --- a/mailgraph.pl +++ b/mailgraph.pl -@@ -820,6 +820,9 @@ +@@ -846,6 +846,9 @@ if($text =~ /Intercepted/) { event($time, 'virus'); } diff --git a/debian/patches/series b/debian/patches/series index e07de45..73a941e 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,5 +1,6 @@ 001_default-rrd-location.diff 002_script-name.diff 003_web-bug.diff +050_greylist.diff 101_dspam-virus-notifications.diff 102_clamav-milter.diff |