description "Postfix Sender Rewriting Scheme daemon"
author "Timo Röhling <timo.roehling@gmx.de>"

start on (filesystem and net-device-up)
stop on runlevel [!2345]
respawn

script
	SRS_DOMAIN=`postconf -h mydomain || true`
	SRS_EXCLUDE_DOMAINS=
	. "@CONFIG_DIR@/@PROJECT_NAME@"
	exec @CMAKE_INSTALL_PREFIX@/sbin/@POSTSRSD@ -f "$SRS_FORWARD_PORT" -r "$SRS_REVERSE_PORT" -d "$SRS_DOMAIN" -s "$SRS_SECRET" -a "$SRS_SEPARATOR" -u "$RUN_AS" -c "$CHROOT" -X"$SRS_EXCLUDE_DOMAINS"
end script