From owner-freebsd-current@FreeBSD.ORG Tue Aug 3 03:10:25 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 44D0816A4CE; Tue, 3 Aug 2004 03:10:25 +0000 (GMT) Received: from horsey.gshapiro.net (horsey.gshapiro.net [64.105.95.154]) by mx1.FreeBSD.org (Postfix) with ESMTP id 023FA43D67; Tue, 3 Aug 2004 03:10:25 +0000 (GMT) (envelope-from gshapiro@gshapiro.net) Received: from horsey.gshapiro.net (localhost [127.0.0.1]) i733AJQd060595 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 2 Aug 2004 20:10:19 -0700 (PDT) Received: (from gshapiro@localhost)i733AJcL060594; Mon, 2 Aug 2004 20:10:19 -0700 (PDT) Date: Mon, 2 Aug 2004 20:10:19 -0700 From: Gregory Neil Shapiro To: freebsd-current@freebsd.org Message-ID: <20040803031019.GN32424@horsey.gshapiro.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.6i Subject: Please test /etc/rc.d/sendmail patch X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Aug 2004 03:10:25 -0000 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"