From 7582d597f83bc1e015c1717ca0e4b2300654b661 Mon Sep 17 00:00:00 2001 From: don Date: Tue, 2 Jan 2007 14:42:40 +0000 Subject: [PATCH] move the socket location around slightly and drop in a compatibility symlink --- debian/README.Debian | 6 +++--- debian/spamass-milter.init | 8 +++++++- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/debian/README.Debian b/debian/README.Debian index 7933fbb..b585751 100644 --- a/debian/README.Debian +++ b/debian/README.Debian @@ -11,7 +11,7 @@ something like: # spamassassin settings INPUT_MAIL_FILTER(`spamassassin', - `S=local:/var/run/sendmail/spamass.sock, F=, + `S=local:/var/run/spamass/spamass.sock, F=, T=S:4m;R:4m;E:10m')dnl Briefly, the F=, tells sendmail to just pass the connection through if @@ -42,7 +42,7 @@ You need to edit /etc/postfix/main.cf and configure smptpd_milters so that postfix connects to the spamass-milter socket. Something like: # spamass-milter configuration - smtpd_milters = unix:/var/run/postfix/spamass.sock + smtpd_milters = unix:/var/spool/postfix/spamass/spamass.sock should work. See http://www.postfix.org/MILTER_README.html or /usr/share/doc/postfix/MILTER_README.gz (in postfix-doc) for @@ -90,4 +90,4 @@ q and send the results along with your bug report using reportbug. - -- Don Armstrong , Fri, 13 Oct 2006 01:03:04 -0700 + -- Don Armstrong , Tue, 2 Jan 2007 06:40:24 -0800 diff --git a/debian/spamass-milter.init b/debian/spamass-milter.init index 63aea59..7993a97 100644 --- a/debian/spamass-milter.init +++ b/debian/spamass-milter.init @@ -33,7 +33,7 @@ PATH=/sbin:/bin:/usr/sbin:/usr/bin DAEMON=/usr/sbin/spamass-milter -SOCKET=/var/run/sendmail/spamass.sock +SOCKET=/var/run/spamass/spamass.sock PIDFILE=/var/run/spamass/spamass.pid DESC="Sendmail milter plugin for SpamAssassin" @@ -77,6 +77,12 @@ start() { chown "$RUNAS" $(dirname $PIDFILE); fi; fi; + # Drop in a compatibility symlink for the old sendmail socket location + if [ -d /var/run/sendmail ] && [ -n "$RUNAS" ] && + [ "$SOCKET" == "/var/run/spamass/spamass.sock" ] && + ! [ -e /var/run/sendmail/spamass.sock ]; then + ln $SOCKET /var/run/sendmail/spamass.sock; + fi; /bin/rm -f $SOCKET start-stop-daemon --start -p $PIDFILE $CHUID --exec $DAEMON -- -P $PIDFILE -f -p $SOCKET $OPTIONS if [ -n "$SOCKETMODE" ]; then -- 2.39.2