diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2018-12-31 13:43:35 +0000 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2018-12-31 13:43:35 +0000 |
commit | 2891d29af8907ce881662f4a02844926d7a293c7 (patch) | |
tree | 56979d96839d0827aa52008b81b746b4934d88df /net-mail/postfix-logwatch | |
parent | de49812990871e1705b64051c35161d5e6400269 (diff) |
gentoo resync : 31.12.2018
Diffstat (limited to 'net-mail/postfix-logwatch')
-rw-r--r-- | net-mail/postfix-logwatch/Manifest | 2 | ||||
-rw-r--r-- | net-mail/postfix-logwatch/files/all-server-ports-busy-lines.patch | 59 | ||||
-rw-r--r-- | net-mail/postfix-logwatch/postfix-logwatch-1.40.03-r3.ebuild | 44 |
3 files changed, 105 insertions, 0 deletions
diff --git a/net-mail/postfix-logwatch/Manifest b/net-mail/postfix-logwatch/Manifest index 0e8ff5b6a02f..37c220b9287e 100644 --- a/net-mail/postfix-logwatch/Manifest +++ b/net-mail/postfix-logwatch/Manifest @@ -1,6 +1,8 @@ +AUX all-server-ports-busy-lines.patch 2510 BLAKE2B 152a38abfc0caff5aaa8bce0a0b0c9adbf259a3317503506ad73a29c85745751960e594efca1d58cf7a39f401a443034ccca1bb8d80bc8bc25fa0b8e215d6602 SHA512 01edf0e1fb6db7799618e9e03f7201470e00a71ca4a43539e6a3555c81bab5846007f140ff868fd48a436c3a7a8f0fe6de70edd285887402fd97edfec636506d AUX multi-digit-enhanced-status.patch 1479 BLAKE2B b8364d035aa3662b539523ec63cf6d011ccf33d700cb45382b764342b42680621d1f1f376ecc66c1bbb7321fee1bf06f226a7e21cf7cceaad6048de526edc599 SHA512 6f732591637c5a076532b210a0b9378904609e7927ed5549c1b3e976e45a38e080ed0a754b230d04f4fd0b1904ddc75acd4c420032e23bd663276398cb35a5c7 AUX redundant-argument-to-sprintf.patch 1744 BLAKE2B d251a7e894dd4ebe09d61984a55ad2e7a0771310a88042da952c6e7d13b98952648e2da995e32cac92818e26d2df2e0d83f08a16fed093cfb07fe81187f5aaf6 SHA512 31e35603cee7c51ffe126ba0caeadbbca564694439101d92293d2163d3b674be552ac3e781d4b10fab11435d072bf3bb540e3070bd3a839dd6297fff02cf5b04 AUX unescaped-left-brace.patch 1277 BLAKE2B 3dc055f3321b958cbe35e0e51336c64e41b4e71e4221ea025c6b4c86eff8af710652ab2f97bde52944ec17ba047039319356b338b10af6594dc50167811535df SHA512 dcfdb1fc7793fcf8a1e41fd890023c901bccff5c241601f99a5aef398fe35c1eae82d786064e189ef2113aad9d2081a67d8451d9c58ceefc78192e22ac5d3033 DIST postfix-logwatch-1.40.03.tgz 107065 BLAKE2B 153f83c3414d2773ec528260369a564624aacc6de5627ee1da77d1eea89b276fb014c045785bc8ae1fbf7e6da2279a0d309ab171ff55d1087d3379466570c5ea SHA512 7059f409cabb3cb638885342ab876e1c85c87530c3544bf04c54a56707695acdc5cbb706e3f192ef5608c9a00706e4d7be3cc7b32286460719d7b497e44b3341 EBUILD postfix-logwatch-1.40.03-r2.ebuild 1069 BLAKE2B 5b0a9903c7622e0033217d2c97c551d8dbe8443e8bc7e60712b945ae364699c4599ca4d96d0ae81c9c1ffbcc1a2f5e33b2adff5b33b2276a433ef4de8c9a8ebb SHA512 c92f554614484baba18a9a3e178e4a6d419f2c41cac23f951a518fd63513b8e9df278391441ec8ae2cf9c68f2923e274e3e436bbbf3761430a6c5d797635c5e7 +EBUILD postfix-logwatch-1.40.03-r3.ebuild 1117 BLAKE2B 07f78be6fa6e9cfc3881ce9259dfbaeb8884114cb41b0989e29e1065789050e6542e5f0ec3e4512a968243ce214561ad8399c8ac2c24510e4d400eeefecb4101 SHA512 fd1ad247b55224b115c00557bc1e23db90db9383bc39b1b27430539c8101d209050b2f292f42aca3737b06275b8ddee6a0a746ed487acefa6307cf7902b1b2cb MISC metadata.xml 304 BLAKE2B 48bc40ba602d100542b0515ce426fdab3846135079ef677b11c2024c14243d0d06ecd543c0040420bddd839c2043ca0de3223cb9a02135b5c398f825beafdaa4 SHA512 6df4937b334df95e1178cd70c594d9ef08e52f5b34f4da0a129cd3586192dabe974623b13b6992021231150e8a70b7c2d68e7b65faea39113efe04f9a2244cb1 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 new file mode 100644 index 000000000000..dd5ae5869eb2 --- /dev/null +++ b/net-mail/postfix-logwatch/files/all-server-ports-busy-lines.patch @@ -0,0 +1,59 @@ +From 7b3930a9d44f91a63f0edbe765c75dc8f6128b7c Mon Sep 17 00:00:00 2001 +From: Michael Orlitzky <michael@orlitzky.com> +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/postfix-logwatch-1.40.03-r3.ebuild b/net-mail/postfix-logwatch/postfix-logwatch-1.40.03-r3.ebuild new file mode 100644 index 000000000000..1e6cf975500f --- /dev/null +++ b/net-mail/postfix-logwatch/postfix-logwatch-1.40.03-r3.ebuild @@ -0,0 +1,44 @@ +# Copyright 1999-2018 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" +) + +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 +} |