From jin@eubie.lbl.gov  Mon Jun 17 15:00:36 2002
Return-Path: <jin@eubie.lbl.gov>
Received: from eubie.lbl.gov (eubie.lbl.gov [131.243.2.36])
	by hub.freebsd.org (Postfix) with ESMTP id 1F6E637B400
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 17 Jun 2002 15:00:32 -0700 (PDT)
Received: from eubie.lbl.gov (localhost [127.0.0.1])
	by eubie.lbl.gov (8.12.3/8.12.3) with ESMTP id g5HM0Vp5000353
	for <FreeBSD-gnats-submit@freebsd.org>; Mon, 17 Jun 2002 15:00:31 -0700 (PDT)
	(envelope-from jin@eubie.lbl.gov)
Received: (from root@localhost)
	by eubie.lbl.gov (8.12.3/8.12.3/Submit) id g5HM0VhO000352;
	Mon, 17 Jun 2002 15:00:31 -0700 (PDT)
Message-Id: <200206172200.g5HM0VhO000352@eubie.lbl.gov>
Date: Mon, 17 Jun 2002 15:00:31 -0700 (PDT)
From: Jin Guojun (DSD staff) <jin@eubie.lbl.gov>
Reply-To: j_guojun@lbl.gov
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: rc.sendmail syntax error: cannot disable sendmail
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         39444
>Category:       conf
>Synopsis:       rc.sendmail syntax error: cannot disable sendmail
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Mon Jun 17 15:10:01 PDT 2002
>Closed-Date:    Mon Jun 17 23:33:43 PDT 2002
>Last-Modified:  Tue Jun 18 16:50:01 PDT 2002
>Originator:     Jin Guojun (DSD staff)
>Release:        FreeBSD 4.6-RELEASE i386
>Organization:
>Environment:

	FreeBSD 4.6-RELEASE
>Description:

	/etc/defaults/rc.conf says:
sendmail_enable="YES"   # Run the sendmail inbound daemon (YES/NO/NONE).


	/etc/rc.sendmail does: (only working for NONE, but not NO)

	case ${sendmail_enable} in
        [Nn][Oo][Nn][Ee])


	The correct syntax is:

	case ${sendmail_enable} in
	[Nn][Oo][Nn][Ee] | [Nn][Oo])


If No/NO/no/nO cannot be used, please state so. But, this is not a usual way
to disable something.
So, please apply the patch to rc.sendmail.


>How-To-Repeat:
	
>Fix:

	


>Release-Note:
>Audit-Trail:

From: "Crist J. Clark" <crist.clark@attbi.com>
To: j_guojun@lbl.gov
Cc: FreeBSD-gnats-submit@FreeBSD.ORG
Subject: Re: conf/39444: rc.sendmail syntax error: cannot disable sendmail
Date: Mon, 17 Jun 2002 21:42:51 -0700

 On Mon, Jun 17, 2002 at 03:00:31PM -0700, Jin Guojun wrote:
 [snip]
 
 > 	/etc/defaults/rc.conf says:
 > sendmail_enable="YES"   # Run the sendmail inbound daemon (YES/NO/NONE).
 > 
 > 
 > 	/etc/rc.sendmail does: (only working for NONE, but not NO)
 > 
 > 	case ${sendmail_enable} in
 >         [Nn][Oo][Nn][Ee])
 > 
 > 
 > 	The correct syntax is:
 > 
 > 	case ${sendmail_enable} in
 > 	[Nn][Oo][Nn][Ee] | [Nn][Oo])
 > 
 > 
 > If No/NO/no/nO cannot be used, please state so. But, this is not a usual way
 > to disable something.
 > So, please apply the patch to rc.sendmail.
 
 "NO" _can_ be used. It's meaning is different than "NONE." "NO" means
 not to run the sendmail(8) listener, but the submitting and 'outbound'
 daemons can still be run.
 
 See rc.sendmail(8) for details. If you feel the documentation is
 lacking, please submit a new PR with your ideas for improvements, but
 the code works as desired.
 -- 
 Crist J. Clark                     |     cjclark@alum.mit.edu
                                    |     cjclark@jhu.edu
 http://people.freebsd.org/~cjc/    |     cjc@freebsd.org
