dbb15f4
# Note: this unit file runs spamass-milter as the unprivileged user sa-milt,
dbb15f4
# which is not compatible with the milter's -x option for performing
dbb15f4
# virtusertable and alias expansion. If you are not using the -x option,
dbb15f4
# there is no need for the milter to run as root and it is best not to do so.
dbb15f4
# However, if you are using the -x option, you will need to run the milter as
dbb15f4
# root and should use the spamass-milter-root.service unit instead of this one.
dbb15f4
dbb15f4
[Unit]
dbb15f4
Description = Mail filter for SpamAssassin
dbb15f4
Wants = spamassassin.service
dbb15f4
After = syslog.target
dbb15f4
After = local-fs.target
dbb15f4
After = network.target
dbb15f4
After = spamassassin.service
dbb15f4
Before = sendmail.service
dbb15f4
Before = postfix.service
dbb15f4
Conflicts = spamass-milter-root.service
dbb15f4
dbb15f4
[Service]
dbb15f4
Type = simple
dbb15f4
UMask = 0022
dbb15f4
Environment = SOCKET=/run/spamass-milter/spamass-milter.sock SOCKET_OPTIONS= EXTRA_FLAGS=
dbb15f4
EnvironmentFile = -/etc/sysconfig/spamass-milter
dbb15f4
EnvironmentFile = -/etc/sysconfig/spamass-milter-postfix
dbb15f4
User = sa-milt
dbb15f4
ExecStart = /usr/sbin/spamass-milter $SOCKET_OPTIONS -p $SOCKET $EXTRA_FLAGS
dbb15f4
dbb15f4
[Install]
dbb15f4
WantedBy = multi-user.target