Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
FS#31860 - [postgrey] systemd postgrey.service is invalid
Attached to Project:
Community Packages
Opened by higuita (higuita) - Tuesday, 09 October 2012, 13:04 GMT
Last edited by Sergej Pupykin (sergej) - Thursday, 15 November 2012, 13:36 GMT
Opened by higuita (higuita) - Tuesday, 09 October 2012, 13:04 GMT
Last edited by Sergej Pupykin (sergej) - Thursday, 15 November 2012, 13:36 GMT
|
DetailsThe latest postgrey come with a broken postgrey.service, that fails with systemd.
Look like its trying to replace environment from /etc/conf.d/postgrey and i'm not familiar if/how it works, but at least the --$POSTGREY_ADDR is being build inside the /etc/rc.d/postgrey script and doesn't exists in /etc/conf.d/postgrey, so at least that part is broken. Also, by experimentation, i found that --$VAR doesn't work, but $VAR where $VAR="--option" is valid. I suggest that the POSTGREY_ADDR is added directly to the /etc/conf.d/postgrey for both types of connectors (unix and inet), we lose the dynamic config but at least is valid :) example: # inet #POSTGREY_ADDR="--inet=127.0.0.1:10030" # unix #POSTGREY_ADDR="--unix=/var/spool/postfix/private/postgrey" Also, the postgrey.service refers a $POSTGREY_BIN, that isnt defined anywhere (only in /etc/rc.d/postgrey), so it should be replaced with /usr/sbin/postgrey directly, as it will not change anyway. Several other variables ($GROUP, $USER, $PIDFILE) dont exists also and should be replaced with static values or added to the /etc/conf.d/postgrey Better yet, read this: https://github.com/mgorny/gentoo-systemd-units/wiki/Why-not-EnvironmentFile%3F and totally remove the /etc/conf.d/postgrey and patch/pressure upstream to support a config file. Version: postgrey-1.34-6 syslog error: ==> errors.log <== Oct 9 10:59:56 paquete systemd[1]: [/usr/lib/systemd/system/postgrey.service:10] Invalid executable path in command line, ignoring: $POSTGREY_BIN --daemonize --$POSTGREY_ADDR --group=$GROUP --user=$USER $POSTGREY_OPTS --pidfile=$PIDFILE --greylist-text="$POSTGREY_TEXT" systemd error: # systemctl status postgrey.service postgrey.service - Postfix Greylisting Service Loaded: error (Reason: Invalid argument) Active: inactive (dead) CGroup: name=systemd:/system/postgrey.service Steps to reproduce: 1- install postgrey on a systemd enabled system 2- watch the logs complain about wrong command for postgrey.service |
This task depends upon
To fix the postgrey.service needs to remove the --daemonize flag (so systemd takes care of service monitor and restart). Also, its needes to remove the hardcoded --inet=127.0.0.1:10030 flag with the $POSTGREY_ADDR variable
--daemonize removed