Hello, I have attached a new patch which will solve the problem for the usage of milter-greylist with postfix (with a chrooted smtpd(8)).
-- A random quote: Wees braaf. En als dat niet lukt, dan maar voorzichtig.
--- milter-greylist.init 2011-07-20 20:16:20.517721477 +0200 +++ milter-greylist.init.new 2011-07-20 20:37:51.041226517 +0200 @@ -66,6 +66,11 @@ chmod 755 /var/run/$PNAME fi +SOCKET_DIR="$(dirname ${SOCKET})" +if [ ! -d ${SOCKET_DIR} ]; then + mkdir -p ${SOCKET_DIR} +fi + set -e case "$1" in @@ -73,6 +78,13 @@ echo -n "Starting $DESC: " start-stop-daemon --start --pidfile $PIDFILE --name $PNAME \ $NICE --oknodo --startas $DAEMON -- $OPTIONS $DOPTIONS + sleep 1 + if [ -n "$SOCKETMODE" ]; then + chmod $SOCKETMODE $SOCKET; + fi; + if [ -n "$SOCKETOWNER" ]; then + chown $SOCKETOWNER $SOCKET; + fi; echo "$NAME." ;; @@ -89,6 +101,13 @@ start-stop-daemon --start --pidfile $PIDFILE --name $PNAME \ $NICE --oknodo --startas $DAEMON -- $OPTIONS $DOPTIONS + sleep 1 + if [ -n "$SOCKETMODE" ]; then + chmod $SOCKETMODE $SOCKET; + fi; + if [ -n "$SOCKETOWNER" ]; then + chown $SOCKETOWNER $SOCKET; + fi; echo "$NAME." ;; @@ -107,6 +126,13 @@ start-stop-daemon --start --pidfile $PIDFILE --name $PNAME \ $NICE --oknodo --startas $DAEMON -- $OPTIONS $DOPTIONS + sleep 1 + if [ -n "$SOCKETMODE" ]; then + chmod $SOCKETMODE $SOCKET; + fi; + if [ -n "$SOCKETOWNER" ]; then + chown $SOCKETOWNER $SOCKET; + fi; echo "$NAME." ;; --- milter-greylist.default 2011-07-20 20:16:35.185728529 +0200 +++ milter-greylist.default.new 2011-07-20 20:36:46.949223578 +0200 @@ -14,3 +14,10 @@ # Other options # OPTIONS="" + +# To allow postfix smtpd to connect to socket, +# uncomment the following two lines +# SOCKET="/var/spool/postfix/milter-greylist/milter-greylist.sock" +# USER="greylist:postfix" +# SOCKETOWNER="greylist:postfix" +# SOCKETMODE="0660"