Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 2 Aug 2004 20:10:19 -0700
From:      Gregory Neil Shapiro <gshapiro@freebsd.org>
To:        freebsd-current@freebsd.org
Subject:   Please test /etc/rc.d/sendmail patch
Message-ID:  <20040803031019.GN32424@horsey.gshapiro.net>

next in thread | raw e-mail | index | archive | help
It turns out /etc/rc.d/sendmail has been broken for quite a while.
Nobody really noticed until the sendmail 8.13 import because older
versions let multiple daemons on different sockets run.  The patch
below fixes the problem and restores the old, correct behavior. It
also removes the map rebuild code because the code doesn't pay
attention to SENDMAIL_MAP_TYPE and may rebuild maps without the
admin being ready for the maps to be rebuilt (i.e., it should not
be automatic).

I would like to commit this ASAP so please test as soon as possible
and let me know how it goes.  Also, if there are any rcNG experts out
there, can someone tell me why "Starting sendmail" is only printed
if sendmail_enable=YES and not in the sedmail_submit_enable=YES or
sendmail_outbound_enable=YES cases (yet the daemons still get started
properly)?

--- etc/rc.d/sendmail	17 Apr 2004 19:09:09 -0000	1.11
+++ etc/rc.d/sendmail	3 Aug 2004 02:26:11 -0000
@@ -33,6 +33,17 @@
 	;;
 esac
 
+# If sendmail_enable=yes, don't need submit or outbound daemon
+if checkyesno sendmail_enable; then
+	sendmail_submit_enable="NO"
+	sendmail_outbound_enable="NO"
+fi
+
+# If sendmail_submit_enable=yes, don't need outbound daemon
+if checkyesno sendmail_submit_enable; then
+	sendmail_outbound_enable="NO"
+fi
+
 sendmail_precmd()
 {
 	# Die if there's pre-8.10 custom configuration file.  This check is
@@ -58,16 +69,6 @@
 	    "${name}: /etc/mail/aliases.db not present, generating"
 			/usr/bin/newaliases
 	fi
-
-	# check couple of common db files, too
-	for f in genericstable virtusertable domaintable mailertable; do
-		if [ -r "/etc/mail/$f" -a \
-		    "/etc/mail/$f" -nt "/etc/mail/$f.db" ]; then
-			echo \
-    "${name}: /etc/mail/$f newer than /etc/mail/$f.db, regenerating"
-			/usr/sbin/makemap hash /etc/mail/$f < /etc/mail/$f
-		fi
-	done
 }
 
 run_rc_command "$1"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040803031019.GN32424>