public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Christopher Meng <i@cicku.me>
To: git-commits@fedoraproject.org
Subject: [rpms/postgrey] epel10.3: Update systemd unit files by adding 3 extra options and 1 new entry for documentation.
Date: Mon, 30 Nov 2026 12:53:23 GMT	[thread overview]
Message-ID: <179604320321.1.11768001546461569233.rpms-postgrey-0f06bbca1096@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : rpms/postgrey
            Branch : epel10.3
            Commit : 0f06bbca1096e9a8ab16cf42615f30663f86ffc9
            Author : Christopher Meng <i@cicku.me>
            Date   : 2014-01-13T00:32:52+08:00
            Stats  : +18/-14 in 3 file(s)
            URL    : https://src.fedoraproject.org/rpms/postgrey/c/0f06bbca1096e9a8ab16cf42615f30663f86ffc9?branch=epel10.3

            Log:
            Update systemd unit files by adding 3 extra options and 1 new entry for documentation.
SPEC cleanup, useradd operation is optimized.
Missing dependencies first try by perl magic R.
Delete tmpfiles commit since it's nonsense.

---
diff --git a/postgrey-tmpfiles.conf b/postgrey-tmpfiles.conf
deleted file mode 100644
index 19c61d1..0000000
--- a/postgrey-tmpfiles.conf
+++ /dev/null
@@ -1 +0,0 @@
-d /var/run/postgrey 0755 postgrey postgrey -

diff --git a/postgrey.service b/postgrey.service
index 4cb5ede..7dd3425 100644
--- a/postgrey.service
+++ b/postgrey.service
@@ -1,5 +1,6 @@
 [Unit]
 Description=Postfix Greylisting Service
+Documentation=man:postgrey(8)
 Before=postfix.service
 
 [Service]
@@ -13,11 +14,15 @@ PIDFile=/var/run/postgrey.pid
 ExecStart=/usr/sbin/postgrey \
  --unix=/var/spool/postfix/postgrey/socket \
  --pidfile=/var/run/postgrey.pid \
+ --group=postgrey \
+ --user=postgrey \
+ --greylist-text="Greylisted for %%s seconds"
  --daemonize \
  $POSTGREY_OPTS
 
 Restart=always
 RestartSec=1
+TimeoutSec=5
 
 [Install]
 WantedBy=multi-user.target

diff --git a/postgrey.spec b/postgrey.spec
index a615fad..5e140d1 100644
--- a/postgrey.spec
+++ b/postgrey.spec
@@ -2,7 +2,7 @@
 
 Name:              postgrey
 Version:           1.34
-Release:           8%{?dist}
+Release:           9%{?dist}
 # File headers only state "GNU GPL", but the LICENSE sections state v2 and "any
 # later version"
 Summary:           Postfix Greylisting Policy Server
@@ -12,13 +12,12 @@ Source0:           http://postgrey.schweikert.ch/pub/postgrey-%{version}.tar.gz
 Source1:           postgrey.service
 Source2:           README-rpm
 Source3:           postgrey.sysconfig
-Source4:           postgrey-tmpfiles.conf
 Patch0:            postgrey-1.28-group.patch
 Patch1:            postgrey-1.34-perl-5.18.patch
 BuildArch:         noarch
 BuildRequires:     systemd
-# We require postfix for its directories and gid
 Requires:          perl(:MODULE_COMPAT_%(eval "`perl -V:version`"; echo $version))
+# We require postfix for its directories and gid
 Requires:          postfix
 Requires(pre):     shadow-utils
 Requires(post):    systemd
@@ -26,9 +25,9 @@ Requires(preun):   systemd
 Requires(postun):  systemd
 
 %description
-Postgrey is a Postfix policy server implementing greylisting.  When a request
+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
+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.
@@ -77,13 +76,12 @@ install -pDm0644 postgrey.8 \
 install -pDm0755 contrib/postgreyreport \
     %{buildroot}%{_sbindir}/postgreyreport
 
-# Tmpfiles.d
-mkdir -p %{buildroot}%{_tmpfilesdir}
-install -m0644 %{SOURCE4} %{buildroot}%{_tmpfilesdir}/%{name}.conf
-
 %pre
-/usr/sbin/useradd -d %{_localstatedir}/spool/postfix/postgrey -s /sbin/nologin \
-    -M -r postgrey &>/dev/null || :
+getent group postgrey >/dev/null || groupadd -r postgrey
+getent passwd postgrey >/dev/null || \
+    useradd -r -g postgrey -d %{_localstatedir}/spool/postfix/postgrey -s /sbin/nologin \
+    -c "Postfix Greylisting Service" postgrey
+exit 0
 
 %post
 %systemd_post postgrey.service
@@ -107,8 +105,6 @@ install -m0644 %{SOURCE4} %{buildroot}%{_tmpfilesdir}/%{name}.conf
 %files
 %doc Changes COPYING README README-rpm
 %{_unitdir}/postgrey.service
-%{_tmpfilesdir}/postgrey.conf
-%{_localstatedir}/run/postgrey
 %{_sysconfdir}/sysconfig/postgrey
 %config(noreplace) %{confdir}/postgrey_whitelist_clients
 %config(noreplace) %{confdir}/postgrey_whitelist_recipients
@@ -119,6 +115,10 @@ install -m0644 %{SOURCE4} %{buildroot}%{_tmpfilesdir}/%{name}.conf
 %dir %attr(0751,postgrey,postfix) %{_localstatedir}/spool/postfix/postgrey/
 
 %changelog
+* Sat Jan 11 2014 Christopher Meng <rpm@cicku.me> - 1.34-9
+- Update systemd service unit to be more powerful.
+- SPEC cleanup(BZ#850279).
+
 * Wed Jan 01 2014 Nils Philippsen <nils@redhat.com> - 1.34-8
 - make postgrey work with perl 5.18 (#1039551)
 

                 reply	other threads:[~2026-11-30 12:53 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=179604320321.1.11768001546461569233.rpms-postgrey-0f06bbca1096@fedoraproject.org \
    --to=i@cicku.me \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox