Add patch to count milter rejects provided by Matus Uhlar.
authorSven Höxter <sven.hoexter@rewe-digital.com>
Tue, 15 Jan 2019 09:02:23 +0000 (10:02 +0100)
committerSven Höxter <sven.hoexter@rewe-digital.com>
Tue, 15 Jan 2019 09:02:23 +0000 (10:02 +0100)
debian/changelog
debian/patches/milter-rejects [new file with mode: 0644]
debian/patches/series

index 1a920df..e2a5be3 100644 (file)
@@ -1,3 +1,9 @@
+pflogsumm (1.1.5-5) unstable; urgency=medium
+
+  * Add patch to count milter rejects provided by Matus Uhlar.
+
+ --
+
 pflogsumm (1.1.5-4) unstable; urgency=medium
 
   * Change Standards-Version to 4.2.1.
diff --git a/debian/patches/milter-rejects b/debian/patches/milter-rejects
new file mode 100644 (file)
index 0000000..2e15cca
--- /dev/null
@@ -0,0 +1,18 @@
+Index: pflogsumm/pflogsumm.pl
+===================================================================
+--- pflogsumm.orig/pflogsumm.pl
++++ pflogsumm/pflogsumm.pl
+@@ -666,11 +666,11 @@ while(<>) {
+     # regexp rejects happen in "cleanup"
+     if($cmd eq "cleanup" && (my($rejSubTyp, $rejReas, $rejRmdr) = $logRmdr =~
+-      /\/cleanup\[\d+\]: .*?\b(reject|warning|hold|discard): (header|body) (.*)$/) == 3)
++       /\/cleanup\[\d+\]: .*?\b((?:milter-)reject|warning|hold|discard): (header|body|END-OF-MESSAGE) (.*)$/) == 3)
+     {
+       $rejRmdr =~ s/( from \S+?)?; from=<.*$// unless($opts{'verbMsgDetail'});
+       $rejRmdr = string_trimmer($rejRmdr, 64, $opts{'verbMsgDetail'});
+-      if($rejSubTyp eq "reject") {
++       if($rejSubTyp eq "reject" or $rejSubTyp eq "milter-reject") {
+           ++$rejects{$cmd}{$rejReas}{$rejRmdr} unless($opts{'rejectDetail'} == 0);
+           ++$msgsRjctd;
+       } elsif($rejSubTyp eq "warning") {
index 5bfce8f..0aeb4ab 100644 (file)
@@ -1,2 +1,3 @@
 kill-dot-pl
 postscreen-rejects
+milter-rejects