|
|
485605b |
%global confdir %{_sysconfdir}/postfix
|
|
|
bdea17a |
|
|
|
485605b |
Name: postgrey
|
|
|
4255164 |
Version: 1.37
|
|
|
5244789 |
Release: 10%{?dist}
|
|
|
85fb389 |
Summary: Postfix Greylisting Policy Server
|
|
|
5fc9e95 |
# File headers only state "GNU GPL", but the LICENSE sections state v2 and "any
|
|
|
5fc9e95 |
# later version"
|
|
|
485605b |
License: GPLv2+
|
|
|
485605b |
URL: http://postgrey.schweikert.ch/
|
|
|
485605b |
Source0: http://postgrey.schweikert.ch/pub/postgrey-%{version}.tar.gz
|
|
|
485605b |
Source1: postgrey.service
|
|
|
485605b |
Source2: README-rpm
|
|
|
485605b |
Source3: postgrey.sysconfig
|
|
|
485605b |
BuildArch: noarch
|
|
|
d93727a |
BuildRequires: perl-generators
|
|
|
55eeb05 |
BuildRequires: perl-podlators
|
|
|
485605b |
BuildRequires: systemd
|
|
|
f83072d |
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
|
|
|
3fb603a |
## Note: If --privacy specified, perl(Digest::SHA) will be needed.
|
|
|
f83072d |
#Requires: perl(BerkeleyDB)
|
|
|
f83072d |
#Requires: perl(Fcntl)
|
|
|
f83072d |
#Requires: perl(Getopt::Long)
|
|
|
f83072d |
#Requires: perl(IO::Multiplex)
|
|
|
f83072d |
#Requires: perl(Net::DNS)
|
|
|
f83072d |
#Requires: perl(Net::Server)
|
|
|
f83072d |
#Requires: perl(Pod::Usage)
|
|
|
f83072d |
#Requires: perl(POSIX)
|
|
|
f83072d |
#Requires: perl(strict)
|
|
|
f83072d |
#Requires: perl(Sys::Hostname)
|
|
|
f83072d |
#Requires: perl(Sys::Syslog)
|
|
|
3fb603a |
# Requiring postfix for its directories and GID.
|
|
|
3fb603a |
Recommends: postfix
|
|
|
485605b |
Requires(pre): shadow-utils
|
|
|
485605b |
Requires(post): systemd
|
|
|
485605b |
Requires(preun): systemd
|
|
|
485605b |
Requires(postun): systemd
|
|
|
bdea17a |
|
|
|
bdea17a |
%description
|
|
|
0f06bbc |
Postgrey is a Postfix policy server implementing greylisting. When a request
|
|
|
bdea17a |
for delivery of a mail is received by Postfix via SMTP, the triplet CLIENT_IP /
|
|
|
0f06bbc |
SENDER / RECIPIENT is built. If it is the first time that this triplet is
|
|
|
bdea17a |
seen, or if the triplet was first seen less than 5 minutes, then the mail gets
|
|
|
bdea17a |
rejected with a temporary error. Hopefully spammers or viruses will not try
|
|
|
bdea17a |
again later, as it is however required per RFC.
|
|
|
bdea17a |
|
|
|
bdea17a |
%prep
|
|
|
bdea17a |
%setup -q
|
|
|
3fb603a |
# Set default group tp postgrey.
|
|
|
3fb603a |
sed -i 's|nogroup|postgrey|g' postgrey
|
|
|
3fb603a |
# No perldoc, man is enough.
|
|
|
3fb603a |
sed -i 's|POD ||g;s|perldoc|man|g' README
|
|
|
3fb603a |
install -pm0644 %{SOURCE2} README.Fedora
|
|
|
bdea17a |
|
|
|
bdea17a |
%build
|
|
|
3fb603a |
# We only have perl scripts, so just "build" the man page.
|
|
|
bdea17a |
pod2man \
|
|
|
bdea17a |
--center="Postgrey Policy Server for Postfix" \
|
|
|
bdea17a |
--section="8" \
|
|
|
3fb603a |
--release="Postgrey %{version}" \
|
|
|
bdea17a |
postgrey > postgrey.8
|
|
|
bdea17a |
|
|
|
bdea17a |
%install
|
|
|
3fb603a |
# Configuration files.
|
|
|
485605b |
mkdir -p %{buildroot}%{confdir}
|
|
|
c051211 |
install -pm0644 postgrey_whitelist_{clients,recipients} \
|
|
|
bdea17a |
%{buildroot}%{confdir}/
|
|
|
3fb603a |
# Local whitelist file.
|
|
|
bdea17a |
echo "# Clients that should not be greylisted. See postgrey(8)." \
|
|
|
bdea17a |
> %{buildroot}%{confdir}/postgrey_whitelist_clients.local
|
|
|
bdea17a |
|
|
|
3fb603a |
# Main script.
|
|
|
485605b |
install -pDm0755 postgrey %{buildroot}%{_sbindir}/postgrey
|
|
|
bdea17a |
|
|
|
3fb603a |
# Spool directory.
|
|
|
485605b |
mkdir -p %{buildroot}%{_localstatedir}/spool/postfix/postgrey
|
|
|
bdea17a |
|
|
|
3fb603a |
# Systemd service.
|
|
|
485605b |
install -pDm0644 %{SOURCE1} \
|
|
|
497f8ed |
%{buildroot}%{_unitdir}/postgrey.service
|
|
|
497f8ed |
|
|
|
3fb603a |
# Sysconfig file.
|
|
|
485605b |
install -pDm0644 %{SOURCE3} \
|
|
|
497f8ed |
%{buildroot}%{_sysconfdir}/sysconfig/postgrey
|
|
|
bdea17a |
|
|
|
3fb603a |
# Manpage.
|
|
|
485605b |
install -pDm0644 postgrey.8 \
|
|
|
bdea17a |
%{buildroot}%{_mandir}/man8/postgrey.8
|
|
|
bdea17a |
|
|
|
3fb603a |
# Optional report script.
|
|
|
485605b |
install -pDm0755 contrib/postgreyreport \
|
|
|
bdea17a |
%{buildroot}%{_sbindir}/postgreyreport
|
|
|
bdea17a |
|
|
|
bdea17a |
%pre
|
|
|
0f06bbc |
getent group postgrey >/dev/null || groupadd -r postgrey
|
|
|
0f06bbc |
getent passwd postgrey >/dev/null || \
|
|
|
0f06bbc |
useradd -r -g postgrey -d %{_localstatedir}/spool/postfix/postgrey -s /sbin/nologin \
|
|
|
0f06bbc |
-c "Postfix Greylisting Service" postgrey
|
|
|
0f06bbc |
exit 0
|
|
|
bdea17a |
|
|
|
bdea17a |
%post
|
|
|
485605b |
%systemd_post postgrey.service
|
|
|
bdea17a |
|
|
|
bdea17a |
%preun
|
|
|
485605b |
%systemd_preun postgrey.service
|
|
|
bdea17a |
|
|
|
bdea17a |
%postun
|
|
|
485605b |
%systemd_postun postgrey.service
|
|
|
bdea17a |
|
|
|
497f8ed |
%triggerun -- postgrey < 1.34-3
|
|
|
497f8ed |
# Save the current service runlevel info
|
|
|
497f8ed |
# User must manually run systemd-sysv-convert --apply postgrey
|
|
|
497f8ed |
# to migrate them to systemd targets
|
|
|
497f8ed |
/usr/bin/systemd-sysv-convert --save postgrey >/dev/null 2>&1 ||:
|
|
|
497f8ed |
|
|
|
497f8ed |
# Run these because the SysV package being removed won't do them
|
|
|
497f8ed |
/sbin/chkconfig --del postgrey >/dev/null 2>&1 || :
|
|
|
497f8ed |
/bin/systemctl try-restart postgrey.service >/dev/null 2>&1 || :
|
|
|
bdea17a |
|
|
|
bdea17a |
%files
|
|
|
3fb603a |
%doc Changes README README.exim README.Fedora
|
|
|
3fb603a |
%license COPYING
|
|
|
497f8ed |
%{_unitdir}/postgrey.service
|
|
|
497f8ed |
%{_sysconfdir}/sysconfig/postgrey
|
|
|
bdea17a |
%config(noreplace) %{confdir}/postgrey_whitelist_clients
|
|
|
bdea17a |
%config(noreplace) %{confdir}/postgrey_whitelist_recipients
|
|
|
bdea17a |
%config(noreplace) %{confdir}/postgrey_whitelist_clients.local
|
|
|
bdea17a |
%{_sbindir}/postgrey
|
|
|
bdea17a |
%{_sbindir}/postgreyreport
|
|
|
bdea17a |
%{_mandir}/man8/postgrey.8*
|
|
|
485605b |
%dir %attr(0751,postgrey,postfix) %{_localstatedir}/spool/postfix/postgrey/
|
|
|
bdea17a |
|
|
|
bdea17a |
%changelog
|
|
|
5244789 |
* Thu Jan 30 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.37-10
|
|
|
5244789 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
|
|
5244789 |
|
|
|
e1dab6a |
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.37-9
|
|
|
e1dab6a |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
|
|
e1dab6a |
|
|
|
c27042c |
* Thu May 30 2019 Jitka Plesnikova <jplesnik@redhat.com> - 1.37-8
|
|
|
c27042c |
- Perl 5.30 rebuild
|
|
|
c27042c |
|
|
|
26c6b88 |
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 1.37-7
|
|
|
26c6b88 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
|
|
26c6b88 |
|
|
|
11e8974 |
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.37-6
|
|
|
11e8974 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
|
|
11e8974 |
|
|
|
c002ba8 |
* Thu Jun 28 2018 Jitka Plesnikova <jplesnik@redhat.com> - 1.37-5
|
|
|
c002ba8 |
- Perl 5.28 rebuild
|
|
|
c002ba8 |
|
|
|
ce7c400 |
* Fri Feb 09 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.37-4
|
|
|
ce7c400 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
|
|
ce7c400 |
|
|
|
5176718 |
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.37-3
|
|
|
5176718 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
|
|
|
5176718 |
|
|
|
c3989a7 |
* Sun Jun 04 2017 Jitka Plesnikova <jplesnik@redhat.com> - 1.37-2
|
|
|
c3989a7 |
- Perl 5.26 rebuild
|
|
|
c3989a7 |
|
|
|
4255164 |
* Sat Mar 11 2017 Nils Philippsen <nils@tiptoe.de> - 1.37-1
|
|
|
4255164 |
- version 1.37
|
|
|
82ec588 |
- fix syntax error in sysconfig file (#1292066)
|
|
|
4255164 |
|
|
|
377a0ea |
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.36-5
|
|
|
377a0ea |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
|
|
377a0ea |
|
|
|
c0da8e3 |
* Sun May 15 2016 Jitka Plesnikova <jplesnik@redhat.com> - 1.36-4
|
|
|
c0da8e3 |
- Perl 5.24 rebuild
|
|
|
c0da8e3 |
|
|
|
44dceb6 |
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.36-3
|
|
|
44dceb6 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
|
|
|
44dceb6 |
|
|
|
071fbab |
* Thu Nov 26 2015 Petr Pisar <ppisar@redhat.com> - 1.36-2
|
|
|
071fbab |
- Rebuild against fixed "file" tool that broke Perl dependencies (bug #1279401)
|
|
|
071fbab |
|
|
|
3fb603a |
* Fri Sep 04 2015 Christopher Meng <rpm@cicku.me> - 1.36-1
|
|
|
3fb603a |
- Update to 1.36 (1.35 skipped)
|
|
|
3fb603a |
- Refine release section of postgrey manpage.
|
|
|
3fb603a |
- Refine configuration instructions.
|
|
|
3fb603a |
|
|
|
59ad8f7 |
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.34-17
|
|
|
59ad8f7 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
|
|
|
59ad8f7 |
|
|
|
4a542da |
* Wed Jun 03 2015 Jitka Plesnikova <jplesnik@redhat.com> - 1.34-16
|
|
|
4a542da |
- Perl 5.22 rebuild
|
|
|
4a542da |
|
|
|
55eeb05 |
* Fri Nov 07 2014 Petr Pisar <ppisar@redhat.com> - 1.34-15
|
|
|
55eeb05 |
- Build-require perl-podlators for pod2man (bug #1161477)
|
|
|
55eeb05 |
|
|
|
5f0dc7c |
* Wed Aug 27 2014 Jitka Plesnikova <jplesnik@redhat.com> - 1.34-14
|
|
|
5f0dc7c |
- Perl 5.20 rebuild
|
|
|
5f0dc7c |
|
|
|
049e281 |
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.34-13
|
|
|
049e281 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
|
|
|
049e281 |
|
|
|
eb9dea0 |
* Thu Feb 06 2014 Christopher Meng <rpm@cicku.me> - 1.34-12
|
|
|
eb9dea0 |
- Correct the syntax of systemd unit to support option with space-separated content.
|
|
|
eb9dea0 |
|
|
|
a1f3cd6 |
* Tue Jan 21 2014 Christopher Meng <rpm@cicku.me> - 1.34-11
|
|
|
e5c95f4 |
- Let perl magic determine the dependencies.
|
|
|
a1f3cd6 |
- Fix systemd unit typo.
|
|
|
a1f3cd6 |
|
|
|
b1e53fb |
* Tue Jan 14 2014 Christopher Meng <rpm@cicku.me> - 1.34-10
|
|
|
b1e53fb |
- Fix typo in the SPEC.
|
|
|
b1e53fb |
|
|
|
961f402 |
* Sun Jan 12 2014 Christopher Meng <rpm@cicku.me> - 1.34-9
|
|
|
0f06bbc |
- Update systemd service unit to be more powerful.
|
|
|
0f06bbc |
- SPEC cleanup(BZ#850279).
|
|
|
961f402 |
- Add missing dependencies(BZ#1039355).
|
|
|
0f06bbc |
|
|
|
988dc76 |
* Wed Jan 01 2014 Nils Philippsen <nils@redhat.com> - 1.34-8
|
|
|
988dc76 |
- make postgrey work with perl 5.18 (#1039551)
|
|
|
988dc76 |
|
|
|
48ced5b |
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.34-7
|
|
|
48ced5b |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
|
|
|
48ced5b |
|
|
|
23dccba |
* Wed Jul 17 2013 Petr Pisar <ppisar@redhat.com> - 1.34-6
|
|
|
23dccba |
- Perl 5.18 rebuild
|
|
|
6fdee00 |
- Build-require systemd-units
|
|
|
23dccba |
|
|
|
2ccdaf2 |
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.34-5
|
|
|
2ccdaf2 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
|
|
|
2ccdaf2 |
|
|
|
0c374a1 |
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.34-4
|
|
|
0c374a1 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
|
|
|
0c374a1 |
|
|
|
497f8ed |
* Tue Mar 20 2012 Jon Ciesla <limburgher@gmail.com> - 1.34-3
|
|
|
497f8ed |
- Migrate to systemd, BZ 714430.
|
|
|
497f8ed |
|
|
|
5eda692 |
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.34-2
|
|
|
5eda692 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
|
|
|
5eda692 |
|
|
Matthias Saou |
ba10f11 |
* Tue Jun 7 2011 Matthias Saou <http://freshrpms.net/> 1.34-1
|
|
Matthias Saou |
ba10f11 |
- Update to 1.34.
|
|
Matthias Saou |
ba10f11 |
|
|
|
998bf37 |
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.32-3
|
|
|
998bf37 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
|
|
|
998bf37 |
|
|
|
8fce753 |
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.32-2
|
|
|
8fce753 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
|
|
|
8fce753 |
|
|
|
418b70b |
* Sun Apr 12 2009 Matthias Saou <http://freshrpms.net/> 1.32-1
|
|
|
418b70b |
- Update to 1.32.
|
|
|
418b70b |
- Update init script to the new style.
|
|
|
418b70b |
- Slightly update README-rpm instructions.
|
|
|
418b70b |
|
|
|
418b70b |
* Thu Feb 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org>
|
|
|
be27b50 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
|
|
|
be27b50 |
|
|
|
28d1c5e |
* Thu May 22 2008 Matthias Saou <http://freshrpms.net/> 1.31-1
|
|
|
28d1c5e |
- Update to 1.31.
|
|
|
28d1c5e |
|
|
|
5fc9e95 |
* Mon Aug 6 2007 Matthias Saou <http://freshrpms.net/> 1.30-1
|
|
|
5fc9e95 |
- Update to 1.30.
|
|
|
5fc9e95 |
- Update License field.
|
|
|
5fc9e95 |
|
|
|
8757676 |
* Fri Jun 22 2007 Matthias Saou <http://freshrpms.net/> 1.28-1
|
|
|
8757676 |
- Update to 1.28.
|
|
|
8757676 |
- Update URL to the new homepage.
|
|
|
8757676 |
|
|
|
bdea17a |
* Mon Feb 12 2007 Matthias Saou <http://freshrpms.net/> 1.27-4
|
|
|
bdea17a |
- Silence %%setup.
|
|
|
bdea17a |
- Fix init script mode in the srpm.
|
|
|
bdea17a |
- Remove explicit perl(IO::Multiplex) requirement, not needed on FC6 (but
|
|
|
bdea17a |
probably still on RHEL4).
|
|
|
bdea17a |
- Add a comment line to the empty local whitelist file.
|
|
|
bdea17a |
|
|
|
bdea17a |
* Mon Dec 4 2006 Matthias Saou <http://freshrpms.net/> 1.27-3
|
|
|
bdea17a |
- Add man page generation (Mike Wohlgemuth).
|
|
|
bdea17a |
|
|
|
bdea17a |
* Fri Dec 1 2006 Matthias Saou <http://freshrpms.net/> 1.27-2
|
|
|
bdea17a |
- Include postgreyreport script.
|
|
|
bdea17a |
|
|
|
bdea17a |
* Mon Nov 6 2006 Matthias Saou <http://freshrpms.net/> 1.27-1
|
|
|
bdea17a |
- Spec file cleanup.
|
|
|
bdea17a |
|
|
|
bdea17a |
* Wed Jan 18 2006 Levente Farkas <lfarkas@lfarkas.org> 1.24
|
|
|
bdea17a |
- some minor changes thanks to Peter Bieringer <pb@bieringer.de>
|
|
|
bdea17a |
|
|
|
bdea17a |
* Mon Jan 16 2006 Levente Farkas <lfarkas@lfarkas.org> 1.24
|
|
|
bdea17a |
- upgrade to 1.24
|
|
|
bdea17a |
|
|
|
bdea17a |
* Sun Nov 13 2005 Levente Farkas <lfarkas@lfarkas.org> 1.22
|
|
|
bdea17a |
- upgrade to 1.22
|
|
|
bdea17a |
|
|
|
bdea17a |
* Mon Aug 22 2005 Levente Farkas <lfarkas@lfarkas.org> 1.21
|
|
|
bdea17a |
- spec file update from Luigi Iotti <luigi@iotti.biz>
|
|
|
bdea17a |
|
|
|
bdea17a |
* Thu Apr 28 2005 Levente Farkas <lfarkas@lfarkas.org> 1.21
|
|
|
bdea17a |
- update to 1.21
|
|
|
bdea17a |
|
|
|
bdea17a |
* Tue Mar 8 2005 Levente Farkas <lfarkas@lfarkas.org> 1.18
|
|
|
bdea17a |
- update to 1.18
|
|
|
bdea17a |
|
|
|
bdea17a |
* Tue Dec 14 2004 Levente Farkas <lfarkas@lfarkas.org> 1.17
|
|
|
bdea17a |
- update to 1.17
|
|
|
bdea17a |
|
|
|
bdea17a |
* Wed Jul 14 2004 Levente Farkas <lfarkas@lfarkas.org> 1.14
|
|
|
bdea17a |
- guard the pre and post scripts
|
|
|
bdea17a |
|
|
|
bdea17a |
* Wed Jul 7 2004 Levente Farkas <lfarkas@lfarkas.org> 1.13
|
|
|
bdea17a |
- initial release 1.13
|
|
|
bdea17a |
|