State-Changed-From-To: open->closed 
State-Changed-By: dougb 
State-Changed-When: Mon Jun 17 23:32:49 PDT 2002 
State-Changed-Why:  

While it's not totally clear in the script, setting 
sendmail_enable to NONE will indeed prevent anything 
in that script from running. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=39444 

From: Makoto Matsushita <matusita@jp.FreeBSD.org>
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: conf/39444: rc.sendmail syntax error: cannot disable sendmail
Date: Tue, 18 Jun 2002 15:41:33 +0900

 dougb> While it's not totally clear in the script,
 
 But in rc.sendmail(8).
 
 -- -
 Makoto `MAR' Matsushita

From: "Jin Guojun[DSD]" <j_guojun@lbl.gov>
To: "Crist J. Clark" <cjc@FreeBSD.ORG>
Cc: FreeBSD-gnats-submit@FreeBSD.ORG, dougb@FreeBSD.ORG
Subject: Re: conf/39444: rc.sendmail syntax error: cannot disable sendmail
Date: Tue, 18 Jun 2002 15:28:22 -0700

 "Crist J. Clark" wrote:
 > 
 > On Mon, Jun 17, 2002 at 03:00:31PM -0700, Jin Guojun wrote:
 > [snip]
 > 
 > >       /etc/defaults/rc.conf says:
 > > sendmail_enable="YES"   # Run the sendmail inbound daemon (YES/NO/NONE).
 > >
 > >
 > >       /etc/rc.sendmail does: (only working for NONE, but not NO)
 > >
 > >       case ${sendmail_enable} in
 > >         [Nn][Oo][Nn][Ee])
 > >
 > >
 > >       The correct syntax is:
 > >
 > >       case ${sendmail_enable} in
 > >       [Nn][Oo][Nn][Ee] | [Nn][Oo])
 > >
 > >
 > > If No/NO/no/nO cannot be used, please state so. But, this is not a usual way
 > > to disable something.
 > > So, please apply the patch to rc.sendmail.
 > 
 > "NO" _can_ be used. It's meaning is different than "NONE." "NO" means
 > not to run the sendmail(8) listener, but the submitting and 'outbound'
 > daemons can still be run.
 
 sendmail does not need to run on background to send/submit outbound mail.
 The backgrounding daemon is solely for receiving inbound message.
 I like your explanation of the way to use "NO", but I do not know if 
 rc.sendmail does it correctly. Below is what sendmail_enable="NO" does:
 
 freebsd: ps xaugww  | grep sendmail
 root     122  0.0  1.8  2760 2228  ??  Ss    3:28PM   0:02.90 sendmail:
 accepting connections (sendmail)
 smmsp    125  0.0  1.7  2652 2192  ??  Is    3:28PM   0:00.07 sendmail: Queue
 runner@00:30:00 for /var/spool/clientmqueue (sendmail)
 
 Does process 122 accept message only from localhost or from anywhere?
 Is this really "NO" action, or "YES" action?
 
 > See rc.sendmail(8) for details. If you feel the documentation is
 > lacking, please submit a new PR with your ideas for improvements, but
 > the code works as desired.
 
 Nop, the manual page does not say "NO" can be used any where. If "NO"
 cannot be used, then, it is not compatible to existing sys-admin
 syntax. It forces to use "NONE" instead of "NO" as Doug's message
 in closing this case:
 
 : While it's not totally clear in the script, setting
 : sendmail_enable to NONE will indeed prevent anything
 : in that script from running.
 
 His message is negtive on using "NO". I think the current situation
 is very unclear.
 If "NO" is out of scope, what is the extreme reason to use "NONE"?
 If "NO" can be used, then things will be correct if process 122 accepts
 message from localhost only. Is this true? If so, the document needs to
 reflect this situation. Otherwise, people will get confused because
 sendmail is no required to run on the background for outbound traffic
 in the past.
 
 
 # man rc.sendmail
 ...
      sendmail_enable
              (str) If set to ``YES'', run the sendmail(8) daemon at system
              boot time.  If set to ``NONE'', do not run any sendmail(8) dae-
              mons at system boot time.
 
      These variables are used to determine how the sendmail(8) daemons are
      started:
 
            # 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
 
 
 -- 
 ------------ Jin Guojun ----------- v --- j_guojun@lbl.gov ---
 Distributed Systems Department		http://www.itg.lbl.gov/~jin
 M/S 50B-2239				Ph#:(510) 486-7531 Fax: 486-6363
 Lawrence Berkeley National Laboratory,	Berkeley, CA 94720

From: "Crist J. Clark" <crist.clark@attbi.com>
To: "Jin Guojun[DSD]" <j_guojun@lbl.gov>
Cc: FreeBSD-gnats-submit@FreeBSD.ORG, dougb@FreeBSD.ORG
Subject: Re: conf/39444: rc.sendmail syntax error: cannot disable sendmail
Date: Tue, 18 Jun 2002 16:47:41 -0700

 On Tue, Jun 18, 2002 at 03:28:22PM -0700, Jin Guojun[DSD] wrote:
 > "Crist J. Clark" wrote:
 > > "NO" _can_ be used. It's meaning is different than "NONE." "NO" means
 > > not to run the sendmail(8) listener, but the submitting and 'outbound'
 > > daemons can still be run.
 > 
 > sendmail does not need to run on background to send/submit outbound mail.
 > The backgrounding daemon is solely for receiving inbound message.
 
 Please see /etc/mail/README.
 
 > I like your explanation of the way to use "NO", but I do not know if 
 > rc.sendmail does it correctly. Below is what sendmail_enable="NO" does:
 > 
 > freebsd: ps xaugww  | grep sendmail
 > root     122  0.0  1.8  2760 2228  ??  Ss    3:28PM   0:02.90 sendmail:
 > accepting connections (sendmail)
 > smmsp    125  0.0  1.7  2652 2192  ??  Is    3:28PM   0:00.07 sendmail: Queue
 > runner@00:30:00 for /var/spool/clientmqueue (sendmail)
 > 
 > Does process 122 accept message only from localhost or from anywhere?
 
 Look at 'netstat -an | fgrep LISTEN' to see.
 
 > Is this really "NO" action, or "YES" action?
 
 That's "NO."
 
 > > See rc.sendmail(8) for details. If you feel the documentation is
 > > lacking, please submit a new PR with your ideas for improvements, but
 > > the code works as desired.
 > 
 > Nop, the manual page does not say "NO" can be used any where. If "NO"
 > cannot be used, then, it is not compatible to existing sys-admin
 > syntax. It forces to use "NONE" instead of "NO" as Doug's message
 > in closing this case:
 
 "NO" can be used. "YES" and "NONE" have special meanings, and anything else
 defaults to what we consider the "NO" behavior. However, no check that
 it really is set to "NO" is made. You can set it to "FOO" and get the
 same bahavior as "NO," but the behavior is different than for "YES" or
 "NONE."
 
 > : While it's not totally clear in the script, setting
 > : sendmail_enable to NONE will indeed prevent anything
 > : in that script from running.
 > 
 > His message is negtive on using "NO". I think the current situation
 > is very unclear.
 > If "NO" is out of scope, what is the extreme reason to use "NONE"?
 
 Go to the -stable or -current archives. After _much_ discussion, it
 was decided not to change the "classic" meaning of "NO" (which was no
 sendmail(8) listener, but the sendmail_outbound_enable knob was
 independent). But another vocal camp wanted a single knob to turn
 sendmail(8) off completely. Thus, the "NONE" switch came in.
 
 > If "NO" can be used, then things will be correct if process 122 accepts
 > message from localhost only. Is this true?
 
 Yes.
 
 > If so, the document needs to
 > reflect this situation. Otherwise, people will get confused because
 > sendmail is no required to run on the background for outbound traffic
 > in the past.
 
 See /etc/mail/README and /usr/src/UPDATING (although reading that can
 be confusing since many changes were made, then backed out, and then
 changed again).
 -- 
 Crist J. Clark                     |     cjclark@alum.mit.edu
                                    |     cjclark@jhu.edu
 http://people.freebsd.org/~cjc/    |     cjc@freebsd.org
>Unformatted:
