[gentoo-commits] repo/gentoo:master commit in: net-mail/postfix-logwatch/files/, net-mail/postfix-logwatch/

2022-06-07 Thread Michael Orlitzky
commit: 3ce69f10450f5113b8c885f536a7ef9ffb6eda51
Author: Michael Orlitzky  gentoo  org>
AuthorDate: Tue Jun  7 20:18:57 2022 +
Commit: Michael Orlitzky  gentoo  org>
CommitDate: Tue Jun  7 20:20:06 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3ce69f10

net-mail/postfix-logwatch: remove old v1.40.03 and its patches.

Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Michael Orlitzky  gentoo.org>

 net-mail/postfix-logwatch/Manifest |  1 -
 .../files/all-server-ports-busy-lines.patch| 59 --
 .../files/data-without-valid-rcpt.patch| 33 
 .../files/multi-digit-enhanced-status.patch| 38 --
 .../files/redundant-argument-to-sprintf.patch  | 48 --
 .../files/unescaped-left-brace.patch   | 37 --
 .../postfix-logwatch-1.40.03-r4.ebuild | 45 -
 7 files changed, 261 deletions(-)

diff --git a/net-mail/postfix-logwatch/Manifest 
b/net-mail/postfix-logwatch/Manifest
index d7d14eaf1743..dcdbf05f981c 100644
--- a/net-mail/postfix-logwatch/Manifest
+++ b/net-mail/postfix-logwatch/Manifest
@@ -1,2 +1 @@
-DIST postfix-logwatch-1.40.03.tgz 107065 BLAKE2B 
153f83c3414d2773ec528260369a564624aacc6de5627ee1da77d1eea89b276fb014c045785bc8ae1fbf7e6da2279a0d309ab171ff55d1087d3379466570c5ea
 SHA512 
7059f409cabb3cb638885342ab876e1c85c87530c3544bf04c54a56707695acdc5cbb706e3f192ef5608c9a00706e4d7be3cc7b32286460719d7b497e44b3341
 DIST postfix-logwatch-1.40.04.tar.xz 78996 BLAKE2B 
fea2a08a7bc776cf0106a60bc0f86730c562d6c893629a1028183150a246803bda8ada6a5ec7e264685fe40016b82ce4140031af7e508ac4b1d9a34e552b865d
 SHA512 
194917fe4d05e9808893da0c175859e932d5e48956d1dda96129dd5de7f9ee23131ae1831b558c8c2d32d03ffda80aa95cfd5048543b7766a0486a71efa6c19b

diff --git a/net-mail/postfix-logwatch/files/all-server-ports-busy-lines.patch 
b/net-mail/postfix-logwatch/files/all-server-ports-busy-lines.patch
deleted file mode 100644
index dd5ae5869eb2..
--- a/net-mail/postfix-logwatch/files/all-server-ports-busy-lines.patch
+++ /dev/null
@@ -1,59 +0,0 @@
-From 7b3930a9d44f91a63f0edbe765c75dc8f6128b7c Mon Sep 17 00:00:00 2001
-From: Michael Orlitzky 
-Date: Wed, 26 Dec 2018 12:54:15 -0500
-Subject: [PATCH 1/1] Match postscreen "all server ports busy" lines.
-
-Lines that look like
-
-  NOQUEUE: reject: CONNECT from [192.168.0.1]:39410: all server ports busy
-
-were not being matched. There were two similar matches, one for a
-specific "too many connections" error
-
- NOQUEUE: reject: CONNECT from [192.168.0.1]:7197: too many connections
-
-and another for a more general form intended to match "all screening
-ports busy" errors from postscreen:
-
- reject: connect from [192.168.0.1]:21225: all screening ports busy
-
-The general form is preferable in my opinion, but the "screening
-ports" message is a bit of a black sheep. As a result, even the more
-general regular expression didn't match the other two errors due to
-their beginning with "NOQUEUE" and using an uppercase "CONNECT".
-
-To fix this, the general regular expression was made even more
-general. Now, a leading "NOQUEUE: " is optional, and the "CONNECT" can
-be capitalized. Thus, one regular expression now catches all three
-messages.

- postfix-logwatch | 13 +
- 1 file changed, 5 insertions(+), 8 deletions(-)
-
-diff --git a/postfix-logwatch b/postfix-logwatch
-index 827dfe0..648ba7a 100644
 a/postfix-logwatch
-+++ b/postfix-logwatch
-@@ -4399,14 +4399,11 @@ sub postfix_postscreen {
-   }
-}
- 
--   elsif ($line =~ /^NOQUEUE: reject: CONNECT from \[([^]]+)\](?::\d+)?: too 
many connections/) {
--  # NOQUEUE: reject: CONNECT from [192.168.0.1]:7197: too many connections
--  $Counts{'postscreen'}{'reject'}{'Too many connections'}{$1}{$END_KEY}++ 
 if $Collecting{'postscreen'};
--   }
--
--   elsif ($line =~ /^reject: connect from \[([^]]+)\](?::\d+)?: (.+)$/) {
--  # reject: connect from [192.168.0.1]:21225: all screening ports busy
--  $Counts{'postscreen'}{'reject'}{"\u$2"}{$1}{$END_KEY}++  if 
$Collecting{'postscreen'};
-+   elsif ($line =~ /^(NOQUEUE: )?reject: (connect|CONNECT) from 
\[([^]]+)\](?::\d+)?: (.+)$/) {
-+   # NOQUEUE: reject: CONNECT from [192.168.0.1]:7197: too many 
connections
-+   # NOQUEUE: reject: CONNECT from [192.168.0.1]:39410: all server ports 
busy
-+   # reject: connect from [192.168.0.1]:21225: all screening ports busy
-+  $Counts{'postscreen'}{'reject'}{"\u$4"}{$3}{$END_KEY}++  if 
$Collecting{'postscreen'};
-}
- 
-elsif ($line =~ /^(?:WHITELIST VETO) \[([^]]+)\](?::\d+)?$/) {
--- 
-2.19.2
-

diff --git a/net-mail/postfix-logwatch/files/data-without-valid-rcpt.patch 
b/net-mail/postfix-logwatch/files/data-without-valid-rcpt.patch
deleted file mode 100644
index 4c743a21c17a..
--- a/net-mail/postfix-logwatch/files/data-without-valid-rcpt.patch
+++ 

[gentoo-commits] repo/gentoo:master commit in: net-mail/postfix-logwatch/files/, net-mail/postfix-logwatch/

2020-04-15 Thread Michael Orlitzky
commit: 9d1239a0e53bdb804bb726542bc25542d504a7c2
Author: Michael Orlitzky  gentoo  org>
AuthorDate: Wed Apr 15 12:13:10 2020 +
Commit: Michael Orlitzky  gentoo  org>
CommitDate: Wed Apr 15 12:59:14 2020 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9d1239a0

net-mail/postfix-logwatch: new revision with a new patch.

The -r4 revision includes a patch to ignore the "DATA without valid
RCPT" notices that postscreen emits. The patch hasn't been upstreamed
because we're basically upstream at this point.

Package-Manager: Portage-2.3.89, Repoman-2.3.20
Signed-off-by: Michael Orlitzky  gentoo.org>

 .../files/data-without-valid-rcpt.patch| 33 
 .../postfix-logwatch-1.40.03-r4.ebuild | 45 ++
 2 files changed, 78 insertions(+)

diff --git a/net-mail/postfix-logwatch/files/data-without-valid-rcpt.patch 
b/net-mail/postfix-logwatch/files/data-without-valid-rcpt.patch
new file mode 100644
index 000..4c743a21c17
--- /dev/null
+++ b/net-mail/postfix-logwatch/files/data-without-valid-rcpt.patch
@@ -0,0 +1,33 @@
+From 891b5ce1780e10cd94d230efacf6e8b5cb33a931 Mon Sep 17 00:00:00 2001
+From: Michael Orlitzky 
+Date: Wed, 15 Apr 2020 08:04:02 -0400
+Subject: [PATCH 1/1] Ignore postscreen "BDAT/DATA without valid RCPT" lines.
+
+Postscreen now emits a notice when clients send BDAT or DATA
+prematurely (after postscreen rejects the recipient):
+
+  DATA without valid RCPT from [192.168.0.1]:48580
+
+These are merely informational, since the connection was rejected for
+some other reason, so this commit ignores them.
+---
+ postfix-logwatch | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/postfix-logwatch b/postfix-logwatch
+index 648ba7a..1b89ad6 100644
+--- a/postfix-logwatch
 b/postfix-logwatch
+@@ -4359,7 +4359,8 @@ sub postfix_postscreen {
+   $line =~ /discarding EHLO keywords: / or
+   $line =~ /: discard_mask / or
+   $line =~ /: sq=\d+ cq=\d+ event/ or
+-  $line =~ /: replacing command "/
++  $line =~ /: replacing command "/ or
++  $line =~ /^(DATA|BDAT) without valid RCPT/
+);
+ 
+ 
+-- 
+2.24.1
+

diff --git a/net-mail/postfix-logwatch/postfix-logwatch-1.40.03-r4.ebuild 
b/net-mail/postfix-logwatch/postfix-logwatch-1.40.03-r4.ebuild
new file mode 100644
index 000..e4fe1d212ae
--- /dev/null
+++ b/net-mail/postfix-logwatch/postfix-logwatch-1.40.03-r4.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+DESCRIPTION="A log analyzer for postfix"
+HOMEPAGE="http://logreporters.sourceforge.net/;
+SRC_URI="mirror://sourceforge/logreporters/${P}.tgz"
+
+LICENSE="MIT"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+
+RDEPEND="dev-lang/perl"
+
+PATCHES=(
+   "${FILESDIR}/unescaped-left-brace.patch"
+   "${FILESDIR}/redundant-argument-to-sprintf.patch"
+   "${FILESDIR}/multi-digit-enhanced-status.patch"
+   "${FILESDIR}/all-server-ports-busy-lines.patch"
+   "${FILESDIR}/data-without-valid-rcpt.patch"
+)
+
+src_prepare() {
+   default
+   # Replace the default config file location with ours.
+   local cfg_default='/usr/local/etc/${progname_prefix}-logwatch.conf'
+   local cfg_gentoo='/etc/${progname_prefix}-logwatch.conf';
+   sed -i "s~${cfg_default}~${cfg_gentoo}~" ${PN} \
+   || die 'failed to update the default config location'
+}
+
+src_compile() {
+   # The default make target just outputs instructions. We don't want
+   # the user to see these, so we avoid the default emake.
+   :
+}
+
+src_install() {
+   dodoc Bugs Changes README ${PN}.conf-topn
+   doman ${PN}.1
+   dobin ${PN}
+   insinto /etc
+   doins ${PN}.conf
+}