#!/bin/sh

# This is a small wrapper around spamass-milter which exec
# spamass-milter with the appropriate options so it can be executed by
# systemd.

# In the future, it would be awesome if someone rewrote spamass-milter
# to do socket activitation (which probably means using less of
# libmilter than it currently uses) so this entire bodge can go away.

# This will also have the advantage of making
# spamass-milter_execpre.sh go away too.

set -e

# This sets some reasonable default variables based on which mail
# system is present, and then reads /etc/default/spamass-milter to
# override those defaults.
. /usr/lib/spamass-milter/default_variables.sh

exec "$DAEMON" -P "$PIDFILE" -p "$SOCKET" -g "$SOCKETGROUP" $OPTIONS
