]> git.donarmstrong.com Git - deb_pkgs/spamass-milter.git/commitdiff
* Use dirname instead of basename (closes: #391909)
authordon <don@8f7917da-ec0b-0410-a553-b9b0e350d17e>
Fri, 13 Oct 2006 07:20:56 +0000 (07:20 +0000)
committerdon <don@8f7917da-ec0b-0410-a553-b9b0e350d17e>
Fri, 13 Oct 2006 07:20:56 +0000 (07:20 +0000)
  * Provide example of postfix socket location, and add runas option to
    change the user that spamassmilter runs as. (closes: #391789)

debian/changelog
debian/spamass-milter.default
debian/spamass-milter.init

index 993b8f2819f691f64d4bb2a03faa5c1ddb3ceae7..8e7fe6cdcbe21d64e724b2b08e509d55acf99abb 100644 (file)
@@ -1,3 +1,11 @@
+spamass-milter (0.3.1-3) unstable; urgency=low
+
+  * Use dirname instead of basename (closes: #391909)
+  * Provide example of postfix socket location, and add runas option to
+    change the user that spamassmilter runs as. (closes: #391789)
+
+ -- Don Armstrong <don@debian.org>  Fri, 13 Oct 2006 00:20:32 -0700
+
 spamass-milter (0.3.1-2) unstable; urgency=low
 
   * Create /var/run/sendmail if it doesn't already exist to allow for
index dad54582a57c7bdc6a459fa2a9a4fd885c542a7b..c4cd67cb4b4cd35dfdb733072c11aab784a0dd57 100644 (file)
@@ -12,3 +12,7 @@ OPTIONS="-u nobody -i 127.0.0.1"
 
 # 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
index 98647d9cfafb2bdff0788f406a6c1f2b0ae4413a..037091c08a039005e7e9bb15f0a8aea2cbc3f0e8 100644 (file)
@@ -39,6 +39,8 @@ DESC="Sendmail milter plugin for SpamAssassin"
 
 DEFAULT=/etc/default/spamass-milter
 OPTIONS=""
+RUNAS=""
+CHUID=""
 
 test -x $DAEMON || exit 0
 
@@ -46,16 +48,20 @@ if [ -r $DEFAULT ]; then
     . $DEFAULT;
 fi;
 
+if [ -n $RUNAS ]; then
+    CHUID="--chuid $RUNAS";
+fi;
+
 set -e
 
 case "$1" in
   start)
        echo -n "Starting $DESC: "
 
-       if [ ! -d $(basename $SOCKET) ]; then
-           mkdir -p $(basename $SOCKET);
+       if [ ! -d $(dirname $SOCKET) ]; then
+           mkdir -p $(dirname $SOCKET);
        fi;
-       start-stop-daemon --start -p $PIDFILE --exec $DAEMON -- -P $PIDFILE -f -p $SOCKET $OPTIONS
+       start-stop-daemon --start -p $PIDFILE $CHUID --exec $DAEMON -- -P $PIDFILE -f -p $SOCKET $OPTIONS
 
        echo "${DAEMON}"
        ;;