NetBSD Problem Report #10243
Received: (qmail 23102 invoked from network); 31 May 2000 15:29:50 -0000
Message-Id: <200005311529.e4VFTJ200717@zoo>
Date: Wed, 31 May 2000 09:29:19 -0600 (MDT)
From: jbernard@mines.edu
Reply-To: jbernard@mines.edu
To: gnats-bugs@gnats.netbsd.org
Subject: rc.d/sendmail should not exit if [ -f /etc/sendmail.cf ]
X-Send-Pr-Version: 3.95
>Number: 10243
>Category: misc
>Synopsis: rc.d/sendmail should not exit if [ -f /etc/sendmail.cf ]
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: misc-bug-people
>State: closed
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Wed May 31 15:30:00 +0000 2000
>Closed-Date: Sun Jun 04 08:34:15 +0000 2000
>Last-Modified: Sun Jun 04 08:34:15 +0000 2000
>Originator: Jim Bernard
>Release: May 30, 2000
>Organization:
Speaking for myself
>Environment:
System: NetBSD zoo 1.4Y NetBSD 1.4Y (ZOO-$Revision: 1.52 $) #0: Fri May 26 14:58:14 MDT 2000 jim@zoo:/home/tmp/compile/sys/arch/i386/compile/ZOO i386
>Description:
/etc/rc.d/sendmail contains a clause that exits without starting
sendmail if a sendmail.cf file exists in /etc. Since the script
contains an explicit required_files setting specifying the correct
location of the configuration file, the existence of /etc/sendmail.cf
is *not* an error. There's no reason why the script should be nagging
so insistently about either sloppy housekeeping or (more likely)
a deliberate choice to keep either a copy or a link to sendmail.cf
in /etc.
>How-To-Repeat:
Have a link to /etc/mail/sendmail.cf in /etc and watch rc.d/sendmail
refuse to start sendmail at boot time.
>Fix:
Delete the check:
--- sendmail.orig Wed May 17 03:14:07 2000
+++ sendmail Wed May 31 09:20:29 2000
@@ -17,11 +17,6 @@
pidfile="/var/run/${name}.pid"
required_files="/etc/mail/${name}.cf"
load_rc_config $name
-# die if there's pre-8.10 configuration file
-if checkyesno sendmail && [ -f "/etc/${name}.cf" ]; then
- err 1 "${name} was not started, move /etc/${name}.cf to /etc/mail."
-fi
-
run_rc_command "$1"
>Release-Note:
>Audit-Trail:
From: itojun@iijlab.net
To: jbernard@mines.edu
Cc: gnats-bugs@gnats.netbsd.org
Subject: Re: misc/10243: rc.d/sendmail should not exit if [ -f /etc/sendmail.cf ]
Date: Thu, 01 Jun 2000 00:59:31 +0900
>>Synopsis: rc.d/sendmail should not exit if [ -f /etc/sendmail.cf ]
>>Description:
> /etc/rc.d/sendmail contains a clause that exits without starting
> sendmail if a sendmail.cf file exists in /etc. Since the script
> contains an explicit required_files setting specifying the correct
> location of the configuration file, the existence of /etc/sendmail.cf
> is *not* an error. There's no reason why the script should be nagging
> so insistently about either sloppy housekeeping or (more likely)
> a deliberate choice to keep either a copy or a link to sendmail.cf
> in /etc.
The check (exit if /etc/sendmail.cf) is correct. without this,
upgrade will be very painful. see PR 10100.
itojun
State-Changed-From-To: open->feedback
State-Changed-By: itojun
State-Changed-When: Wed May 31 09:01:28 PDT 2000
State-Changed-Why:
From: Manuel Bouyer <bouyer@antioche.lip6.fr>
To: jbernard@mines.edu
Cc: gnats-bugs@gnats.netbsd.org, netbsd-bugs@netbsd.org
Subject: Re: misc/10243: rc.d/sendmail should not exit if [ -f /etc/sendmail.cf ]
Date: Wed, 31 May 2000 18:53:24 +0200
On Wed, May 31, 2000 at 09:29:19AM -0600, jbernard@mines.edu wrote:
> >Number: 10243
> >Category: misc
> >Synopsis: rc.d/sendmail should not exit if [ -f /etc/sendmail.cf ]
This is a feature, it's to avoid situation where the admin puts a custom file
/etc/sendmail.cf and believe it's used; where sendmail is using
/etc/mail/sendmail.cf shipped by default with NetBSD. Various problems can
result from this, from security issues to lost mails.
You can remove the check *if you really know what you're doing*.
--
Manuel Bouyer, LIP6, Universite Paris VI. Manuel.Bouyer@lip6.fr
--
From: Jim Bernard <jbernard@mines.edu>
To: itojun@iijlab.net, bouyer@antioche.lip6.fr
Cc: gnats-bugs@gnats.netbsd.org
Subject: Re: misc/10243: rc.d/sendmail should not exit if [ -f /etc/sendmail.cf ]
Date: Wed, 31 May 2000 11:55:56 -0600
On Thu, Jun 01, 2000 at 12:59:31AM +0900, itojun@iijlab.net wrote:
>
> >>Synopsis: rc.d/sendmail should not exit if [ -f /etc/sendmail.cf ]
> >>Description:
> > /etc/rc.d/sendmail contains a clause that exits without starting
> > sendmail if a sendmail.cf file exists in /etc. Since the script
> > contains an explicit required_files setting specifying the correct
> > location of the configuration file, the existence of /etc/sendmail.cf
> > is *not* an error. There's no reason why the script should be nagging
> > so insistently about either sloppy housekeeping or (more likely)
> > a deliberate choice to keep either a copy or a link to sendmail.cf
> > in /etc.
>
> The check (exit if /etc/sendmail.cf) is correct. without this,
> upgrade will be very painful. see PR 10100.
Your point that there is the possibility of confusion is well taken.
However, I also object to being told that I'm not allowed to put a file
in that location for my convenience.
Under what circumstances would one obtain the configuration error you
are concerned about? It's difficult to see how one could manually place a
sendmail.cf in /etc/mail without being aware that it is the correct
location for the file actually used by sendmail. And if there's some
automated mechanism for installing a stock sendmail.cf into /etc/mail on a
system that already has a sendmail.cf in /etc (e.g., via some sort of
sysinst-based upgrade mechanism that would upgrade /etc), then it would
seem more appropriate to make that automated mechanism simply move the
existing sendmail.cf into /etc/mail rather than creating the possibility
of confusion. That is, I would say the task of avoiding the problem
properly belongs in the upgrade mechanism, not in the sendmail startup
script. This would be so at the very least because the upgrade is a one-time
occurrence, whereas the startup script enforces its rule at every boot,
forever. I wonder how many more PR's and how many more discussions this
will cause if the script remains as is.
From: itojun@iijlab.net
To: Jim Bernard <jbernard@mines.edu>
Cc: bouyer@antioche.lip6.fr, gnats-bugs@gnats.netbsd.org
Subject: Re: misc/10243: rc.d/sendmail should not exit if [ -f /etc/sendmail.cf ]
Date: Thu, 01 Jun 2000 10:13:41 +0900
> Your point that there is the possibility of confusion is well taken.
>However, I also object to being told that I'm not allowed to put a file
>in that location for my convenience.
feel free to modify /etc/rc.d/sendmail locally.
> Under what circumstances would one obtain the configuration error you
>are concerned about?
VERY easy to happen.
1. use netbsd pre-1.5 system and custom sendmail.cf in /etc/sendmail.cf.
2. upgrade netbsd without care. put netbsd-supplied
/etc/mail/sendmail.cf, switch sendmail binary. then
3. start sendmail. sendmail uses /etc/mail/sendmail.cf, which is
NOT the custom configuration. email bounces.
>of confusion. That is, I would say the task of avoiding the problem
>properly belongs in the upgrade mechanism, not in the sendmail startup
>script. This would be so at the very least because the upgrade is a one-time
>occurrence, whereas the startup script enforces its rule at every boot,
>forever. I wonder how many more PR's and how many more discussions this
>will cause if the script remains as is.
I agree that upgrade mechanism needs to be improved. independent
from that, given that email bounces are considered very fatal error,
I believe that the default /etc/rc.d/sendmail should take the most
safe route (which is, disallow /etc/sendmail.cf).
itojun
From: matthew green <mrg@eterna.com.au>
To: Manuel Bouyer <bouyer@antioche.lip6.fr>
Cc: gnats-bugs@gnats.netbsd.org, netbsd-bugs@netbsd.org,
jbernard@mines.edu
Subject: re: misc/10243: rc.d/sendmail should not exit if [ -f /etc/sendmail.cf ]
Date: Thu, 01 Jun 2000 11:40:01 +1000
On Wed, May 31, 2000 at 09:29:19AM -0600, jbernard@mines.edu wrote:
> >Number: 10243
> >Category: misc
> >Synopsis: rc.d/sendmail should not exit if [ -f /etc/sendmail.cf ]
This is a feature, it's to avoid situation where the admin puts a custom file
this is *not* a feature. it is seemingly a deliberate attempt to make
every NetBSD user who runs sendmail pissed off.
/etc/sendmail.cf and believe it's used; where sendmail is using
/etc/mail/sendmail.cf shipped by default with NetBSD. Various problems can
result from this, from security issues to lost mails.
this is a bug in NetBSD. you are forcing people to not have a
/etc/sendmail.cf, something that they've had for what, 15 years, now?
You can remove the check *if you really know what you're doing*.
the check should be removed.
f*ck, IMO, sendmail.cf should never have moved.
From: Jim Bernard <jbernard@mines.edu>
To: itojun@iijlab.net
Cc: bouyer@antioche.lip6.fr, gnats-bugs@gnats.netbsd.org, mrg@eterna.com.au
Subject: Re: misc/10243: rc.d/sendmail should not exit if [ -f /etc/sendmail.cf ]
Date: Wed, 31 May 2000 19:58:41 -0600
On Thu, Jun 01, 2000 at 10:13:41AM +0900, itojun@iijlab.net wrote:
> > Your point that there is the possibility of confusion is well taken.
> >However, I also object to being told that I'm not allowed to put a file
> >in that location for my convenience.
>
> feel free to modify /etc/rc.d/sendmail locally.
Of course, but it's best to minimize local differences from stock files
in order to make future upgrades easiest. So, I'd rather avoid this (so
much so, that I will live without the /etc/sendmail.cf link rather than
modify the script).
> > Under what circumstances would one obtain the configuration error you
> >are concerned about?
>
> VERY easy to happen.
> 1. use netbsd pre-1.5 system and custom sendmail.cf in /etc/sendmail.cf.
> 2. upgrade netbsd without care. put netbsd-supplied
> /etc/mail/sendmail.cf, switch sendmail binary. then
But how would such an upgrade be done? Surely a manual upgrade of /etc
would not yield such a result; one would never blindly install a stock
sendmail.cf if there were danger of overwriting one's own custom sendmail.cf
(which such a person would have to believe were about to happen, if he/she
weren't aware of the change of location of sendmail.cf). Is there some sort
of automated upgrade of /etc that would or could?
> 3. start sendmail. sendmail uses /etc/mail/sendmail.cf, which is
> NOT the custom configuration. email bounces.
That would be very undesirable, as you say. But I'm still trying to
understand just how likely such a scenario really is. I'm not at all
convinced yet that the probability is significantly above zero.
BTW: Thanks for at least putting a comment into the script referring to
the original PR on this for an explanation. It should help avoid more PR's.
--Jim
From: Keith Moore <moore@cs.utk.edu>
To: matthew green <mrg@eterna.com.au>
Cc: Manuel Bouyer <bouyer@antioche.lip6.fr>, gnats-bugs@gnats.netbsd.org,
netbsd-bugs@netbsd.org, jbernard@mines.edu
Subject: Re: misc/10243: rc.d/sendmail should not exit if [ -f /etc/sendmail.cf ]
Date: Wed, 31 May 2000 22:32:41 -0400
> f*ck, IMO, sendmail.cf should never have moved.
yeah, if you maintain sendmail on a large number of platforms
it's a royal pain in the wazoo to have to put sendmail.cf in
a different place on each one. but at least that problem can
be solved with symlinks in a way works on every platform.
now with netbsd you not only have to put the symlinks in
to get behavior consistent with other platforms,
you have to go and edit some obscure file.
worse yet, you have to *know* that you need to do this.
I suppose it's inevitable that different *IX variants are going to put
config files in different places. but it's one thing to assume that
such and such is where config files ought to go, quite another to
insist on a particular configuration and make it especially difficult
to change.
Keith
p.s. maybe we need /etc/sendmail.cf.cf to specify where sendmail.cf goes?
From: itojun@iijlab.net
To: Keith Moore <moore@cs.utk.edu>
Cc: matthew green <mrg@eterna.com.au>, Manuel Bouyer <bouyer@antioche.lip6.fr>,
gnats-bugs@gnats.netbsd.org, netbsd-bugs@netbsd.org,
jbernard@mines.edu
Subject: Re: misc/10243: rc.d/sendmail should not exit if [ -f /etc/sendmail.cf ]
Date: Thu, 01 Jun 2000 11:56:06 +0900
>> f*ck, IMO, sendmail.cf should never have moved.
>yeah, if you maintain sendmail on a large number of platforms
>it's a royal pain in the wazoo to have to put sendmail.cf in
>a different place on each one. but at least that problem can
>be solved with symlinks in a way works on every platform.
I think that is the problem sendmail guys are trying to address
with /etc/mail migration in 8.10. if all the unixes moves to
/etc/mail, it will give us uniform location for configuration file.
(note that some vendor unixes already put sendmail.cf in different
location)
in transition period, yes there's a pain.
now, what does netbsd want to do?
- use /etc/mail as sendmail 8.10 and beyond suggests, no local changes.
get long-time users question that says "why is the change?" during
transition period
- use /etc like traditional way, maintain local change against sendmail,
and sendmail.cf, and get newbie questions that says "all other
platforms put sendmail.cf in /etc/mail, and why netbsd puts it in
/etc?" forever.
- stick with sendmail 8.8 or 8.9 and fix all the security holes by
ourselves, no new features. get questions like "why not 8.11?"
- no sendmail shipped with netbsd, use pkgsrc. get questions like
"why no sendmail?"
If we ship sendmail with netbsd default installation, I personal
vote goes to sendmail.org's decision. with less local changes we
can maintain it in less cost.
itojun
From: itojun@iijlab.net
To: Keith Moore <moore@cs.utk.edu>, matthew green <mrg@eterna.com.au>,
Manuel Bouyer <bouyer@antioche.lip6.fr>, gnats-bugs@gnats.netbsd.org,
netbsd-bugs@netbsd.org, jbernard@mines.edu
Cc:
Subject: Re: misc/10243: rc.d/sendmail should not exit if [ -f /etc/sendmail.cf ]
Date: Thu, 01 Jun 2000 11:56:37 +0900
> now, what does netbsd want to do?
> - use /etc/mail as sendmail 8.10 and beyond suggests, no local changes.
> get long-time users question that says "why is the change?" during
> transition period
> - use /etc like traditional way, maintain local change against sendmail,
> and sendmail.cf, and get newbie questions that says "all other
> platforms put sendmail.cf in /etc/mail, and why netbsd puts it in
> /etc?" forever.
> - stick with sendmail 8.8 or 8.9 and fix all the security holes by
> ourselves, no new features. get questions like "why not 8.11?"
> - no sendmail shipped with netbsd, use pkgsrc. get questions like
> "why no sendmail?"
and I should point out we have gone through this discussion already,
before 8.10 migration.
itojun
From: Jim Bernard <jbernard@mines.edu>
To: itojun@iijlab.net
Cc: Keith Moore <moore@cs.utk.edu>, matthew green <mrg@eterna.com.au>,
Manuel Bouyer <bouyer@antioche.lip6.fr>, gnats-bugs@gnats.netbsd.org,
netbsd-bugs@netbsd.org
Subject: Re: misc/10243: rc.d/sendmail should not exit if [ -f /etc/sendmail.cf ]
Date: Wed, 31 May 2000 21:33:48 -0600
On Thu, Jun 01, 2000 at 11:56:06AM +0900, itojun@iijlab.net wrote:
>
> If we ship sendmail with netbsd default installation, I personal
> vote goes to sendmail.org's decision. with less local changes we
> can maintain it in less cost.
I agree completely. In general, I strongly prefer putting multiple related
configuration files into a subdirectory instead of polluting the top level
of /etc, so the move is one I applaud (though I would have chosen /etc/sendmail).
(My only complaint regards the restriction imposed by the startup script that
/etc/sendmail.cf must be a black hole in the filesystem namespace.)
From: Simon Burge <simonb@NetBSD.ORG>
To: Keith Moore <moore@cs.utk.edu>
Cc: gnats-bugs@gnats.netbsd.org, netbsd-bugs@NetBSD.ORG
Subject: Re: misc/10243: rc.d/sendmail should not exit if [ -f /etc/sendmail.cf ]
Date: Thu, 01 Jun 2000 13:53:09 +1000
Keith Moore wrote:
> yeah, if you maintain sendmail on a large number of platforms
> it's a royal pain in the wazoo to have to put sendmail.cf in
> a different place on each one. but at least that problem can
> be solved with symlinks in a way works on every platform.
>
> now with netbsd you not only have to put the symlinks in
> to get behavior consistent with other platforms,
> you have to go and edit some obscure file.
> worse yet, you have to *know* that you need to do this.
Would something like the following be workable?
if checkyesno sendmail && [ -f "/etc/${name}.cf" ]; then
cmp -s "/etc/mail/${name}.cf" "/etc/${name}.cf" && \
err 1 "the two are different!?"
fi
That way if you have a symlink either way the file contents will
be same and the system will keep quiet about it. Sound ok?
Simon.
From: itojun@iijlab.net
To: Simon Burge <simonb@netbsd.org>
Cc: Keith Moore <moore@cs.utk.edu>, gnats-bugs@gnats.netbsd.org,
netbsd-bugs@netbsd.org
Subject: Re: misc/10243: rc.d/sendmail should not exit if [ -f /etc/sendmail.cf ]
Date: Thu, 01 Jun 2000 13:04:12 +0900
>Would something like the following be workable?
>if checkyesno sendmail && [ -f "/etc/${name}.cf" ]; then
> cmp -s "/etc/mail/${name}.cf" "/etc/${name}.cf" && \
> err 1 "the two are different!?"
>fi
>That way if you have a symlink either way the file contents will
>be same and the system will keep quiet about it. Sound ok?
if this helps many people, sounds okay for me.
itojun
From: itojun@iijlab.net
To: Jim Bernard <jbernard@mines.edu>
Cc: bouyer@antioche.lip6.fr, gnats-bugs@gnats.netbsd.org, mrg@eterna.com.au
Subject: Re: misc/10243: rc.d/sendmail should not exit if [ -f /etc/sendmail.cf ]
Date: Thu, 01 Jun 2000 15:24:49 +0900
>> VERY easy to happen.
>> 1. use netbsd pre-1.5 system and custom sendmail.cf in /etc/sendmail.cf.
>> 2. upgrade netbsd without care. put netbsd-supplied
>> /etc/mail/sendmail.cf, switch sendmail binary. then
> But how would such an upgrade be done? Surely a manual upgrade of /etc
>would not yield such a result; one would never blindly install a stock
>sendmail.cf if there were danger of overwriting one's own custom sendmail.cf
>(which such a person would have to believe were about to happen, if he/she
>weren't aware of the change of location of sendmail.cf). Is there some sort
>of automated upgrade of /etc that would or could?
novice users would blindly install new sendmail.cf into /etc/mail,
I bet.
anyway, does Simon's proposal (use "cmp" to compare /etc/sendmail.cf
against /etc/mail/sendmail.cf) work for you?
itojun
From: David Brownlee <abs@netbsd.org>
To: Simon Burge <simonb@netbsd.org>
Cc: Keith Moore <moore@cs.utk.edu>, gnats-bugs@gnats.netbsd.org,
netbsd-bugs@netbsd.org
Subject: Re: misc/10243: rc.d/sendmail should not exit if [ -f /etc/sendmail.cf
]
Date: Thu, 1 Jun 2000 09:43:18 +0100 (BST)
Another rc.conf variable to avoid the warning would also work,
similar to no_swap, though naming would be an issue:
'sendmail_no_warn_about_etc_sendmail_cf'
David/absolute
-- www.netbsd.org: No hype required --
On Thu, 1 Jun 2000, Simon Burge wrote:
> Keith Moore wrote:
>
> > yeah, if you maintain sendmail on a large number of platforms
> > it's a royal pain in the wazoo to have to put sendmail.cf in
> > a different place on each one. but at least that problem can
> > be solved with symlinks in a way works on every platform.
> >
> > now with netbsd you not only have to put the symlinks in
> > to get behavior consistent with other platforms,
> > you have to go and edit some obscure file.
> > worse yet, you have to *know* that you need to do this.
>
> Would something like the following be workable?
>
> if checkyesno sendmail && [ -f "/etc/${name}.cf" ]; then
> cmp -s "/etc/mail/${name}.cf" "/etc/${name}.cf" && \
> err 1 "the two are different!?"
> fi
>
> That way if you have a symlink either way the file contents will
> be same and the system will keep quiet about it. Sound ok?
>
> Simon.
>
From: Keith Moore <moore@cs.utk.edu>
To: Jim Bernard <jbernard@mines.edu>
Cc: itojun@iijlab.net, Keith Moore <moore@cs.utk.edu>,
matthew green <mrg@eterna.com.au>,
Manuel Bouyer <bouyer@antioche.lip6.fr>, gnats-bugs@gnats.netbsd.org,
netbsd-bugs@netbsd.org
Subject: Re: misc/10243: rc.d/sendmail should not exit if [ -f /etc/sendmail.cf ]
Date: Thu, 01 Jun 2000 08:30:32 -0400
> (My only complaint regards the restriction imposed by the startup script that
> /etc/sendmail.cf must be a black hole in the filesystem namespace.)
mine as well. if sendmail.org is trying to get uniform behavior across
platforms, that's more likely to succeed than every OS trying to outguess
the others. but in the meantime it's nice if the startup script doesn't
fail - different heterogeneous sites might want to migrate to /etc/mail
in different timeframes.
(yeah, I know - we should just run netbsd on *all* of our platforms...)
Keith
From: Jim Bernard <jbernard@mines.edu>
To: itojun@iijlab.net
Cc: bouyer@antioche.lip6.fr, gnats-bugs@gnats.netbsd.org, mrg@eterna.com.au
Subject: Re: misc/10243: rc.d/sendmail should not exit if [ -f /etc/sendmail.cf ]
Date: Thu, 1 Jun 2000 06:43:21 -0600
On Thu, Jun 01, 2000 at 03:24:49PM +0900, itojun@iijlab.net wrote:
> anyway, does Simon's proposal (use "cmp" to compare /etc/sendmail.cf
> against /etc/mail/sendmail.cf) work for you?
That's one thing that occurred to me yesterday, but I didn't suggest it
because I've had some difficulties with sendmail during the last couple of
upgrades, and I've occasionally had to temporarily revert to an older
version, with sendmail.cf in /etc (which sometimes necessitates having a
different sendmail.cf there). The situation I had in place when I ran
into the "nagging" script was that /etc/sendmail.cf was a link to
/etc/mail/sendmail.cf, which would, of course, work well with a cmp-based
strategy. So, while it wouldn't be optimal (if I ever have to revert to
a pre-8.10 sendmail again, the script would refuse to start it; but mainly,
it's somehow unsatisfying to have the system imposing restrictions like this),
it seems like a reasonable compromise that would probably cause trouble for
the smallest number of people. Thus, I'd say OK.
Thanks for being willing to rethink this.
--Jim
State-Changed-From-To: feedback->closed
State-Changed-By: itojun
State-Changed-When: Sun Jun 4 01:33:59 PDT 2000
State-Changed-Why:
use "cmp" to detect same config in /etc and /etc/mail.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.