[Mimedefang] MIMEDefang 2.62 is released

David F. Skoll dfs at roaringpenguin.com
Tue Apr 10 14:56:09 EDT 2007


Oliver Schulze L. wrote:

> No problem, here it is

Thanks... I have applied a modified patch.  Here it is for any Red Hat
users who want to test it:  Apply to redhat/mimedefang-init.in and then
rerun configure to build redhat/mimedefang-init

Regards,

David.


--- MIMEDefang/trunk/redhat/mimedefang-init.in	2007/02/19 20:10:26	14092
+++ MIMEDefang/trunk/redhat/mimedefang-init.in	2007/04/10 18:54:18	14777
@@ -22,128 +22,6 @@
 #               are based on those in the default (RedHat issued) sendmail
 #               script as /etc/rc.d/init.d/sendmail (80 30)
 #
-# Current Revision:
-#
-# $Source$
-# $Revision$
-# $Author$
-# $Date$
-#
-# Revision History:
-#
-# $Log$
-# Revision 1.13  2006/02/11 19:47:34  dfs
-# Add support for MX_HELO_CHECK config variable.
-#
-# Revision 1.12  2006/01/20 03:18:46  dfs
-# Updated init scripts to understand -R option to mimedefang.
-#
-# Revision 1.11  2004/10/28 20:31:21  dfs
-# Add MX_STATUS_UPDATES variable to shell script.
-#
-# Revision 1.10  2004/10/28 15:56:18  dfs
-# Fixed RH init script to always run ulimit -s
-#
-# Revision 1.9  2004/06/21 18:46:03  dfs
-# Add MX_MAP_SOCKET variable in init scripts.
-#
-# Revision 1.8  2004/06/08 02:18:08  dfs
-# Wait for daemons to exit.
-#
-# Revision 1.7  2004/03/30 21:33:33  dfs
-# Minor fixes.
-#
-# Revision 1.6  2004/03/30 21:32:19  dfs
-# Fixed typo.
-#
-# Revision 1.5  2004/03/30 21:25:34  dfs
-# Improved MIMEDefang init scripts.
-#
-# Revision 1.4  2004/02/23 16:43:23  dfs
-# Added MX_NOTIFIER option in sysconfig and init script.
-#
-# Revision 1.3  2003/11/10 15:52:56  dfs
-# Fixe for "echo -E" issue.
-#
-# Revision 1.2  2003/11/10 14:57:16  dfs
-# Added MX_EMBED_PERL parameter.
-#
-# Revision 1.1  2003/07/23 18:27:35  dfs
-# Made Red Hat files configurable.
-#
-# Revision 1.28  2003/07/23 18:13:52  dfs
-# Added MD_EXTRA setting.
-#
-# Revision 1.27  2003/07/01 21:33:50  dfs
-# Init scripts set locale to "C"
-#
-# Revision 1.26  2003/06/20 18:03:14  dfs
-# Added queue stuff to init scripts.
-#
-# Revision 1.25  2003/06/04 14:14:59  dfs
-# Fixed typo
-#
-# Revision 1.24  2003/06/04 14:03:33  dfs
-# Copy pid files into /var/run to keep Red Hat killproc() happy.
-#
-# Revision 1.23  2003/05/27 14:50:21  dfs
-# Default quarantine dir is /var/spool/MD-Quarantine
-# Removed support for non-multiplexor operation.
-#
-# Revision 1.22  2003/04/21 16:27:46  dfs
-# Added SYSLOG_FACILITY to init scripts.
-# Fixed typo.
-#
-# Revision 1.21  2003/03/05 15:30:28  dfs
-# Added -L option
-#
-# Revision 1.20  2002/12/03 17:44:47  dfs
-# Do "ulimit -s" if lots of slaves.
-#
-# Revision 1.19  2002/09/18 15:47:49  dfs
-# Updated init scripts for "-T" option.
-#
-# Revision 1.18  2002/06/13 14:58:28  dfs
-# Updated changelog.
-#
-# Revision 1.17  2002/06/11 13:36:10  dfs
-# Update scripts for recipient checks.
-#
-# Revision 1.16  2002/05/29 18:12:15  dfs
-# Put pid files and sockets in /var/spool/MIMEDefang instead of /var/run
-#
-# Revision 1.15  2002/05/17 12:49:42  dfs
-# Fixed typo.
-#
-# Revision 1.14  2002/05/17 12:48:34  dfs
-# Added reload as a synonym for reread.
-#
-# Revision 1.13  2002/05/15 13:39:02  dfs
-# Added README.NONROOT
-#
-# Revision 1.12  2002/05/15 13:08:43  dfs
-# Made init script use -U for mimedefang too.
-#
-# Revision 1.11  2002/05/15 12:55:02  dfs
-# Infrastructure for running multiplexor as non-root.
-#
-# Revision 1.10  2002/05/10 12:36:53  dfs
-# Changed MX_SLAVE_RATE to MX_SLAVE_DELAY; added MX_MIN_SLAVE_DELAY.
-#
-# Revision 1.9  2002/05/08 16:55:17  dfs
-# Updated redhat init scripts for subfilter.
-#
-# Revision 1.8  2002/05/06 18:36:08  dfs
-# Added MX_SLAVE_RATE to init scripts.
-#
-# Revision 1.7  2002/05/03 14:58:55  dfs
-# Fixed init script to look in /usr/bin and /usr/local/bin
-#
-# Revision 1.6  2002/05/03 14:24:24  dfs
-# Merge packaging patches.
-# Fixed typo.
-# Made default value for -n 10.
-#
 ##########################################################################
 
 # These comments are used by chkconfig and supporting programs
@@ -205,6 +83,13 @@
 	return $RETVAL
     fi
 
+    # Check mimedefang-filter syntax
+    configtest
+    RETVAL=$?
+    if [ $RETVAL != 0 ] ; then
+	return $RETVAL
+    fi
+
     echo -n "Starting $prog-multiplexor: "
     [ -e $MX_SOCKET ] && rm -f $MX_SOCKET
     # Tricky stuff below... "echo -E" won't work, hence the two-step.
@@ -273,6 +158,20 @@
     return $RETVAL
 }
 
+configtest () {
+    echo -n "Checking filter syntax: "
+    mimedefang.pl $([ -n "$SUBFILTER" ] && echo "-f $SUBFILTER") -test > @SPOOLDIR@/configtest.out 2>&1
+    if [ $? != 0 ] ; then
+	echo "FAILED."
+	echo ""
+	cat @SPOOLDIR@/configtest.out
+	return 1
+    fi
+    rm -f @SPOOLDIR@/configtest.out
+    echo "OK"
+    return 0
+}
+
 stop() {
 
     # If we're not running, there's nothing to do
@@ -331,31 +230,38 @@
 # See how we were called.
 case "$1" in
     start)
-    start
-    ;;
+	start
+	RETVAL=$?
+	;;
     stop)
-    stop $2
-    ;;
+	stop $2
+	RETVAL=$?
+	;;
     restart)
-    stop wait
-    start
-    RETVAL=$?
-    ;;
-    condrestart)
-    if [ -f /var/lock/subsys/$prog ]; then
 	stop wait
 	start
 	RETVAL=$?
-    fi
-    ;;
+	;;
+    condrestart)
+	if [ -f /var/lock/subsys/$prog ]; then
+	    stop wait
+	    start
+	    RETVAL=$?
+	fi
+	;;
     status)
-    status $prog
-    status $prog-multiplexor
-    RETVAL=$?
-    if [ $RETVAL = 0 -a -x $PROGDIR/md-mx-ctrl ] ; then
-	$PROGDIR/md-mx-ctrl -s $MX_SOCKET barstatus
-    fi
-    ;;
+	status $prog
+	status $prog-multiplexor
+	RETVAL=$?
+	if [ $RETVAL = 0 -a -x $PROGDIR/md-mx-ctrl ] ; then
+	    $PROGDIR/md-mx-ctrl -s $MX_SOCKET barstatus
+	fi
+	;;
+
+    configtest)
+	configtest
+	RETVAL=$?
+	;;
 
     reread|reload)
 	if [ -x $PROGDIR/md-mx-ctrl ] ; then
@@ -380,11 +286,11 @@
 		echo "Could not find process-ID of $prog-multiplexor"
 	    fi
 	fi
-    ;;
+	;;
 
     *)
-    echo "Usage: $0 {start|stop|restart|condrestart|reread|reload|status}"
-    exit 1
+	echo "Usage: $0 {start|stop|restart|condrestart|reread|reload|status|configtest}"
+	exit 1
 esac
 
 exit $RETVAL



More information about the MIMEDefang mailing list