diff options
author | Julien Valroff <julien@kirya.net> | 2011-04-16 16:47:41 +0200 |
---|---|---|
committer | Julien Valroff <julien@kirya.net> | 2011-04-16 16:47:41 +0200 |
commit | d43e203266b3d61dac1499351ec20dc57c1728b2 (patch) | |
tree | d0ed723b249d1ccb0df2c8b1ea0009d1e7390116 /debian/patches | |
parent | 1d2747f5ec6d056b394335caf5e53598635fbec1 (diff) | |
parent | 7dd4f231f394157a6ebd1504808e86dc335f6841 (diff) |
Merge branch 'master' into squeeze-backportsdebian/1.14-9_bpo60+1
Conflicts:
debian/changelog
Diffstat (limited to 'debian/patches')
-rw-r--r-- | debian/patches/001_default-rrd-location.diff | 38 | ||||
-rw-r--r-- | debian/patches/001_path-to-rrd.diff | 31 | ||||
-rw-r--r-- | debian/patches/050_greylist.diff (renamed from debian/patches/051_postgrey.diff) | 51 | ||||
-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 | 3 |
6 files changed, 74 insertions, 53 deletions
diff --git a/debian/patches/001_default-rrd-location.diff b/debian/patches/001_default-rrd-location.diff new file mode 100644 index 0000000..54be53f --- /dev/null +++ b/debian/patches/001_default-rrd-location.diff @@ -0,0 +1,38 @@ +Description: Set path to rrd files to /var/lib/mailgraph/ +Forwarded: not-needed + +--- a/mailgraph.cgi ++++ b/mailgraph.cgi +@@ -16,9 +16,9 @@ + my $points_per_sample = 3; + my $ypoints = 160; + my $ypoints_err = 96; +-my $rrd = 'mailgraph.rrd'; # path to where the RRD database is +-my $rrd_virus = 'mailgraph_virus.rrd'; # path to where the Virus RRD database is +-my $tmp_dir = '/tmp/mailgraph'; # temporary directory where to store the images ++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 @graphs = ( + { title => 'Last Day', seconds => 3600*24, }, +--- a/mailgraph.pl ++++ b/mailgraph.pl +@@ -373,7 +373,7 @@ + + my $daemon_logfile = '/var/log/mailgraph.log'; + my $daemon_pidfile = '/var/run/mailgraph.pid'; +-my $daemon_rrd_dir = '/var/log'; ++my $daemon_rrd_dir = '/var/lib/mailgraph'; + + # global variables + my $logfile; +@@ -411,7 +411,7 @@ + print " --host=HOST use only entries for HOST (regexp) in syslog\n"; + print " -d, --daemon start in the background\n"; + print " --daemon-pid=FILE write PID to FILE instead of /var/run/mailgraph.pid\n"; +- print " --daemon-rrd=DIR write RRDs to DIR instead of /var/log\n"; ++ print " --daemon-rrd=DIR write RRDs to DIR instead of /var/lib/mailgraph\n"; + print " --daemon-log=FILE write verbose-log to FILE instead of /var/log/mailgraph.log\n"; + print " --ignore-localhost ignore mail to/from localhost (used for virus scanner)\n"; + print " --ignore-host=HOST ignore mail to/from HOST regexp (used for virus scanner)\n"; diff --git a/debian/patches/001_path-to-rrd.diff b/debian/patches/001_path-to-rrd.diff deleted file mode 100644 index 442ea58..0000000 --- a/debian/patches/001_path-to-rrd.diff +++ /dev/null @@ -1,31 +0,0 @@ -Description: Set path to rrd files to /var/lib/mailgraph/ -Forwarded: not-needed - ---- a/mailgraph.cgi -+++ b/mailgraph.cgi -@@ -16,9 +16,9 @@ - my $points_per_sample = 3; - my $ypoints = 160; - my $ypoints_err = 96; --my $rrd = 'mailgraph.rrd'; # path to where the RRD database is --my $rrd_virus = 'mailgraph_virus.rrd'; # path to where the Virus RRD database is --my $tmp_dir = '/tmp/mailgraph'; # temporary directory where to store the images -+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 @graphs = ( - { title => 'Last Day', seconds => 3600*24, }, ---- a/mailgraph.pl -+++ b/mailgraph.pl -@@ -377,8 +377,8 @@ - - # global variables - my $logfile; --my $rrd = "mailgraph.rrd"; --my $rrd_virus = "mailgraph_virus.rrd"; -+my $rrd = "/var/lib/mailgraph/mailgraph.rrd"; -+my $rrd_virus = "/var/lib/mailgraph/mailgraph_virus.rrd"; - my $year; - my $this_minute; - my %sum = ( sent => 0, received => 0, bounced => 0, rejected => 0, virus => 0, spam => 0 ); diff --git a/debian/patches/051_postgrey.diff b/debian/patches/050_greylist.diff index b3683e7..53fd408 100644 --- a/debian/patches/051_postgrey.diff +++ b/debian/patches/050_greylist.diff @@ -4,14 +4,19 @@ Origin: http://www.bakarasse.de/pages/en/linux/mailgraph.php --- a/mailgraph.cgi +++ b/mailgraph.cgi -@@ -16,6 +16,7 @@ +@@ -16,10 +16,11 @@ my $points_per_sample = 3; my $ypoints = 160; my $ypoints_err = 96; +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 $rrd_greylist = '/var/lib/mailgraph/mailgraph_greylist.rrd'; # path to where the Greylist RRD database is + my $tmp_dir = '/var/lib/mailgraph'; # temporary directory where to store the images +- + my @graphs = ( + { title => 'Last Day', seconds => 3600*24, }, + { title => 'Last Week', seconds => 3600*24*7, }, @@ -28,12 +29,14 @@ ); @@ -24,7 +29,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 +83,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); } @@ -92,8 +97,11 @@ 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"; +@@ -379,9 +379,10 @@ + my $logfile; + my $rrd = "mailgraph.rrd"; + my $rrd_virus = "mailgraph_virus.rrd"; ++my $rrd_greylist = "mailgraph_greylist.rrd"; my $year; my $this_minute; -my %sum = ( sent => 0, received => 0, bounced => 0, rejected => 0, virus => 0, spam => 0 ); @@ -101,7 +109,7 @@ Origin: http://www.bakarasse.de/pages/en/linux/mailgraph.php my $rrd_inited=0; my %opt = (); -@@ -395,6 +395,8 @@ +@@ -395,6 +396,8 @@ sub event_rejected($); sub event_virus($); sub event_spam($); @@ -110,7 +118,7 @@ Origin: http://www.bakarasse.de/pages/en/linux/mailgraph.php sub init_rrd($); sub update($); -@@ -415,8 +417,9 @@ +@@ -415,8 +418,9 @@ print " --daemon-log=FILE write verbose-log to FILE instead of /var/log/mailgraph.log\n"; print " --ignore-localhost ignore mail to/from localhost (used for virus scanner)\n"; print " --ignore-host=HOST ignore mail to/from HOST regexp (used for virus scanner)\n"; @@ -122,7 +130,7 @@ Origin: http://www.bakarasse.de/pages/en/linux/mailgraph.php 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"; -@@ -431,7 +434,7 @@ +@@ -431,7 +435,7 @@ 'year|y=i', 'host=s', 'verbose|v', 'daemon|d!', 'daemon_pid|daemon-pid=s', 'daemon_rrd|daemon-rrd=s', 'daemon_log|daemon-log=s', 'ignore-localhost!', 'ignore-host=s@', @@ -131,7 +139,7 @@ Origin: http://www.bakarasse.de/pages/en/linux/mailgraph.php 'rbl-is-spam', 'virbl-is-virus' ) or exit(1); usage if $opt{help}; -@@ -446,6 +449,7 @@ +@@ -446,6 +450,7 @@ $daemon_rrd_dir = $opt{daemon_rrd} if defined $opt{daemon_rrd}; $rrd = $opt{rrd_name}.".rrd" if defined $opt{rrd_name}; $rrd_virus = $opt{rrd_name}."_virus.rrd" if defined $opt{rrd_name}; @@ -139,7 +147,7 @@ Origin: http://www.bakarasse.de/pages/en/linux/mailgraph.php # compile --ignore-host regexps if(defined $opt{'ignore-host'}) { -@@ -522,7 +526,7 @@ +@@ -522,7 +527,7 @@ my $year_steps = $month_steps*12; # mail rrd @@ -148,7 +156,7 @@ Origin: http://www.bakarasse.de/pages/en/linux/mailgraph.php RRDs::create($rrd, '--start', $m, '--step', $rrdstep, 'DS:sent:ABSOLUTE:'.($rrdstep*2).':0:U', 'DS:recv:ABSOLUTE:'.($rrdstep*2).':0:U', -@@ -544,7 +548,7 @@ +@@ -544,7 +549,7 @@ } # virus rrd @@ -157,7 +165,7 @@ Origin: http://www.bakarasse.de/pages/en/linux/mailgraph.php RRDs::create($rrd_virus, '--start', $m, '--step', $rrdstep, 'DS:virus:ABSOLUTE:'.($rrdstep*2).':0:U', 'DS:spam:ABSOLUTE:'.($rrdstep*2).':0:U', -@@ -561,6 +565,25 @@ +@@ -561,6 +566,25 @@ elsif(-f $rrd_virus and ! defined $rrd_virus) { $this_minute = RRDs::last($rrd_virus) + $rrdstep; } @@ -183,7 +191,7 @@ Origin: http://www.bakarasse.de/pages/en/linux/mailgraph.php $rrd_inited=1; } -@@ -610,6 +633,9 @@ +@@ -610,6 +634,9 @@ elsif($opt{'rbl-is-spam'} and $text =~ /^(?:[0-9A-Z]+: |NOQUEUE: )?reject: .*: 554.* blocked using/) { event($time, 'spam'); } @@ -193,7 +201,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 +880,21 @@ event($time, 'virus'); } } @@ -207,17 +215,22 @@ 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 +912,16 @@ return 1 if $m == $this_minute; return 0 if $m < $this_minute; - print "update $this_minute:$sum{sent}:$sum{received}:$sum{bounced}:$sum{rejected}:$sum{virus}:$sum{spam}\n" if $opt{verbose}; - RRDs::update $rrd, "$this_minute:$sum{sent}:$sum{received}:$sum{bounced}:$sum{rejected}" unless $opt{'only-virus-rrd'}; - RRDs::update $rrd_virus, "$this_minute:$sum{virus}:$sum{spam}" unless $opt{'only-mail-rrd'}; -+ print "update $this_minute:$sum{sent}:$sum{received}:$sum{bounced}:$sum{rejected}:$sum{virus}:$sum{spam}:$sum{greylisted}:$sum{delayed}\n" if$ ++ print "update $this_minute:$sum{sent}:$sum{received}:$sum{bounced}:$sum{rejected}:$sum{virus}:$sum{spam}:$sum{greylisted}:$sum{delayed}\n" if $opt{verbose}; + RRDs::update $rrd, "$this_minute:$sum{sent}:$sum{received}:$sum{bounced}:$sum{rejected}" unless $opt{'no-mail-rrd'}; + RRDs::update $rrd_virus, "$this_minute:$sum{virus}:$sum{spam}" unless $opt{'no-virus-rrd'}; + RRDs::update $rrd_greylist, "$this_minute:$sum{greylisted}:$sum{delayed}" unless $opt{'no-greylist-rrd'}; @@ -233,7 +246,7 @@ Origin: http://www.bakarasse.de/pages/en/linux/mailgraph.php } } $this_minute = $m; -@@ -887,6 +925,8 @@ +@@ -887,6 +931,8 @@ $sum{rejected}=0; $sum{virus}=0; $sum{spam}=0; @@ -242,7 +255,7 @@ Origin: http://www.bakarasse.de/pages/en/linux/mailgraph.php return 1; } -@@ -919,8 +959,9 @@ +@@ -919,8 +965,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..3a27c5c 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 @@ +@@ -801,6 +801,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..a8378fe 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 @@ +@@ -847,6 +847,9 @@ if($text =~ /Intercepted/) { event($time, 'virus'); } diff --git a/debian/patches/series b/debian/patches/series index d5835d9..73a941e 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,5 +1,6 @@ -001_path-to-rrd.diff +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 |