FS#36520 - [postgrey] - --greylist-text broken in postgrey.service since 1.34-11

Attached to Project: Community Packages
Opened by Jacob Joseph (jacobjjoseph.org) - Tuesday, 13 August 2013, 19:14 GMT
Last edited by Sergej Pupykin (sergej) - Thursday, 17 November 2016, 15:17 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Sergej Pupykin (sergej)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Since the disuse of /etc/conf.d/postgrey, the postgrey service has broken passing of the --greylist-text argument. The service file does:

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"

The %s is apparently expanded to "/bin/sh" by the service script, resulting in the process having the following arguments:

postgrey 7236 22.5 0.9 61848 16944 ? Ss 15:10 0:00 /usr/bin/postgrey --inet=127.0.0.1:10030 --pidfile=/run/postgrey/postgrey.pid --group=postgrey --user=postgrey --greylist-text="Greylisted for /bin/sh seconds"

I prefer the ability to pass other arguments (like --delay) from the config file anyway, so encourage us to go back to it. Was there a reason to get away from it?

~Jacob
This task depends upon

Closed by  Sergej Pupykin (sergej)
Thursday, 17 November 2016, 15:17 GMT
Reason for closing:  Fixed
Comment by Jacob Joseph (jacobjjoseph.org) - Tuesday, 13 August 2013, 19:18 GMT
This seems to be a recurrent problem. I reported a similar issue with the init script in  bug 29396 : https://bugs.archlinux.org/task/29396
Comment by Sergej Pupykin (sergej) - Wednesday, 14 August 2013, 08:44 GMT
%s changed to %%s. It should fix the problem.

Arch policy is copy .service into /etc/systemd/system and modify it as you want.
Comment by Jon Gjengset (Jonhoo) - Thursday, 18 February 2016, 18:47 GMT
  • Field changed: Percent Complete (100% → 0%)
This is now happening again with postgrey 1.36-2 and systemd 229-2, even though the service file uses %%s. That is, the log is printing "Greylisted for /bin/sh seconds".
Comment by Hermann Zahnweh (eigengrau) - Saturday, 27 February 2016, 19:09 GMT
Possible upstream-issue? I’ve noticed that when the multi-line ExecStart directive is squeezed onto a single line, the %% escape is expanded as expected. Maybe there’s an interaction between the template expansion and the newline-escaping?
Comment by Sergej Pupykin (sergej) - Thursday, 17 November 2016, 15:17 GMT
Should be fixed in

# pacman -Q systemd postgrey
systemd 231-4
postgrey 1.36-2

mail server reports:
Recipient address rejected: Greylisted for 300 seconds

Loading...