From owner-freebsd-current Mon Mar 25 23:58:35 2002 Delivered-To: freebsd-current@freebsd.org Received: from horsey.gshapiro.net (horsey.gshapiro.net [209.220.147.178]) by hub.freebsd.org (Postfix) with ESMTP id D533C37B416; Mon, 25 Mar 2002 23:58:24 -0800 (PST) Received: from horsey.gshapiro.net (gshapiro@localhost [IPv6:::1]) by horsey.gshapiro.net (8.12.3.Beta2/8.12.3.Beta2) with ESMTP id g2Q7wOGd015308 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO); Mon, 25 Mar 2002 23:58:24 -0800 (PST) Received: (from gshapiro@localhost) by horsey.gshapiro.net (8.12.3.Beta2/8.12.3.Beta2/Submit) id g2Q7wODq015305; Mon, 25 Mar 2002 23:58:24 -0800 (PST) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15520.10783.995435.407285@horsey.gshapiro.net> Date: Mon, 25 Mar 2002 23:58:23 -0800 From: Gregory Neil Shapiro To: freebsd-current@freebsd.org, freebsd-stable@freebsd.org Subject: For review: Revised sendmail startup settings X-Mailer: VM 7.00 under 21.1 (patch 14) "Cuyahoga Valley" XEmacs Lucid Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG An issue came up on freebsd-stable today regarding the boot-time startup of sendmail for users who are using other MTAs. The end result was that users needed a way to completely prevent sendmail from trying to start at boot time. The current order of operations at boot time is: # MTA if ${sendmail_enable} == YES start sendmail with ${sendmail_flags} else if ${sendmail_outbound_enable} == YES start sendmail with ${sendmail_outbound_flags} if ${sendmail_submit_enable} == YES start sendmail with ${sendmail_submit_flags} endif # MSP Queue Runner if [ -r /etc/mail/submit.cf] && ${sendmail_msp_queue_enable} == YES start sendmail with ${sendmail_msp_queue_flags} endif A few solutions were discussed and the patch represents what I feel to be the best solution. Instead of rc.conf's sendmail_enable only accepting YES or NO, it can now also accept NONE. If set to NONE, none of the other sendmail related startup items will be done. While creating the patch, I found an extra queue running daemon might be started that wasn't necessary (it didn't hurt anything but it wasn't needed). That has been fixed in the patch as well. Therefore, the new order of operations (as shown in the rc.conf man page and src/etc/defaults/rc.conf patches) is: # MTA if ${sendmail_enable} == NONE # Do nothing else if ${sendmail_enable} == YES start sendmail with ${sendmail_flags} else if ${sendmail_submit_enable} == YES start sendmail with ${sendmail_submit_flags} else if ${sendmail_outbound_enable} == YES start sendmail with ${sendmail_outbound_flags} endif # MSP Queue Runner if ${sendmail_enable} != NONE && [ -r /etc/mail/submit.cf] && ${sendmail_msp_queue_enable} == YES start sendmail with ${sendmail_msp_queue_flags} endif This will allow users to set sendmail_enable to NONE in /etc/rc.conf and completely avoid any sendmail daemons. I've also updated the /etc/mail/Makefile "start" target code to match the new order of operations and added a new set of targets for the MSP queue runner (start-mspq, stop-mspq, and restart-mspq). Unless I hear any good arguments against this change, I'll commit it in the next day or two (and MFC it a week later). The patches for the two branches are available at: FreeBSD 4.5-STABLE: http://people.freebsd.org/~gshapiro/smstart-STABLE FreeBSD 5.0-CURRENT: http://people.freebsd.org/~gshapiro/smstart-CURRENT Thanks go to Thomas Quinot and Christopher Schulte for their contributions to the idea and Mark Santcroos for reminding me to update /etc/mail/Makefile with the new startup routines. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message