From 7a41ab86ea4e9fc2e5afffdce2a1b5fe96537685 Mon Sep 17 00:00:00 2001 From: Florian Smeets Date: Wed, 16 Sep 2020 20:00:11 +0000 Subject: [PATCH] Fix warnings when maillog contains IPv6 addresses MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR: 249146 Submitted by: Éric Masson Obtained from: https://bugzilla.redhat.com/show_bug.cgi?id=1384871 --- mail/pflogsumm/Makefile | 1 + mail/pflogsumm/files/patch-pflogsumm.pl | 11 +++++++++++ 2 files changed, 12 insertions(+) create mode 100644 mail/pflogsumm/files/patch-pflogsumm.pl diff --git a/mail/pflogsumm/Makefile b/mail/pflogsumm/Makefile index 12c66255006d..3c4ea55a25b8 100644 --- a/mail/pflogsumm/Makefile +++ b/mail/pflogsumm/Makefile @@ -3,6 +3,7 @@ PORTNAME= pflogsumm PORTVERSION= 1.1.5 +PORTREVISION= 1 PORTEPOCH= 1 CATEGORIES= mail MASTER_SITES= http://jimsun.LinxNet.com/downloads/ \ diff --git a/mail/pflogsumm/files/patch-pflogsumm.pl b/mail/pflogsumm/files/patch-pflogsumm.pl new file mode 100644 index 000000000000..2b4e95357f95 --- /dev/null +++ b/mail/pflogsumm/files/patch-pflogsumm.pl @@ -0,0 +1,11 @@ +--- pflogsumm.pl.orig 2020-09-06 10:15:06.176055000 +0200 ++++ pflogsumm.pl 2020-09-06 10:15:43.839326000 +0200 +@@ -1536,7 +1536,7 @@ + # split domain/ipaddr into separates + # newer versions of Postfix have them "dom.ain[i.p.add.ress]" + # older versions of Postfix have them "dom.ain/i.p.add.ress" +- unless((($domain, $ipAddr) = /^([^\[]+)\[((?:\d{1,3}\.){3}\d{1,3})\]/) == 2 || ++ unless((($domain, $ipAddr) = /^([^\[]+)\[((?:\d{1,3}\.){3}\d{1,3}|[0-9a-f:]+)\]/o) == 2 || + (($domain, $ipAddr) = /^([^\/]+)\/([0-9a-f.:]+)/i) == 2) { + # more exhaustive method + ($domain, $ipAddr) = /^([^\[\(\/]+)[\[\(\/]([^\]\)]+)[\]\)]?:?\s*$/;