Package Details: postsrsd 2.0.10-1

Git Clone URL: https://aur.archlinux.org/postsrsd.git (read-only, click to copy)
Package Base: postsrsd
Description: Provides the Sender Rewriting Scheme (SRS) via TCP-based lookup tables for Postfix
Upstream URL: https://github.com/roehling/postsrsd
Licenses: GPL2
Submitter: fordprefect
Maintainer: fordprefect
Last Packager: fordprefect
Votes: 3
Popularity: 0.016412
First Submitted: 2016-03-30 16:15 (UTC)
Last Updated: 2024-07-23 08:33 (UTC)

Latest Comments

« First ‹ Previous 1 2 3 4 5 6 Next › Last »

fordprefect commented on 2022-01-05 11:59 (UTC)

@mezcal: Sorry, that slipped by. Fixed.

mezcal commented on 2022-01-05 11:47 (UTC) (edited on 2022-01-05 11:48 (UTC) by mezcal)

@fordprefect: Thank you. It is fixed now. It is only necessary to change md5sum for tmpfiles.d-postsrsd.conf in PKGBUILD. It should be bb1644c030c69054a9d083a6f1245d50

fordprefect commented on 2022-01-05 10:40 (UTC)

@mezcal: That was caused by a malformed config. I have pushed an update hopefully fixing this, can you try again?

mezcal commented on 2022-01-04 08:53 (UTC) (edited on 2022-01-04 08:53 (UTC) by mezcal)

Every installation when temporary files are creating I see this error meassage:

( 6/15) Creating temporary files...
/usr/lib/tmpfiles.d/postsrsd.conf:2: Unknown modifiers in command '/etc/postsrsd'
/usr/lib/tmpfiles.d/postsrsd.conf:3: Unknown modifiers in command '/etc/postsrsd/postsrsd.secret'

Does someone know what it means? How can I fix it?

fordprefect commented on 2021-10-15 10:16 (UTC)

Thanks, fixed that. That issue obviously does not come up upon testing on a system with previously installed deamon…

Asuranceturix commented on 2021-10-12 11:48 (UTC)

No problem, glad I could help. However, mind that the current version now does not autogenerate /etc/postsrsd/postsrsd.secret; you might want to put that bit back into the postsrsd.install, or tmpfiles won't have a file to set permissions to. :)

fordprefect commented on 2021-10-12 09:12 (UTC)

Thanks, Asuranceturix, for the hints on the fixes for the package. Sorry for the partial fix earlier, ignorance on my side, should not happen again.

Asuranceturix commented on 2021-10-08 15:31 (UTC) (edited on 2021-10-08 15:34 (UTC) by Asuranceturix)

As Jonhoo commented a while ago, the sysusers.d config file fails to give the new user the mail group; apparently the syntax to specify group names instead of group IDs should be, in this case, -:mail. At any rate, the install script tries to change the ownership of the config file before the user is created:

:: Processing package changes...
(1/1) installing postsrsd                                                                                                                      [########################################################################################] 100%
chown: invalid user: ‘postsrsd:root’
chown: invalid user: ‘postsrsd:root’
Don’t forget to set your domainname in /etc/postsrsd/postsrsd.conf
:: Running post-transaction hooks...
(1/3) Creating system user accounts...
Failed to parse UID: ‘mail’: Invalid argument
(2/3) Reloading system manager configuration...
(3/3) Arming ConditionNeedsUpdate...

Fortunately, systemd-tmpfiles can be used to adjust ownership and permissions after the user has been created. I don't know whether the config directory really needs to be owned by postsrsd, but I think this achieves the same intent of the current package:

diff --git a/PKGBUILD b/PKGBUILD
index 976bbe3..6e4cb8f 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -16,9 +16,11 @@ url="https://github.com/roehling/postsrsd"
 install=postsrsd.install
 license=(GPL2)
 source=("${pkgname}-${pkgver}.tar.gz::https://github.com/roehling/postsrsd/archive/${pkgver}.tar.gz"
-        "postsrsd.conf")
+        "sysusers.d-postsrsd.conf"
+        "tmpfiles.d-postsrsd.conf")
 md5sums=('5585ff7685ad5f0331ac6dde6304ca4b'
-         'dd002a74bd323a7ea315da4ef2df79dc')
+         'cee1be46359eb9b6a44d1fac3cbc718b'
+         '8fd5e7ac5bb0aab0c3fae995d21c8a10')


 check() {
   cd "$srcdir/postsrsd-$pkgver/build"
@@ -38,7 +40,8 @@ package() {
   cd "$srcdir/postsrsd-$pkgver/build"
   make DESTDIR="$pkgdir/" install

-  install -Dm644 "$srcdir/postsrsd.conf" "$pkgdir/usr/lib/sysusers.d/postsrsd.conf"
+  install -Dm644 "$srcdir/sysusers.d-postsrsd.conf" "$pkgdir/usr/lib/sysusers.d/postsrsd.conf"
+  install -Dm644 "$srcdir/tmpfiles.d-postsrsd.conf" "$pkgdir/usr/lib/tmpfiles.d/postsrsd.conf"

   #rm -rf $pkgdir/usr/lib
   mv "$pkgdir/usr/sbin" "$pkgdir/usr/bin"
diff --git a/postsrsd.install b/postsrsd.install
index e185b08..d933733 100644
--- a/postsrsd.install
+++ b/postsrsd.install
@@ -1,9 +1,4 @@
 post_install() {
-  #useradd -r -g mail -d / postsrsd
-  chown -R postsrsd:root etc/postsrsd
-
   [ -e /etc/postsrsd/postsrsd.secret ] || dd if=/dev/urandom bs=18 count=1 status=none | base64 > /etc/postsrsd/postsrsd.secret
-  chown postsrsd:root /etc/postsrsd/postsrsd.secret
-  chmod 400 /etc/postsrsd/postsrsd.secret
   echo  "Don't forget to set your domainname in /etc/postsrsd/postsrsd.conf"
 }
diff --git a/postsrsd.conf b/sysusers.d-postsrsd.conf
similarity index 65%
rename from postsrsd.conf
rename to sysusers.d-postsrsd.conf
index b4692ff..3afeab2 100644
--- a/postsrsd.conf
+++ b/sysusers.d-postsrsd.conf
@@ -1,2 +1,2 @@
 # Type Name     ID             GECOS                 Home directory Shell
-u postsrsd  mail    "Postsrsd user" 
+u postsrsd  -:mail    "Postsrsd user" 
diff --git a/tmpfiles.d-postsrsd.conf b/tmpfiles.d-postsrsd.conf
new file mode 100644
index 0000000..5bd3830
--- /dev/null
+++ b/tmpfiles.d-postsrsd.conf
@@ -0,0 +1,3 @@
+#Type Path                                     Mode User Group Age         Argument
+Z /etc/postsrsd - postsrsd root - -
+z /etc/postsrsd/postsrsd.secret 0400 postsrsd root - -

fordprefect commented on 2021-03-21 20:01 (UTC)

ALERT: Another security fix in 1.11.

fordprefect commented on 2020-12-12 12:27 (UTC)

ALERT: Security fix in 1.10. Update strongly advised.