Gentoo doesn't provide systemd unit files for postfwd. Suggested file postfwd.service: [Unit] Description=Postfix firewall daemon [Service] Type=forking ExecStart=/usr/sbin/postfwd2 --shortlog --summary=600 --cache=600 --cache-rbl-timeout=3600 --cleanup-requests=1200 --cleanup-rbls=1800 --cleanup-rates=1200 --daemon --file=/etc/postfix/postfwd.cf --interface=127.0.0.1 --port=10040 --pidfile=/var/run/postfwd.pid --user=postfwd --group=postfwd ExecStop=/usr/sbin/postfwd2 --file=/etc/postfix/postfwd.cf --pidfile=/var/run/postfwd.pid --kill ExecReload=/usr/sbin/postfwd2 --file=/etc/postfix/postfwd.cf --pidfile=/var/run/postfwd.pid --reload [Install] WantedBy=multi-user.target Reproducible: Always
months are gone. What about this bug?
First of all sorry, for the really long delay. It's hard to believe, but I really did not have the time earlier. Concerning the bug, I have added the systemd support and the ebuild currently needs a review.
BUMP - another ~6 months gone now.
(In reply to Stefan G. Weichinger from comment #3) > BUMP - another ~6 months gone now. Well... are you willing to become a developer? :/ I understand your frustration... but this is all a collaborative project and we lack manpower... please don't get me wrong... but if you are willing to help, maybe you could try to jump the gap: https://www.gentoo.org/get-involved/become-developer/ I can help you with the quizzes and the training of course :), if you are willing to do that, please send an email Thanks
This looks similar to: https://projects.archlinux.org/svntogit/community.git/tree/trunk/service?h=packages/postfwd and, then, I guess all that values in the executable options are ok. The only question is the same as on the other bug report: do we need to run it in daemonized mode or can it be run in foreground? Thanks :)
(In reply to Pacho Ramos from comment #4) > (In reply to Stefan G. Weichinger from comment #3) > > BUMP - another ~6 months gone now. > > Well... are you willing to become a developer? :/ I understand your > frustration... but this is all a collaborative project and we lack > manpower... please don't get me wrong... but if you are willing to help, > maybe you could try to jump the gap: > https://www.gentoo.org/get-involved/become-developer/ > > I can help you with the quizzes and the training of course :), if you are > willing to do that, please send an email Don't get me wrong, I am not frustrated but I simply looked at the bugs I reported back then and want to help to close them. I send you a pm.
With Type=Simple I wasn't successful, postfwd spawns children ... What works for me right now: # cat /etc/systemd/system/postfwd.service [Unit] Description=Postfix firewall daemon [Service] Type=forking User=postfwd Group=postfwd ExecStart=/usr/sbin/postfwd2 --shortlog --summary=600 --cache=600 --cache-rbl-timeout=3600 --cleanup-requests=1200 --cleanup-rbls=1800 --cleanup-rates=1200 --file=/etc/postfix/postfwd.cf --interface=127.0.0.1 --port=10040 -g postfwd -u postfwd ExecStop=/usr/sbin/postfwd2 --file=/etc/postfix/postfwd.cf --kill ExecReload=/usr/sbin/postfwd2 --file=/etc/postfix/postfwd.cf --reload [Install] WantedBy=multi-user.target --> no environmentfile, no "--daemon", no PIDfile user/group ... I am unsure if it is correct or redundant to have it both as option in the ExecStart= and as User=,Group= will test changes now, just a first status
User=, Group= removed, works as well: # cat postfwd.service [Unit] Description=Postfix firewall daemon [Service] Type=forking ExecStart=/usr/sbin/postfwd2 --shortlog --summary=600 --cache=600 --cache-rbl-timeout=3600 --cleanup-requests=1200 --cleanup-rbls=1800 --cleanup-rates=1200 --file=/etc/postfix/postfwd.cf --interface=127.0.0.1 --port=10040 -g postfwd -u postfwd ExecStop=/usr/sbin/postfwd2 --file=/etc/postfix/postfwd.cf --kill ExecReload=/usr/sbin/postfwd2 --file=/etc/postfix/postfwd.cf --reload [Install] WantedBy=multi-user.target
And while I am at it, another suggestion that starts/stops/restarts fine here: # cat postfwd.service [Unit] Description=Postfix firewall daemon [Service] Type=forking ExecStart=/usr/sbin/postfwd2 $POSTFWD_OPTS ExecStop=/usr/sbin/postfwd2 $POSTFWD_OPTS --kill ExecReload=/usr/sbin/postfwd2 $POSTFWD_OPTS --reload [Install] WantedBy=multi-user.target # cat /etc/systemd/system/postfwd.service.d/00gentoo.conf [Service] Environment="POSTFWD_OPTS= --shortlog --summary=600 --cache=600 --cache-rbl-timeout=3600 --cleanup-requests=1200 --cleanup-rbls=1800 --cleanup-rates=1200 --file=/etc/postfix/postfwd.cf --interface=127.0.0.1 --port=10040 -g postfwd -u postfwd" -> all options in that one file, the service file reads the variable from there. So that file somehow works as config-file for the service. paths are now /etc ... for the final ebuild this will be /usr/lib/systemd/... you know.
Umm, it looks strange to me that Type=forking without appending "--daemon" will work as desired for all (I mean, stopping/restarting the service properly without leaving remaining processes, logging of errors that could be viewed with systemctl status...)... Rethinking on this I would stick with the unit file from Arch Linux: https://projects.archlinux.org/svntogit/community.git/plain/trunk/service?h=packages/postfwd Does it work ok for you? Thanks
The arch-unit you point is basically what I suggested in the beginning, right? I maybe even copied it from them.
Yes, I wanted to confirm it worked for you before committing ;)
Works for me on 2 servers for nearly a year (since I filed this bug). The version from comment 9 also works so far (applied it to one of my mailservers).
[master a11083a] mail-filter/postfwd: Install systemd unit file (#528034 by Stefan G. Weichinger) 2 files changed, 99 insertions(+) create mode 100644 mail-filter/postfwd/files/postfwd.service create mode 100644 mail-filter/postfwd/postfwd-1.35-r3.ebuild