As part of bug 590346, I accidentally broke the systemd service file
by starting the service as spamd:spamd when it needs to bind to port
783. Even when the service is run in the foreground, it needs to be
started as root; it will then drop privileges if given the --username
and --groupname flags. The new service file gets this right, with
root owning the main process and spamd:spamd the children.
Thanks to Dan Goodliffe for the report and help debugging the issue.
Gentoo-Bug: 590346
Package-Manager: Portage-2.3.6, Repoman-2.3.1
After=network.target
[Service]
-ExecStart=/usr/sbin/spamd $SPAMD_OPTS
+ExecStart=/usr/sbin/spamd --username=spamd --groupname=spamd $SPAMD_OPTS
ExecReload=/bin/kill -HUP $MAINPID
-User=spamd
-Group=spamd
[Install]
WantedBy=multi-user.target
newinitd "${FILESDIR}/3.4.1-spamd.init-r1" spamd
newconfd "${FILESDIR}/3.4.1-spamd.conf" spamd
- systemd_newunit "${FILESDIR}/${PN}.service-r2" "${PN}.service"
+ systemd_newunit "${FILESDIR}/${PN}.service-r3" "${PN}.service"
systemd_install_serviced "${FILESDIR}/${PN}.service.conf-r1" \
"${PN}.service"