package created using the webbuild interface [release 1.37-1mamba;Wed Aug 14 2019]

This commit is contained in:
Silvan Calarco 2024-01-06 10:27:53 +01:00
parent 062c122b12
commit 1d2b9dc91f
4 changed files with 112 additions and 0 deletions

View File

@ -1,2 +1,4 @@
# postgrey
A Postfix policy server for greylisting.

18
postgrey.service Normal file
View File

@ -0,0 +1,18 @@
[Unit]
Description=Postfix Greylisting Service
Before=postfix.service
[Service]
Type=forking
PIDFile=/run/postgrey/postgrey.pid
ExecStart=/usr/bin/postgrey --inet=127.0.0.1:10030 \
--pidfile=/run/postgrey/postgrey.pid \
--group=postgrey --user=postgrey \
--daemonize \
--greylist-text="Greylisted for %%s seconds"
Restart=always
RestartSec=5
TimeoutSec=10
[Install]
WantedBy=multi-user.target

90
postgrey.spec Normal file
View File

@ -0,0 +1,90 @@
%define groupid 65060
%define userid 65060
Name: postgrey
Version: 1.37
Release: 1mamba
Summary: A Postfix policy server for greylisting
Group: System/Servers
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: https://www.howtoforge.com/greylisting_postfix_postgrey
Source: https://postgrey.schweikert.ch/pub/postgrey-%{version}.tar.gz
Source1: postgrey.service
Source2: postgrey.tmpfiles
License: GPL
## AUTOBUILDREQ-BEGIN
BuildRequires: libperl
BuildRequires: perl-BerkeleyDB
BuildRequires: perl-Net-DNS
BuildRequires: perl-Net-Server
BuildRequires: perl-NetAddr-IP
BuildRequires: perl-devel
## AUTOBUILDREQ-END
Requires: perl
Requires: perl-Net-Server
Requires: perl-IO-Multiplex
Requires: perl-Net-DNS
Requires: perl-NetAddr-IP
Requires: perl-BerkeleyDB
BuildRoot: %{_tmppath}/%{name}-%{version}-root
%description
A Postfix policy server for greylisting.
%prep
%setup -q
%build
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
install -D -m0755 postgrey %{buildroot}%{_bindir}/postgrey
install -D -m0644 %{SOURCE1} %{buildroot}%{_unitdir}/postgrey.service
install -D -m0644 %{SOURCE2} %{buildroot}%{_tmpfilesdir}/postgrey.conf
install -D -m0755 contrib/postgreyreport %{buildroot}%{_bindir}/postgreyreport
install -D -m0644 postgrey_whitelist_recipients %{buildroot}%{_sysconfdir}/postfix/postgrey_whitelist_recipients
install -D -m0644 postgrey_whitelist_clients %{buildroot}%{_sysconfdir}/postfix/postgrey_whitelist_clients
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%pre
/usr/sbin/groupadd postgrey -g %{groupid} 2>/dev/null
/usr/sbin/useradd -u %{userid} -c 'Postgrey user' -d /dev/null -g postgrey \
-s /bin/true postgrey 2>/dev/null
:
%preun
%systemd_preun postgrey
# erase
if [ $1 -eq 0 ]; then
/usr/sbin/userdel postgrey 2>/dev/null
/usr/sbin/groupdel postgrey 2>/dev/null
fi
:
%post
/sbin/ldconfig
%tmpfiles_create postgrey.conf
%systemd_post postgrey
:
%postun
/sbin/ldconfig
%systemd_postun_with_restart postgrey
:
%files
%defattr(-,root,root)
%config(noreplace) %{_sysconfdir}/postfix/postgrey_whitelist_clients
%config(noreplace) %{_sysconfdir}/postfix/postgrey_whitelist_recipients
%{_bindir}/postgrey
%{_bindir}/postgreyreport
%{_tmpfilesdir}/postgrey.conf
%{_unitdir}/postgrey.service
%doc COPYING
%changelog
* Wed Aug 14 2019 Silvan Calarco <silvan.calarco@mambasoft.it> 1.37-1mamba
- package created using the webbuild interface

2
postgrey.tmpfiles Normal file
View File

@ -0,0 +1,2 @@
d /var/spool/postfix/postgrey/ 0755 postgrey postgrey -
d /run/postgrey 0755 postgrey postgrey -