%define subrel 2 Summary: Postfix Greylisting Policy Server Name: postgrey Version: 1.34 Release: %mkrel 8 License: GPLv2+ Group: System/Servers URL: http://postgrey.schweikert.ch/ Source: http://postgrey.schweikert.ch/pub/%{name}-%{version}.tar.gz Source1: %{name}.service Source2: %{name}.sysconfig # use postgrey group by default # use /var/lib/postgrey instead of /var/spool/postfix/postgrey Patch0: postgrey-mdk.patch Patch1: 9673b54064691a5b9c295ffea340d8a1f9ee1cb8.patch BuildArch: noarch Requires(post): systemd >= %{systemd_required_version} Requires(post): rpm-helper Requires(preun): rpm-helper Requires(pre): rpm-helper Requires(postun): rpm-helper Requires: postfix %define confdir /etc/postfix %define queue_directory %{_var}/spool/postfix %description Postgrey is a Postfix policy server implementing greylisting. When a request for delivery of a mail is received by Postfix via SMTP, the triplet CLIENT_IP / SENDER / RECIPIENT is built. If it is the first time that this triplet is seen, or if the triplet was first seen less than 5 minutes, then the mail gets rejected with a temporary error. Hopefully spammers or viruses will not try again later, as it is however required per RFC. %prep %setup -q %patch0 -p0 -b .mdk %patch1 -p1 %build pod2man -s 8 -c "" postgrey > postgrey.8 pod2man -s 8 -c "" contrib/postgreyreport > contrib/postgreyreport.8 %install rm -rf %{buildroot} install -D -m 644 %{SOURCE1} %{buildroot}%{_unitdir}/%{name}.service mkdir -p %{buildroot}%{_sysconfdir}/postfix cp postgrey_whitelist_clients %{buildroot}%{_sysconfdir}/postfix cp postgrey_whitelist_recipients %{buildroot}%{_sysconfdir}/postfix touch %{buildroot}%{_sysconfdir}/postfix/postgrey_whitelist_clients.local mkdir -p %{buildroot}%{_sbindir} install postgrey %{buildroot}%{_sbindir}/postgrey install contrib/postgreyreport %{buildroot}%{_sbindir}/postgreyreport mkdir -p %{buildroot}%{_sysconfdir}/sysconfig cp -p %{SOURCE2} %{buildroot}%{_sysconfdir}/sysconfig/%{name} mkdir -p %{buildroot}%{queue_directory}/extern/%{name} mkdir -p %{buildroot}%{_localstatedir}/lib/%{name} mkdir -p %{buildroot}%{_mandir}/man8 cp postgrey.8 contrib/postgreyreport.8 %{buildroot}%{_mandir}/man8 %pre %_pre_useradd %{name} %{_localstatedir}/lib/%{name} /bin/false %post %_post_service %{name} %preun %_preun_service %{name} %postun %_postun_userdel %{name} %files %doc README Changes %{_unitdir}/%{name}.service %config(noreplace) %{_sysconfdir}/sysconfig/%{name} %config(noreplace) %{confdir}/postgrey_whitelist_clients %config(noreplace) %{confdir}/postgrey_whitelist_recipients %config(noreplace) %{confdir}/postgrey_whitelist_clients.local %{_sbindir}/postgrey %{_sbindir}/postgreyreport %{_mandir}/man8/postgrey.8* %{_mandir}/man8/postgreyreport.8* %dir %attr(0750, postgrey, postfix) %{queue_directory}/extern/%{name} %dir %attr(0750, postgrey, postgrey) %{_localstatedir}/lib/%{name} %changelog * Sat Feb 08 2014 guillomovitch <guillomovitch> 1.34-8.2.mga4 + Revision: 585933 - no need for a /run subdirectory, actually - make postgrey works with perl 5.18 - fix PID file path * Sat Oct 19 2013 umeabot <umeabot> 1.34-8.mga4 + Revision: 522659 - Mageia 4 Mass Rebuild * Sun Mar 24 2013 colin <colin> 1.34-7.mga3 + Revision: 404859 - Add systemd requires and general post/pre fixes (mga#9302) * Thu Mar 21 2013 guillomovitch <guillomovitch> 1.34-6.mga3 + Revision: 404400 - switch from sysinit to systemd * Mon Jan 21 2013 colin <colin> 1.34-5.mga3 + Revision: 390448 - Fix tmpfiles scripts (to prevent touching /run/nologin) * Sun Jan 13 2013 umeabot <umeabot> 1.34-4.mga3 + Revision: 378125 - Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild * Wed Jun 06 2012 colin <colin> 1.34-3.mga3 + Revision: 256281 - Fix pidfile syntax * Wed Jun 06 2012 colin <colin> 1.34-2.mga3 + Revision: 256222 - Fix postgrey initialisation under systemd (pidfile problems) * Mon Mar 05 2012 misc <misc> 1.34-1.mga2 + Revision: 219355 - rediff patch 1 - new version of postgrey * Tue Apr 05 2011 misc <misc> 1.32-6.mga1 + Revision: 80666 - increase Release to ensure upgrade - fix License - add comment on the only patch - remove old workaround for a problem that was fixed long time ago - imported package postgrey