From root@tim1.hosting.flyingcroc.net  Mon Oct  8 05:07:03 2001
Return-Path: <root@tim1.hosting.flyingcroc.net>
Received: from tim1.hosting.flyingcroc.net (tim1.hosting.flyingcroc.net [207.246.157.196])
	by hub.freebsd.org (Postfix) with ESMTP id 4F32837B406
	for <FreeBSD-gnats-submit@freebsd.org>; Mon,  8 Oct 2001 05:07:03 -0700 (PDT)
Received: by tim1.hosting.flyingcroc.net (Postfix, from userid 0)
	id 4122813D55; Mon,  8 Oct 2001 05:06:28 -0700 (PDT)
Message-Id: <20011008120628.4122813D55@tim1.hosting.flyingcroc.net>
Date: Mon,  8 Oct 2001 05:06:28 -0700 (PDT)
From: sean@chittenden.org
Reply-To: sean-freebsd-gnats@chittenden.org
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: /etc/rc doesn't allow you to specify a different sendmail daemon
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         31134
>Category:       conf
>Synopsis:       /etc/rc doesn't allow you to specify a different sendmail daemon
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon Oct 08 05:10:01 PDT 2001
>Closed-Date:    Wed Oct 10 00:30:43 PDT 2001
>Last-Modified:  Wed Oct 10 00:32:27 PDT 2001
>Originator:     Sean Chittenden
>Release:        FreeBSD 4.4-RELEASE i386
>Organization:
>Environment:
System: FreeBSD tim1.hosting.flyingcroc.net 4.4-RELEASE FreeBSD 4.4-RELEASE #0: Tue Sep 18 11:57:08 PDT 2001 murray@builder.FreeBSD.org:/usr/src/sys/compile/GENERIC i386


	
>Description:
	I use the postfix mailer instead of sendmail and would like to continue to
	use sendmail -bd as the way of starting postfix.  That said, /etc/rc and
	/etc/defaults/rc.conf need to be updated to include a sendmail_program
	variable.  /etc/rc also relies on /etc/mail/sendmail.cf to be present for
	sendmail to be enabled: this is not true for postfix and has been disabled.
>How-To-Repeat:
	
>Fix:
	
--- /etc/defaults/rc.conf.orig	Mon Oct  8 05:01:03 2001
+++ /etc/defaults/rc.conf	Mon Oct  8 05:02:04 2001
@@ -322,6 +322,7 @@
 usbd_flags=""		# Flags to usbd (if enabled).
 sendmail_enable="YES"	# Run the sendmail inbound daemon (or NO).
 sendmail_flags="-bd -q30m" # Flags to sendmail (as a server)
+sendmail_program="/usr/sbin/sendmail" # Which sendmail executable to run (if enabled).
 sendmail_outbound_enable="NO"	# Dequeue stuck mail (or YES).
 sendmail_outbound_flags="-q30m" # Flags to sendmail (outbound only)
 dumpdev="NO"		# Device name to crashdump to (or NO).


--- /etc/rc	Mon Oct  8 05:04:08 2001
+++ /etc/rc.orig	Mon Oct  8 05:00:20 2001
@@ -516,20 +516,22 @@
 	;;
 esac
 
-case ${sendmail_enable} in
-[Yy][Ee][Ss])
-	echo -n ' sendmail'
-	${sendmail_program} ${sendmail_flags}
-	;;
-*)
-	case ${sendmail_outbound_enable} in
+if [ -r /etc/mail/sendmail.cf ]; then
+	case ${sendmail_enable} in
 	[Yy][Ee][Ss])
 		echo -n ' sendmail'
-		${sendmail_program} ${sendmail_outbound_flags}
+		/usr/sbin/sendmail ${sendmail_flags}
+		;;
+	*)
+		case ${sendmail_outbound_enable} in
+		[Yy][Ee][Ss])
+			echo -n ' sendmail'
+			/usr/sbin/sendmail ${sendmail_outbound_flags}
+			;;
+		esac
 		;;
 	esac
-	;;
-esac
+fi
 
 echo '.'
 
>Release-Note:
>Audit-Trail:

From: Peter Pentchev <roam@ringlet.net>
To: sean-freebsd-gnats@chittenden.org
Cc: FreeBSD-gnats-submit@freebsd.org
Subject: Re: conf/31134: /etc/rc doesn't allow you to specify a different sendmail daemon
Date: Mon, 8 Oct 2001 15:16:32 +0300

 On Mon, Oct 08, 2001 at 05:06:28AM -0700, sean@chittenden.org wrote:
 > 
 > >Number:         31134
 > >Category:       conf
 > >Synopsis:       /etc/rc doesn't allow you to specify a different sendmail daemon
 > >Originator:     Sean Chittenden
 > >Release:        FreeBSD 4.4-RELEASE i386
 > >Organization:
 > >Environment:
 > System: FreeBSD tim1.hosting.flyingcroc.net 4.4-RELEASE FreeBSD 4.4-RELEASE #0: Tue Sep 18 11:57:08 PDT 2001 murray@builder.FreeBSD.org:/usr/src/sys/compile/GENERIC i386
 > 
 > 
 > 	
 > >Description:
 > 	I use the postfix mailer instead of sendmail and would like to continue to
 > 	use sendmail -bd as the way of starting postfix.  That said, /etc/rc and
 > 	/etc/defaults/rc.conf need to be updated to include a sendmail_program
 > 	variable.  /etc/rc also relies on /etc/mail/sendmail.cf to be present for
 > 	sendmail to be enabled: this is not true for postfix and has been disabled.
 
 The sendmail.cf part might be a real problem.  Specifying the program to run
 though is actually done via mailer.conf(5) - this is a greatly thought out
 way to ensure that all legacy applications may still invoke sendmail(8),
 newaliases(8), mailq and such, while mailwrapper(8) transparently runs
 the actual executable of your choice.
 
 So, just edit the /etc/mail/mailer.conf file and specify the appropriate
 program from the Postfix package to run instead of sendmail.
 
 The sendmail.cf thing might be a real issue, but I've never seen any harm
 in just leaving it there, and I've never actually removed it :)
 
 G'luck,
 Peter
 
 -- 
 This sentence every third, but it still comprehensible.

From: Dima Dorfman <dima@trit.org>
To: sean-freebsd-gnats@chittenden.org
Cc: FreeBSD-gnats-submit@freebsd.org
Subject: Re: conf/31134: /etc/rc doesn't allow you to specify a different sendmail daemon 
Date: Mon, 08 Oct 2001 05:19:22 -0700

 sean@chittenden.org wrote:
 > >Description:
 
 > 	I use the postfix mailer instead of sendmail and would like to
 > continue to use sendmail -bd as the way of starting postfix.  That
 > said, /etc/rc and /etc/defaults/rc.conf need to be updated to
 > include a sendmail_program variable.
 
 This is not the correct way to change MTAs.  See mailwrapper(8) and
 how the various MTA ports do it (e.g., ports/mail/postfix,
 post/mail/qmail).

From: Sean Chittenden <sean@chittenden.org>
To: Peter Pentchev <roam@ringlet.net>
Cc: FreeBSD-gnats-submit@freebsd.org
Subject: Re: conf/31134: /etc/rc doesn't allow you to specify a different sendmail daemon
Date: Mon, 8 Oct 2001 05:29:36 -0700

 > > >Description:
 > > 	I use the postfix mailer instead of sendmail and would like to continue to
 > > 	use sendmail -bd as the way of starting postfix.  That said, /etc/rc and
 > > 	/etc/defaults/rc.conf need to be updated to include a sendmail_program
 > > 	variable.  /etc/rc also relies on /etc/mail/sendmail.cf to be present for
 > > 	sendmail to be enabled: this is not true for postfix and has been disabled.
 > 
 > The sendmail.cf part might be a real problem.  Specifying the program to run
 > though is actually done via mailer.conf(5) - this is a greatly thought out
 > way to ensure that all legacy applications may still invoke sendmail(8),
 > newaliases(8), mailq and such, while mailwrapper(8) transparently runs
 > the actual executable of your choice.
 > 
 > So, just edit the /etc/mail/mailer.conf file and specify the appropriate
 > program from the Postfix package to run instead of sendmail.
 
 Howdy.  I've setup my mailer.conf but spaced on realizing it'd be in
 effect on the system's startup. If mailer.conf takes care of this for
 me, then groovy and feel free to close this PR.
 
 > The sendmail.cf thing might be a real issue, but I've never seen any harm
 > in just leaving it there, and I've never actually removed it :)
 
 I'm confused as to why it'd be an issue to remove the sendmail.cf, but 
 I'll have to take your word on it: sendmail hasn't been in my repretoir 
 for quite some time.  <:~)  Thanks.  -sc
 
 -- 
 Sean Chittenden

From: Peter Pentchev <roam@ringlet.net>
To: Sean Chittenden <sean@chittenden.org>
Cc: freebsd-gnats-submit@FreeBSD.org
Subject: Re: conf/31134: /etc/rc doesn't allow you to specify a different sendmail daemon
Date: Mon, 8 Oct 2001 15:47:41 +0300

 On Mon, Oct 08, 2001 at 05:30:02AM -0700, Sean Chittenden wrote:
 > The following reply was made to PR conf/31134; it has been noted by GNATS.
 > 
 > From: Sean Chittenden <sean@chittenden.org>
 > To: Peter Pentchev <roam@ringlet.net>
 > Cc: FreeBSD-gnats-submit@freebsd.org
 > Subject: Re: conf/31134: /etc/rc doesn't allow you to specify a different sendmail daemon
 > Date: Mon, 8 Oct 2001 05:29:36 -0700
 > 
 >  > > >Description:
 >  > > 	I use the postfix mailer instead of sendmail and would like to continue to
 >  > > 	use sendmail -bd as the way of starting postfix.  That said, /etc/rc and
 >  > > 	/etc/defaults/rc.conf need to be updated to include a sendmail_program
 >  > > 	variable.  /etc/rc also relies on /etc/mail/sendmail.cf to be present for
 >  > > 	sendmail to be enabled: this is not true for postfix and has been disabled.
 
 [snip]
 
 >  > The sendmail.cf thing might be a real issue, but I've never seen any harm
 >  > in just leaving it there, and I've never actually removed it :)
 >  
 >  I'm confused as to why it'd be an issue to remove the sendmail.cf, but 
 >  I'll have to take your word on it: sendmail hasn't been in my repretoir 
 >  for quite some time.  <:~)  Thanks.  -sc
 
 I meant that it could be an issue that /etc/rc relies on sendmail.cf;
 I did not mean that the system would fall over if sendmail.cf was not
 present.  All I meant was that, yes, /etc/rc still wants sendmail.cf to
 be there, even if you don't use it, but there's no harm in just leaving
 it there so /etc/rc is happy.
 
 G'luck,
 Peter
 
 -- 
 Hey, out there - is it *you* reading me, or is it someone else?
State-Changed-From-To: open->closed 
State-Changed-By: dougb 
State-Changed-When: Wed Oct 10 00:30:43 PDT 2001 
State-Changed-Why:  

As discussed, /etc/mail/mailer.conf provides this mechanism already. 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=31134 
>Unformatted:
