[Mimedefang] Bug in example init-script

Wesley Peters wpeters at stbernard.com
Thu Sep 27 10:45:53 EDT 2007


Does anyone else use the example init-script in 2.63?  I found the following
subtle, hard-to-track-down bug; note the missing trailing backtick:

--- examples/init-script.in.orig        Thu Aug  2 13:18:10 2007
+++ examples/init-script.in     Thu Sep 27 07:26:17 2007
@@ -243,7 +243,7 @@
        `[ "$MX_RECIPIENT_CHECK" = "yes" ] && echo "-t"` \
        `[ "$KEEP_FAILED_DIRECTORIES" = "yes" ] && echo "-k"` \
        `[ "$MD_EXTRA" != "" ] && echo $MD_EXTRA` \
-       `[ "$MD_SKIP_BAD_RCPTS" = "yes" ] && echo "-N" \
+       `[ "$MD_SKIP_BAD_RCPTS" = "yes" ] && echo "-N"` \
        `[ "$ALLOW_NEW_CONNECTIONS_TO_QUEUE" = "yes" ] && echo "-q"` \
        -p $SOCKET
     RETVAL=$?


The error message from the (FreeBSD) shell was completely nonsensical, it
said:

/usr/local/etc/rc.d/mimedefang.sh: 7: Syntax error: end of file unexpected
(expecting "fi")

-- 

Wes Peters                 Principal Engineer        St. Bernard Software




More information about the MIMEDefang mailing list