From 4bdc1b42ae2e9cf4e0c78a33ae239a7171f954a6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sven=20H=C3=B6xter?= Date: Tue, 15 Jan 2019 10:02:23 +0100 Subject: [PATCH] Add patch to count milter rejects provided by Matus Uhlar. --- debian/changelog | 6 ++++++ debian/patches/milter-rejects | 18 ++++++++++++++++++ debian/patches/series | 1 + 3 files changed, 25 insertions(+) create mode 100644 debian/patches/milter-rejects diff --git a/debian/changelog b/debian/changelog index 1a920df..e2a5be3 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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 index 0000000..2e15cca --- /dev/null +++ b/debian/patches/milter-rejects @@ -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") { diff --git a/debian/patches/series b/debian/patches/series index 5bfce8f..0aeb4ab 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,2 +1,3 @@ kill-dot-pl postscreen-rejects +milter-rejects -- 2.39.5