summaryrefslogtreecommitdiff
path: root/mail-filter/postgrey
diff options
context:
space:
mode:
authorLiguros - Gitlab CI/CD [master] <gitlab@liguros.net>2021-01-17 23:35:33 +0000
committerLiguros - Gitlab CI/CD [master] <gitlab@liguros.net>2021-01-17 23:35:33 +0000
commit8e8120eabdd28020aa69c7a60505cce2edd20adc (patch)
tree061bf0acdc672720e0bc3a2d575f67d25aedb2d8 /mail-filter/postgrey
parentc16790af2c9b4cbc38e565d4311252193ff85484 (diff)
downloadbaldeagleos-repo-21.1.2.tar.gz
baldeagleos-repo-21.1.2.tar.xz
baldeagleos-repo-21.1.2.zip
Updating liguros repo21.1.2
Diffstat (limited to 'mail-filter/postgrey')
-rw-r--r--mail-filter/postgrey/Manifest2
-rw-r--r--mail-filter/postgrey/files/postgrey-1.34-perl-5.18.patch33
-rw-r--r--mail-filter/postgrey/files/targrey-0.31-postgrey-1.34.patch202
-rw-r--r--mail-filter/postgrey/metadata.xml14
-rw-r--r--mail-filter/postgrey/postgrey-1.37.ebuild4
-rw-r--r--mail-filter/postgrey/postgrey-1.37_p20190625-r1.ebuild (renamed from mail-filter/postgrey/postgrey-1.36-r1.ebuild)52
6 files changed, 34 insertions, 273 deletions
diff --git a/mail-filter/postgrey/Manifest b/mail-filter/postgrey/Manifest
index b445413d7923..ae58ff0be96f 100644
--- a/mail-filter/postgrey/Manifest
+++ b/mail-filter/postgrey/Manifest
@@ -1,2 +1,2 @@
-DIST postgrey-1.36.tar.gz 38797 BLAKE2B b8e4dedb28ababc92cdd1d128652a468caeb55eb611ca019148a2e538d3cc0d397cd14889942904b05c9471bb13ed9fa6250e399d47df22241895c109a68315d SHA512 9b2502b873658c1ef8a86bff091d61b8dc8d66f7395bc0a869f9e6ec60b691a317c084ae326f49ce8dd926f0fa2620a58f3ad76c25e1b1c9606557d2802d1395
DIST postgrey-1.37.tar.gz 41815 BLAKE2B dd8a1f62f56a614c25863afde089f1882a1567e3a53a24b1d12b6f23994388caf99059f05775853065143f4f953a6fd964625d5c865993e0e679dd545b848c11 SHA512 369968212ea60539efc0d4a7ae84f7c3ce13f5622e6ee070a0089423ef81ca8f7541ebd20289291d0e6a3aec2ca30dbc9c0d9c0a6f0a686adfadb5d0dd7830ca
+DIST postgrey-1.37_p20190625.tar.gz 124667 BLAKE2B ca2caba51a72198e42d6d4d9c5c7590b62c1bd1589d05bfb4096fb4d95ff62ff96976beac8c1b35136a4a6830af936244485ff7dcdcd46d8558a4bef0bbb123a SHA512 f3caf3c7663bd8784701c7e1ad45d1c577edf6fac14591a6983fda25e7f8a875f2501780a8f97ce72e6a324878404e9ac2a003a07ae07ad4debae61fe734b8d4
diff --git a/mail-filter/postgrey/files/postgrey-1.34-perl-5.18.patch b/mail-filter/postgrey/files/postgrey-1.34-perl-5.18.patch
deleted file mode 100644
index 615c6e5b77d1..000000000000
--- a/mail-filter/postgrey/files/postgrey-1.34-perl-5.18.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 9673b54064691a5b9c295ffea340d8a1f9ee1cb8 Mon Sep 17 00:00:00 2001
-From: Yasuhiro KIMURA <yasu@utahime.org>
-Date: Sat, 17 Aug 2013 22:05:27 +0900
-Subject: [PATCH] Make postgrey work with Perl 5.18
-
----
- postgrey | 10 ++++++++++
- 1 file changed, 10 insertions(+)
-
-diff --git a/postgrey b/postgrey
-index 7cb0352..37f69bd 100755
---- a/postgrey
-+++ b/postgrey
-@@ -557,6 +557,16 @@ sub main()
- if($opt{dbdir}) {
- $opt{dbdir} =~ /^(.*)$/; $opt{dbdir} = $1;
- }
-+ # untaint what is given on --pidfile. It is not security sensitive since
-+ # it is provided by the admin
-+ if($opt{pidfile}) {
-+ $opt{pidfile} =~ /^(.*)$/; $opt{pidfile} = $1;
-+ }
-+ # untaint what is given on --inet. It is not security sensitive since
-+ # it is provided by the admin
-+ if($opt{inet}) {
-+ $opt{inet} =~ /^(.*)$/; $opt{inet} = $1;
-+ }
-
- # determine proper "logsock" for Sys::Syslog
- my $syslog_logsock;
---
-2.0.3
-
diff --git a/mail-filter/postgrey/files/targrey-0.31-postgrey-1.34.patch b/mail-filter/postgrey/files/targrey-0.31-postgrey-1.34.patch
deleted file mode 100644
index a17b6457d39a..000000000000
--- a/mail-filter/postgrey/files/targrey-0.31-postgrey-1.34.patch
+++ /dev/null
@@ -1,202 +0,0 @@
---- postgrey.orig 2011-05-04 22:54:15.000000000 +0200
-+++ postgrey 2011-10-17 10:10:21.000000000 +0200
-@@ -309,6 +309,22 @@
- $self->mylog(1, "cleaning clients database finished. before: $nr_keys_before, after: $nr_keys_after");
- }
-
-+ if($self->{postgrey}{targrey}) {
-+ # cleanup tarpit blacklist database
-+ my $tarpit_db = $self->{postgrey}{db_tarpit};
-+ ($nr_keys_before, $nr_keys_after) = (0, 0);
-+ while (my ($key, $tarpit_last_seen) = each %$tarpit_db) {
-+ $nr_keys_before++;
-+ if($now - $tarpit_last_seen > $retry_window) {
-+ delete $tarpit_db->{$key};
-+ }
-+ else {
-+ $nr_keys_after++;
-+ }
-+ }
-+ $self->mylog(1, "cleaning tarpit blacklist database finished. before: $nr_keys_before, after: $nr_keys_after");
-+ }
-+
- $self->{postgrey}{last_maint_keys}=$now;
- }
- }
-@@ -383,7 +399,7 @@
- # whitelist if count is enough
- if(defined $cawl_count and $cawl_count >= $self->{postgrey}{awl_clients})
- {
-- if(($now >= $cawl_last+3600) or ($cawl_last > $now)) {
-+ if(($now >= $cawl_last + $self->{postgrey}{awl_delay}) or ($cawl_last > $now)) {
- $cawl_count++; # for statistics
- $cawl_db->{$cawl_key}=$cawl_count.','.$now;
- }
-@@ -392,6 +408,28 @@
- }
- }
-
-+ # check tarpit passed if targrey mode
-+ if ($self->{postgrey}{targrey} && $attr->{protocol_state} eq 'DATA') { # passed tarpit
-+ # remove tarpit blacklist
-+ my $tarpit_db = $self->{postgrey}{db_tarpit};
-+ my $tarpit_key = $attr->{client_address};
-+ delete $tarpit_db->{$tarpit_key};
-+
-+ # auto whitelist clients by tarpit
-+ if ($self->{postgrey}{awl_clients}) {
-+ # enough time has passed (record only one attempt per hour)
-+ if (! defined $cawl_last or $now >= $cawl_last + $self->{postgrey}{awl_delay}) {
-+ # ok, increase count
-+ $cawl_count++;
-+ $cawl_db->{$cawl_key}=$cawl_count.','.$now;
-+ $self->mylog(1, "tarpit whitelisted: $attr->{client_name}"."[".$attr->{client_address}."]")
-+ if $cawl_count==$self->{postgrey}{awl_clients};
-+ }
-+ }
-+
-+ return 'DUNNO';
-+ }
-+
- # lookup
- my $sender = $self->do_sender_substitutions($attr->{sender});
- my ($client_net, $client_host) =
-@@ -402,10 +440,11 @@
- }
- my $val = $db->{$key};
- my $first;
-+ my $retry_count=0;
- my $last_was_successful=0;
- if(defined $val) {
- my $last;
-- ($first, $last) = split(/,/,$val);
-+ ($first, $last, $retry_count) = split(/,/,$val);
- # find out if the last time was unsuccessful, so that we can add a header
- # to say how much had to be waited
- if($last - $first >= $self->{postgrey}{delay}) {
-@@ -426,16 +465,19 @@
- $first = $now;
- }
-
-+ my $diff = $self->{postgrey}{delay} - ($now - $first);
-+
-+ # enough waited? -> increase retry_count
-+ $retry_count++ if($diff <= 0);
-+
- # update (put as last element stripped host-part if it was stripped)
- if(defined $client_host) {
-- $db->{$key}="$first,$now,$client_host";
-+ $db->{$key}="$first,$now,$retry_count,$client_host";
- }
- else {
-- $db->{$key}="$first,$now";
-+ $db->{$key}="$first,$now,$retry_count";
- }
-
-- my $diff = $self->{postgrey}{delay} - ($now - $first);
--
- # auto whitelist clients
- # algorithm:
- # - on successful entry in the greylist db of a triplet:
-@@ -443,23 +485,41 @@
- # - client whitelisted already? -> update last-seen timestamp
- if($self->{postgrey}{awl_clients}) {
- # greylisting succeeded
-- if($diff <= 0 and !$last_was_successful) {
-+ if($retry_count >= $self->{postgrey}{retry_count} and !$last_was_successful) {
- # enough time has passed (record only one attempt per hour)
-- if(! defined $cawl_last or $now >= $cawl_last + 3600) {
-+ if(! defined $cawl_last or $now >= $cawl_last + $self->{postgrey}{awl_delay}) {
- # ok, increase count
- $cawl_count++;
- $cawl_db->{$cawl_key}=$cawl_count.','.$now;
- my $client = $attr->{client_name} ?
- $attr->{client_name}.'['.$attr->{client_address}.']' :
- $attr->{client_address};
-- $self->mylog(1, "whitelisted: $client")
-+ $self->mylog(1, "whitelisted: $attr->{client_name}"."[".$attr->{client_address}."]")
- if $cawl_count==$self->{postgrey}{awl_clients};
- }
- }
- }
-
-- # not enough waited? -> greylist
-- if ($diff > 0 ) {
-+ # not enough retry? -> greylist
-+ if ($retry_count < $self->{postgrey}{retry_count}) {
-+ if($self->{postgrey}{tarpit} && ! $self->{postgrey}{targrey}) {
-+ # do tarpit and greylist if tarpit option only
-+ # don't add message after greylist_action
-+ return "SLEEP $self->{postgrey}{tarpit}, $self->{postgrey}{greylist_action}";
-+ }
-+ if($self->{postgrey}{targrey}) {
-+ # do tarpit if targrey option
-+ # add tarpit blacklist
-+ my $tarpit_db = $self->{postgrey}{db_tarpit};
-+ my $tarpit_key = $attr->{client_address};
-+ my $tarpit_last = $tarpit_db->{$tarpit_key};
-+ $tarpit_last = 0 unless (defined $tarpit_last);
-+ $tarpit_db->{$tarpit_key} = "$now" if ($now >= $tarpit_last+300); # update if 5min ago
-+
-+ # return sleep if not tarpit blacklisted
-+ return "SLEEP $self->{postgrey}{tarpit}" if ($tarpit_last == 0);
-+ # greylist if tarpit blacklisted
-+ }
- my $msg = $self->{postgrey}{greylist_text};
- # Workaround for an Exchange bug related to Greylisting:
- # use DSN 4.2.0 instead of the default 4.7.1. This works
-@@ -517,6 +577,7 @@
- 'syslogfacility|syslog-facility|facility=s',
- 'retry-window=s', 'greylist-action=s', 'greylist-text=s', 'privacy',
- 'hostname=s', 'exim', 'listen-queue-size=i', 'x-greylist-header=s',
-+ 'tarpit:s', 'targrey', 'retry-count=i', 'auto-whitelist-delay=i',
- ) or exit(1);
- # note: lookup-by-subnet can be given for compatibility, but it is default
- # so do not do nothing with it...
-@@ -606,7 +667,9 @@
- awl_clients => defined $opt{'auto-whitelist-clients'} ?
- ($opt{'auto-whitelist-clients'} ne '' ?
- $opt{'auto-whitelist-clients'} : 5) : 5,
-+ awl_delay => $opt{'auto-whitelist-delay'} || 3600,
- retry_window => $retry_window,
-+ retry_count => $opt{'retry-count'} || 1,
- greylist_action => $opt{'greylist-action'} || 'DEFER_IF_PERMIT',
- greylist_text => $opt{'greylist-text'} || 'Greylisted, see http://postgrey.schweikert.ch/help/%r.html',
- whitelist_clients_files => $opt{'whitelist-clients'} ||
-@@ -618,6 +681,10 @@
- hostname => defined $opt{hostname} ? $opt{hostname} : hostname,
- exim => defined $opt{'exim'},
- x_greylist_header => $opt{'x-greylist-header'} || 'X-Greylist: delayed %t seconds by postgrey-%v at %h; %d',
-+ tarpit => defined $opt{'tarpit'} ?
-+ ($opt{'tarpit'} ne '' ?
-+ $opt{'tarpit'} : 65) : undef,
-+ targrey => defined $opt{'targrey'},
- },
- }, 'postgrey';
-
-@@ -633,6 +700,11 @@
- require Digest::SHA;
- }
-
-+ # --targrey needs tarpit sec
-+ if(defined $opt{'targrey'} && ! defined $opt{'tarpit'}) {
-+ $server->{postgrey}{tarpit} = 125;
-+ }
-+
- $0 = join(' ', @{$server->{server}{commandline}});
- $server->run;
-
-@@ -711,6 +783,13 @@
- -Env => $self->{postgrey}{db_env}
- ) or die "ERROR: can't create database $self->{server}{dbdir}/postgrey_clients.db: $!\n";
- }
-+ if($self->{postgrey}{targrey}) { # use targrey
-+ tie(%{$self->{postgrey}{db_tarpit}}, 'BerkeleyDB::Btree',
-+ -Filename => 'tarpit_clients.db',
-+ -Flags => DB_CREATE,
-+ -Env => $self->{postgrey}{db_env}
-+ ) or die "ERROR: can't create database $self->{server}{dbdir}/tarpit_clients.db: $!\n";
-+ }
- }
-
- sub mux_input()
diff --git a/mail-filter/postgrey/metadata.xml b/mail-filter/postgrey/metadata.xml
index 0ad1be606de3..b411ed0f2447 100644
--- a/mail-filter/postgrey/metadata.xml
+++ b/mail-filter/postgrey/metadata.xml
@@ -2,18 +2,14 @@
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
- <email>lists@xunil.at</email>
- <name>Stefan Weichinger</name>
- </maintainer>
- <maintainer type="project">
- <email>proxy-maint@gentoo.org</email>
- <name>Proxy Maintainers</name>
+ <email>sam@gentoo.org</email>
+ <name>Sam James</name>
</maintainer>
<longdescription>
Postgrey is a Postfix policy server implementing greylisting developed by David Schweikert at the ISG.EE.
</longdescription>
- <use>
- <flag name="targrey">Enables the targrey patch</flag>
- </use>
+ <upstream>
+ <remote-id type="github">schweikert/postgrey</remote-id>
+ </upstream>
<origin>gentoo-staging</origin>
</pkgmetadata>
diff --git a/mail-filter/postgrey/postgrey-1.37.ebuild b/mail-filter/postgrey/postgrey-1.37.ebuild
index 59932bed5424..f9070ca4ffb9 100644
--- a/mail-filter/postgrey/postgrey-1.37.ebuild
+++ b/mail-filter/postgrey/postgrey-1.37.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=5
@@ -12,7 +12,7 @@ http://postgrey.schweikert.ch/pub/old/${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
-KEYWORDS="~amd64 ~hppa ~ppc ~ppc64 ~x86"
+KEYWORDS="amd64 ~hppa ~ppc ppc64 x86"
IUSE=""
DEPEND=""
diff --git a/mail-filter/postgrey/postgrey-1.36-r1.ebuild b/mail-filter/postgrey/postgrey-1.37_p20190625-r1.ebuild
index a6485ac49c2f..59c2f6c19049 100644
--- a/mail-filter/postgrey/postgrey-1.36-r1.ebuild
+++ b/mail-filter/postgrey/postgrey-1.37_p20190625-r1.ebuild
@@ -1,43 +1,43 @@
-# Copyright 1999-2017 Gentoo Foundation
+# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=5
+EAPI=7
-inherit eutils systemd user
+inherit systemd
+COMMIT="eb420c5dee57dd54e6f63bad5d74e85f5cc9535d"
DESCRIPTION="Postgrey is a Postfix policy server implementing greylisting"
HOMEPAGE="https://postgrey.schweikert.ch/"
-SRC_URI="http://postgrey.schweikert.ch/pub/${P}.tar.gz
-http://postgrey.schweikert.ch/pub/old/${P}.tar.gz"
+SRC_URI="https://github.com/schweikert/postgrey/archive/${COMMIT}.tar.gz -> ${P}.tar.gz"
+S="${WORKDIR}/${PN}-${COMMIT}"
LICENSE="GPL-2"
SLOT="0"
-KEYWORDS="amd64 hppa ~ppc ppc64 x86"
-IUSE="targrey"
+KEYWORDS="~amd64 ~hppa ~ppc ~ppc64 ~x86"
-DEPEND=""
-RDEPEND=">=dev-lang/perl-5.6.0
- dev-perl/Net-Server
- dev-perl/IO-Multiplex
- dev-perl/BerkeleyDB
- dev-perl/Net-DNS
- dev-perl/NetAddr-IP
- dev-perl/Net-RBLClient
- dev-perl/Parse-Syslog
- virtual/perl-Digest-SHA
- >=sys-libs/db-4.1"
-
-pkg_setup() {
- enewgroup ${PN}
- enewuser ${PN} -1 -1 /dev/null ${PN}
-}
+DEPEND="
+ acct-group/postgrey
+ acct-user/postgrey
+"
+RDEPEND="
+ ${DEPEND}
+ >=dev-lang/perl-5.6.0
+ dev-perl/Net-Server
+ dev-perl/IO-Multiplex
+ dev-perl/BerkeleyDB
+ dev-perl/Net-DNS
+ dev-perl/NetAddr-IP
+ dev-perl/Net-RBLClient
+ dev-perl/Parse-Syslog
+ virtual/perl-Digest-SHA
+ >=sys-libs/db-4.1
+"
src_prepare() {
- if use targrey ; then
- epatch "${FILESDIR}"/targrey-0.31-postgrey-1.34.patch
- fi
+ default
# bug 479400
sed -i 's@#!/usr/bin/perl -T -w@#!/usr/bin/perl -w@' postgrey || die "sed failed"
+ sed -i -e '/git/d' Makefile || die
}
src_install() {