From dede31818538268c78498b3b9ba53f39049b08be Mon Sep 17 00:00:00 2001 From: don Date: Fri, 13 Oct 2006 23:16:10 +0000 Subject: [PATCH] auto detect postfix installs --- debian/spamass-milter.default | 11 ++++++++--- debian/spamass-milter.init | 8 ++++++++ 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/debian/spamass-milter.default b/debian/spamass-milter.default index 85cfd62..972cacd 100644 --- a/debian/spamass-milter.default +++ b/debian/spamass-milter.default @@ -13,7 +13,12 @@ OPTIONS="-u nobody -i 127.0.0.1" # Do not modify Subject:, Content-Type: or body. #OPTIONS="-m" -# If you are using postfix, you probably want to uncomment the following +###################################### +# If /usr/sbin/postfix is executable, the following are set by +# default. You can override them by uncommenting and changing them +# here. +###################################### # SOCKET="/var/spool/postfix/spamass/spamass.sock" -# RUNAS="postfix" -# PIDFILE="/var/spool/postfix/spamass/spamass.pid" \ No newline at end of file +# RUNAS="postfix:postfix" +# PIDFILE="/var/spool/postfix/spamass/spamass.pid" +###################################### \ No newline at end of file diff --git a/debian/spamass-milter.init b/debian/spamass-milter.init index deb05e6..5396f64 100644 --- a/debian/spamass-milter.init +++ b/debian/spamass-milter.init @@ -44,6 +44,14 @@ CHUID="" test -x $DAEMON || exit 0 +# If /usr/sbin/postfix exists, set up the defaults for a postfix install +# These can be overridden in /etc/default/spamass-milter +if [ -x /usr/sbin/posfix ]; then + SOCKET="/var/spool/postfix/spamass/spamass.sock" + RUNAS="postfix:postfix" + PIDFILE="/var/spool/postfix/spamass/spamass.pid" +fi; + if [ -r $DEFAULT ]; then . $DEFAULT; fi; -- 2.39.5