net-mail/pflogsumm: add support for BDAT
authorTomas Mozes <hydrapolic@gmail.com>
Sat, 30 Nov 2019 00:22:35 +0000 (00:22 +0000)
committerJoonas Niilola <juippis@gentoo.org>
Sun, 8 Dec 2019 10:08:15 +0000 (12:08 +0200)
Closes: https://bugs.gentoo.org/699976
Patch-by: Maxim Britov <ungift-ed@ya.ru>
Signed-off-by: Tomáš Mózes <hydrapolic@gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/13804
Signed-off-by: Joonas Niilola <juippis@gentoo.org>
net-mail/pflogsumm/files/pflogsumm-bdat.patch [new file with mode: 0644]
net-mail/pflogsumm/pflogsumm-1.1.5-r2.ebuild [new file with mode: 0644]

diff --git a/net-mail/pflogsumm/files/pflogsumm-bdat.patch b/net-mail/pflogsumm/files/pflogsumm-bdat.patch
new file mode 100644 (file)
index 0000000..fa27b26
--- /dev/null
@@ -0,0 +1,13 @@
+diff --git a/pflogsumm.pl b/pflogsumm.pl
+index 31de5bd..b3bedf9 100755
+--- a/pflogsumm.pl
++++ b/pflogsumm.pl
+@@ -1650,7 +1650,7 @@ sub proc_smtpd_reject {
+     # Next: get the reject "reason"
+     $rejReas = $rejRmdr;
+     unless(defined($opts{'verbMsgDetail'})) {
+-      if($rejTyp eq "RCPT" || $rejTyp eq "DATA" || $rejTyp eq "CONNECT") {    # special treatment :-(
++      if($rejTyp eq "RCPT" || $rejTyp eq "DATA" || $rejTyp eq "BDAT" || $rejTyp eq "CONNECT") {       # special treatment :-(
+           # If there are "<>"s immediately following the reject code, that's
+           # an email address or HELO string.  There can be *anything* in
+           # those--incl. stuff that'll screw up subsequent parsing.  So just
diff --git a/net-mail/pflogsumm/pflogsumm-1.1.5-r2.ebuild b/net-mail/pflogsumm/pflogsumm-1.1.5-r2.ebuild
new file mode 100644 (file)
index 0000000..8f70f3e
--- /dev/null
@@ -0,0 +1,24 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+DESCRIPTION="Pflogsumm is a log analyzer for Postfix logs"
+HOMEPAGE="https://jimsun.linxnet.com/postfix_contrib.html"
+SRC_URI="https://jimsun.linxnet.com/downloads/${P}.tar.gz"
+
+LICENSE="GPL-2+"
+SLOT="0"
+KEYWORDS="~amd64 ~sparc ~x86"
+
+RDEPEND="dev-lang/perl
+       dev-perl/Date-Calc"
+
+DOCS=( ChangeLog pflogsumm-faq.txt README ToDo )
+PATCHES=( "${FILESDIR}/${PN}-bdat.patch" ) # Bug 699976
+
+src_install() {
+       default
+       doman pflogsumm.1
+       dobin pflogsumm.pl
+}