From 09acb45c0d8c7f7558c124e5c43dc421564a0bff Mon Sep 17 00:00:00 2001 From: Tom Hendrikx Date: Fri, 13 Sep 2019 08:43:20 +0200 Subject: [PATCH] Add systemd service definition. --- init/smfspf.systemd | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 init/smfspf.systemd diff --git a/init/smfspf.systemd b/init/smfspf.systemd new file mode 100644 index 0000000..e6b5892 --- /dev/null +++ b/init/smfspf.systemd @@ -0,0 +1,16 @@ +[Unit] +Description=A lightweight, fast and reliable Sendmail milter that implements the Sender Policy Framework + +[Service] +Type=simple +User=nobody +PermissionsStartOnly=true +ExecStartPre=/bin/mkdir -p /var/run/smf-spf +ExecStartPre=/bin/chown nobody:nogroup /var/run/smf-spf +ExecStart=/usr/sbin/smf-spf -f -c /etc/smf-spf.conf +ExecStartPost=/bin/chmod 666 /var/run/smf-spf/smf-spf.sock +Restart=on-failure + +[Install] +WantedBy=multi-user.target +