#935440 spf-milter-python fails to start.

#935440#5
Date:
2019-08-22 15:46:20 UTC
From:
To:
Dear Maintainer,

In the good-old-days, spf-milter-python was started by /etc/init.d/spf-milter-python which ensured that the /var/run/spf-milter-python directory existed.  Post-systemd, even calls to /etc/init.d/spf-milter-python directly are intercepted by /lib/lsb/init-functions and the systemd unit file doesn't create the directory automatically.  Also, the directory is no longer persistent across reboots.

Currently the default /lib/systemd/system/spf-milter-python contains:

[Unit]
Description=SPF Milter Python
Documentation=man:spfmilter(1)
After=network.target

[Service]
Type=simple

PIDFile=/var/run/spf-milter-python/spfmilter.pid
ExecStart=/usr/bin/spfmilter

[Install]
WantedBy=multi-user.target

And thus:
Aug 22 10:28:31 flamen systemd[1]: Started SPF Milter Python.
-- Subject: A start job for unit spf-milter-python.service has finished successfully
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- A start job for unit spf-milter-python.service has finished successfully.
--
-- The job identifier is 312.
Aug 22 10:28:31 flamen spfmilter[2054]: /usr/bin/spfmilter: 3: cannot create /var/run/spf-milter-python/spfmilter.pid: Directory non
Aug 22 10:28:32 flamen systemd[1]: spf-milter-python.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
-- Subject: Unit process exited
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- An ExecStart= process belonging to unit spf-milter-python.service has exited.
--
-- The process' exit code is 'exited' and its exit status is 2.
Aug 22 10:28:32 flamen systemd[1]: spf-milter-python.service: Failed with result 'exit-code'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- The unit spf-milter-python.service has entered the 'failed' state with result 'exit-code'.



This can and should be corrected by using the RuntimeDirectory directive as follows:

[Unit]
Description=SPF Milter Python
Documentation=man:spfmilter(1)
After=network.target

[Service]
Type=simple
User=spf-milter-python
Group=spf-milter-python
RuntimeDirectory=spf-milter-python

PIDFile=/run/spf-milter-python/spfmilter.pid
ExecStart=/usr/bin/spfmilter

[Install]
WantedBy=multi-user.target

#935440#10
Date:
2025-09-18 03:53:46 UTC
From:
To:
src:pymilter-milters was last released with Debian 10 (buster)
in July 2019 and has been removed from the Debian archive afterwards.
The binaries have been replaced by pyspf-milter and dkimpy-milter.
See https://bugs.debian.org/931567 for details on the removal.
After regular security support for buster ended in August 2022 and LTS
support ended in June 2024, I'm closing the remaining bug reports now.

Andreas