commit d545a6c3390ab2ebc284896499594a8d46ec94a1 Author: Marcin Krol <h...@tld-linux.org> Date: Fri Jan 25 18:53:51 2019 +0100
- migrate configuration to /etc/postfix postgrey-postfix_dir.patch | 58 ---------------------------------------------- postgrey.spec | 25 +++++++++++++++----- 2 files changed, 19 insertions(+), 64 deletions(-) --- diff --git a/postgrey.spec b/postgrey.spec index e28e91a..bac60e6 100644 --- a/postgrey.spec +++ b/postgrey.spec @@ -3,7 +3,7 @@ Summary: Postfix Greylisting Policy Server Summary(pl.UTF-8): Serwer do polityki "szarych list" dla Postfiksa Name: postgrey Version: 1.37 -Release: 4 +Release: 5 License: GPL v2 Group: Networking/Daemons Source0: http://postgrey.schweikert.ch/pub/%{name}-%{version}.tar.gz @@ -13,8 +13,7 @@ Source2: %{name}.sysconfig Source3: http://www.lipek.pl/postgrey_clients_dump # Source3-md5: 155b88f2781b03535bfa2797cda28e52 Patch0: %{name}-group.patch -Patch1: %{name}-postfix_dir.patch -Patch2: disable-transaction-logic +Patch1: disable-transaction-logic URL: http://postgrey.schweikert.ch/ BuildRequires: rpm-perlprov BuildRequires: rpmbuild(macros) >= 1.268 @@ -23,7 +22,7 @@ Requires: postfix BuildArch: noarch BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) -%define _sysconfdir /etc/mail +%define _sysconfdir /etc/postfix %description Postgrey is a Postfix policy server implementing greylisting. When a @@ -68,8 +67,7 @@ lub jeśli chcemy używać gniazd inet (w razie potrzeby zmienić IP): %prep %setup -q %patch0 -p1 -%patch1 -p0 -%patch2 -p1 +%patch1 -p1 %install rm -rf $RPM_BUILD_ROOT @@ -111,6 +109,21 @@ if [ "$1" = 0 ]; then rm -rf %{_var}/spool/postfix/%{name} fi +%triggerun -- %{name} < 1.37-5 +if [ $1 -le 1 ]; then + exit 0 +fi +for f in /etc/mail/postgres_whitelist_{clients,clients.local,recipients}; do + f=${f##*/} + [ -f "/etc/mail/$f" ] && mv "/etc/mail/$f" "/etc/postfix/$f" 2>/dev/null || : +done +[ -n "$(find /etc/mail -type d -empty 2>/dev/null)" ] && rmdir /etc/mail 2>/dev/null || : + +%triggerpostun -- %{name} < 1.37-5 +echo +echo "Warning! Configuration has been migrated to /etc/postfix." +echo + %files %defattr(644,root,root,755) %doc README Changes diff --git a/postgrey-postfix_dir.patch b/postgrey-postfix_dir.patch deleted file mode 100644 index bb3a427..0000000 --- a/postgrey-postfix_dir.patch +++ /dev/null @@ -1,58 +0,0 @@ ---- postgrey.orig 2006-01-22 19:37:53.460148000 +0100 -+++ postgrey 2006-01-22 19:42:13.330148000 +0100 -@@ -24,7 +24,7 @@ use vars qw(@ISA); - - my $VERSION = '1.31'; - my $DEFAULT_DBDIR = '/var/spool/postfix/postgrey'; --my $CONFIG_DIR = '/etc/postfix'; -+my $CONFIG_DIR = '/etc/mail'; - - sub cidr_parse($) - { -@@ -779,8 +779,8 @@ B<postgrey> [I<options>...] - --privacy store data using one-way hash functions - --hostname=NAME set the hostname (default: `hostname`) - --exim don't reuse a socket for more than one query (exim compatible) -- --whitelist-clients=FILE default: /etc/postfix/postgrey_whitelist_clients -- --whitelist-recipients=FILE default: /etc/postfix/postgrey_whitelist_recipients -+ --whitelist-clients=FILE default: /etc/mail/postgrey_whitelist_clients -+ --whitelist-recipients=FILE default: /etc/mail/postgrey_whitelist_recipients - --auto-whitelist-clients=N whitelist host after first successful delivery - N is the minimal count of mails before a client is - whitelisted (turned on by default with value 5) -@@ -630,7 +630,7 @@ - --privacy store data using one-way hash functions - - Note that the --whitelist-x options can be specified multiple times, -- and that per default /etc/postfix/postgrey_whitelist_clients.local is -+ and that per default /etc/mail/postgrey_whitelist_clients.local is - also read, so that you can put there local entries. - - =head1 DESCRIPTION -@@ -678,11 +678,11 @@ - =item * - - Install the provided postgrey_whitelist_clients and --postgrey_whitelist_recipients in /etc/postfix. -+postgrey_whitelist_recipients in /etc/mail. - - =item * - --Put in /etc/postfix/postgrey_whitelist_recipients users that do not want -+Put in /etc/mail/postgrey_whitelist_recipients users that do not want - greylisting. - - =back -@@ -693,9 +693,9 @@ - which no greylisting should be done. Per default postgrey will read the - following files: - -- /etc/postfix/postgrey_whitelist_clients -- /etc/postfix/postgrey_whitelist_clients.local -- /etc/postfix/postgrey_whitelist_recipients -+ /etc/mail/postgrey_whitelist_clients -+ /etc/mail/postgrey_whitelist_clients.local -+ /etc/mail/postgrey_whitelist_recipients - - You can specify alternative paths with the --whitelist-x options. - ================================================================ ---- gitweb: http://git.pld-linux.org/gitweb.cgi/packages/postgrey.git/commitdiff/d545a6c3390ab2ebc284896499594a8d46ec94a1 _______________________________________________ pld-cvs-commit mailing list pld-cvs-commit@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit