From e8574b3cd2fbda95678d9f3c0bb8e11ded7ba0a5 Mon Sep 17 00:00:00 2001 From: Michael Orlitzky Date: Wed, 6 Sep 2017 09:24:34 -0400 Subject: net-mail/amavis-logwatch: new revision with another bugfix patch. Package-Manager: Portage-2.3.6, Repoman-2.3.1 --- .../amavis-logwatch-1.51.03-r1.ebuild | 44 --------------------- .../amavis-logwatch-1.51.03-r2.ebuild | 45 ++++++++++++++++++++++ .../files/unchecked-encrypted.patch | 41 ++++++++++++++++++++ 3 files changed, 86 insertions(+), 44 deletions(-) delete mode 100644 net-mail/amavis-logwatch/amavis-logwatch-1.51.03-r1.ebuild create mode 100644 net-mail/amavis-logwatch/amavis-logwatch-1.51.03-r2.ebuild create mode 100644 net-mail/amavis-logwatch/files/unchecked-encrypted.patch (limited to 'net-mail/amavis-logwatch') diff --git a/net-mail/amavis-logwatch/amavis-logwatch-1.51.03-r1.ebuild b/net-mail/amavis-logwatch/amavis-logwatch-1.51.03-r1.ebuild deleted file mode 100644 index 891d142b26f3..000000000000 --- a/net-mail/amavis-logwatch/amavis-logwatch-1.51.03-r1.ebuild +++ /dev/null @@ -1,44 +0,0 @@ -# Copyright 1999-2017 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -DESCRIPTION="A log analyzer for amavisd-new" -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}/ignore-amavis-startup-notifications.patch" - "${FILESDIR}/ignore-utf8smtp-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 - doman ${PN}.1 - dobin ${PN} - insinto /etc - doins ${PN}.conf -} diff --git a/net-mail/amavis-logwatch/amavis-logwatch-1.51.03-r2.ebuild b/net-mail/amavis-logwatch/amavis-logwatch-1.51.03-r2.ebuild new file mode 100644 index 000000000000..3fa4278da7aa --- /dev/null +++ b/net-mail/amavis-logwatch/amavis-logwatch-1.51.03-r2.ebuild @@ -0,0 +1,45 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +DESCRIPTION="A log analyzer for amavisd-new" +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}/ignore-amavis-startup-notifications.patch" + "${FILESDIR}/ignore-utf8smtp-lines.patch" + "${FILESDIR}/unchecked-encrypted.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 + doman ${PN}.1 + dobin ${PN} + insinto /etc + doins ${PN}.conf +} diff --git a/net-mail/amavis-logwatch/files/unchecked-encrypted.patch b/net-mail/amavis-logwatch/files/unchecked-encrypted.patch new file mode 100644 index 000000000000..33c2214a2d09 --- /dev/null +++ b/net-mail/amavis-logwatch/files/unchecked-encrypted.patch @@ -0,0 +1,41 @@ +From e9f83dde1b241ce449264db7a517124bb115dd99 Mon Sep 17 00:00:00 2001 +From: Michael Orlitzky +Date: Wed, 6 Sep 2017 09:19:42 -0400 +Subject: [PATCH 1/1] Catch mail that is passed UNCHECKED-ENCRYPTED. + +Some encrypted mail can pass through the system with a log line like, + + (01495-17) Passed UNCHECKED-ENCRYPTED {RelayedTaggedInbound}, ... + +These were unmatched, because the "-ENCRYPTED" suffix is new. One +regular expression and a dictionary have been updated to catch those +lines and dump them into the "unchecked" bin with the rest of the +UNCHECKED lines. +--- + amavis-logwatch | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/amavis-logwatch b/amavis-logwatch +index deb9146..448de3a 100644 +--- a/amavis-logwatch ++++ b/amavis-logwatch +@@ -1799,6 +1799,7 @@ my %ccatmajor_to_sectkey = ( + 'INFECTED' => 'malware', + 'BANNED' => 'bannedname', + 'UNCHECKED' => 'unchecked', ++ 'UNCHECKED-ENCRYPTED' => 'unchecked', + 'SPAM' => 'spam', + 'SPAMMY' => 'spammy', + 'BAD-HEADER' => 'badheader', +@@ -2295,7 +2296,7 @@ while (<>) { + #XXX elsif (($action, $key, $ip, $from, $to) = ( $p1 =~ /^(?:Virus found - quarantined|(?:(Passed|Blocked) )?INFECTED) \(([^\)]+)\),[A-Z .]*(?: \[($re_IP)\])?(?: \[$re_IP\])* [<(]([^>)]*)[>)] -> [(<]([^(<]+)[(>]/o )) + + # the first IP is the envelope sender. +- if ($p1 !~ /^(CLEAN|SPAM(?:MY)?|INFECTED \(.*?\)|BANNED \(.*?\)|BAD-HEADER(?:-\d)?|UNCHECKED|MTA-BLOCKED|OVERSIZED|OTHER|TEMPFAIL)(?: \{[^}]+})?, ([^[]+ )?(?:([^<]+) )?[<(](.*?)[>)] -> ([(<].*?[)>]), (?:.*Hits: ([-+.\d]+))(?:.* size: (\d+))?(?:.* autolearn=(\w+))?/) { ++ if ($p1 !~ /^(CLEAN|SPAM(?:MY)?|INFECTED \(.*?\)|BANNED \(.*?\)|BAD-HEADER(?:-\d)?|UNCHECKED|UNCHECKED-ENCRYPTED|MTA-BLOCKED|OVERSIZED|OTHER|TEMPFAIL)(?: \{[^}]+})?, ([^[]+ )?(?:([^<]+) )?[<(](.*?)[>)] -> ([(<].*?[)>]), (?:.*Hits: ([-+.\d]+))(?:.* size: (\d+))?(?:.* autolearn=(\w+))?/) { + inc_unmatched('passblock'); + next; + } +-- +2.13.0 + -- cgit v1.2.3-65-gdbad