# Do not modify Subject:, Content-Type: or body.
#OPTIONS="-m"
-# If you are using postfix, you may want to use the following
-# SOCKET="/var/spool/postfix/spamass.sock"
-# RUNAS="postfix"
\ No newline at end of file
+# If you are using postfix, you probably want to uncomment the following
+# SOCKET="/var/spool/postfix/spamass/spamass.sock"
+# RUNAS="postfix"
+# PIDFILE="/var/spool/postfix/spamass/spamass.pid"
\ No newline at end of file
if [ ! -d $(dirname $SOCKET) ]; then
mkdir -p $(dirname $SOCKET);
+ if [ -n "$RUNAS" ]; then
+ chown "$RUNAS" $(dirname $SOCKET);
+ fi;
+ fi;
+ if [ ! -d $(dirname $PIDFILE) ]; then
+ mkdir -p $(dirname $PIDFILE);
+ if [ -n "$RUNAS" ]; then
+ chown "$RUNAS" $(dirname $PIDFILE);
+ fi;
fi;
start-stop-daemon --start -p $PIDFILE $CHUID --exec $DAEMON -- -P $PIDFILE -f -p $SOCKET $OPTIONS