[comp.mail.sendmail] Another 2.1 concept error?

steve@mrc-apu.cam.ac.uk (Steve Platt) (06/13/89)

|Shouldn't this order be changed?

Maybe, although it HAS matched a higher level name first;

however, if I had a host/sub-department called "Acorn"
I'd think twice before registering it in that name under
the NRS.

As things in the NRS often seem like words (which might also be
proper names) and since computervision isnt a word (although
it is a proper name as you found) couldn't you elect to register
as uk.ac.bristol.computer-vision (uk.ac.bris.cv)?

Mind you, the prize must stay with the Janet Central office
for the UK.AC.CO masterpiece; Internet worm, eat-your-heart-out!

HopkinsRJ@bristol.ac.uk (R.J.Hopkins) (06/14/89)

I'm in the process of adding a new mail host to the NRS. It will be
known as uk.ac.bristol.computervision (uk.ac.bris.cvn).

I've found that with sendmail2.1, an address of the form
"fred@computervision" resolves to fred@uk.co.computervision because
of the order of searches in Ruleset 11 (uk, uk.ac, uk.co, uk.ac.bristol
in my case).

Shouldn't this order be changed?

Richard Hopkins

andrew@stl.stc.co.uk (Andrew Macpherson) (06/14/89)

| >Shouldn't this order be changed?
| 
| Maybe, although it HAS matched a higher level name first;

Precicely, this is a mistake.

To be consistent with name-server operation, and the "domain names, concepts
and facilities" RFC, matching should be from local outward.

If you look at the resolver code (or set debug in nslookup) you will
see it try successively shorter parts pf your local domain before
submitting the "unadorned" string for a match.

The idea is to allow you to use a "short-form" to describe relatively
local entities, and only to require you to specify *from the point of
divergance with your local domain* for more distant.

Reversing this would be crazy.  If I wanted to call a machine
"uk.co.stc.stl.mod", [ ie "rocker"'s friend] I expect to be able to
refer to it as "mod", and not wind up with mail being sent to RSRE.
Simmilarly, if STC Telecoms had that machine, I would expect to specify
"tcom.mod"; this is where the UK sendmail has been "too nice" to the
users in the past... now that I am using the name-server code I can no
longer get away with the short-form in the non-local domains.  (All
addresses reversed to conform with NRS strangenesses)

| however, if I had a host/sub-department called "Acorn"
| I'd think twice before registering it in that name under
| the NRS.
| 
I'd be very tempted to register one of our hosts, just to make sure
everyone's software is resiliant  "uk.co.stc.icl.rbs.janet" :-)

| couldn't you elect to register
| as uk.ac.bristol.computer-vision (uk.ac.bris.cv)?
| 

[long and boring diatribe about excessively long and un-typeable
names suppressed]

-- 
-- 
Andrew Macpherson                          PSI%234237100122::andrew
andrew@stl.stc.co.uk        - or -         ...!mcvax!ukc!stl!andrew
"It is always a great mistake to treat the individual on the chance
that he may become a crowd" -- Mr Justice Codd: (A.P.Herbert)

jac@doc.ic.ac.uk (Jim Crammond) (06/14/89)

The existing ordering allows you to say user@computervision and see it
expand to user@computervision.co.uk and not user@computervision.co.ac.uk
								^^
As Steve Platt points out, we still have this problem with co.ac.uk being
registered.

If you want computervision to map to something local then the obvious
answer is to remove the *ambiguity* by taking it out of your table of co.uk
sites; or taking out the co.uk table altogether.

-Jim.

jim@cs.strath.ac.uk (Jim Reid) (06/19/89)

|> We in fact do something more - a makefile generates new NRS derived
|> input decks by editing out names we know to be a problem, like 'uk.ac.co',
|> 'uk.ac.mrc' etc (we have a uk.ac.gla.mrc)

This is an unsightly (and strictly speaking irrelevant) kludge. The
whole basis of the NRS was to prevent ambiguous domain names. The
rules say that a domain name cannot be used if it is already in use as
a higher-level name within the domain hierarchy. If that rule was
applied (oh that it were...), names like 'uk.ac.gla.mrc' and
'uk.ac.co' could not be used since they caused ambiguities. [Does mail
for 'co.foo' go to 'uk.co.foo' or 'uk.ac.co.foo'?] They wouldn't then
be permitted to appear in the NRS database and there would be no need
for people to kludge their mail tables. Why does the NRS let people
get away with registering illegal addresses?

Of course, everybody knows that real-world mail systems need quick and
dirty hacks like that since reality tends to be different from what
the standards say.....

		Jim

taylor@cs.glasgow.ac.uk (Jem Taylor) (07/22/89)

|Think we're talking at cross purposes. Below is a script listing showing
|the creation of 2 configs - test1 and test2. They are identical except
|for the order of the domain declarations in the config file. You'll
|see that there are indeed differences between the resultant sendmail
|configuration files but these diffences do not affect the order of
|domain resolution. In both, "computervision" still resolves to
|computervision.co.uk

I see your point. I suggest you do as the manual tells you, and use
the sequence

(assume your config is called $config )

$ cd $SENDMAIL/$config && make check $config install

This will abort if any potential conflicts are detected. You can then
delete the entry you dislike.

We in fact do something more - a makefile generates new NRS derived
input decks by editing out names we know to be a problem, like 'uk.ac.co',
'uk.ac.mrc' etc (we have a uk.ac.gla.mrc)

I enclose the relevant script, which Jim thought too obvious to put into
the package:-


mk.sendmail.db
::::::::::::::
#!/bin/sh
#
# Bring sendmail domain databases up-to-date
#

/bin/make -f - $@ <<'EOF'

NRS=/usr/local/src/c-nrs
NRSFILES=$(NRS)/ac.dom $(NRS)/top.dom $(NRS)/co.dom $(NRS)/gla.dom
DERFIL=/usr/spool/nrs/DERFIL2
SENDMAIL=/usr/local/lib/Sendmail
EXTERNAL= eng eng-slave psy psy-slave geology geol-slave science science-slave\         art art-slave

all: $(DERFIL) hawaii crete slave $(EXTERNAL) getfiles

hawaii crete: $(NRSFILES)
	cd $(SENDMAIL)/$@ && make check $@ install

external: $(EXTERNAL)

$(EXTERNAL): $(NRSFILES)
	cd $(SENDMAIL)/$@ && make check $@

slave:
	cd $(SENDMAIL)/$@ && make $@ check $@ && ./install-$@

$(DERFIL): $(DERFIL).Z
	-uncompress -f $(DERFIL)


$(DERFIL).Z:

getfiles:
	cd $(NRS) && ./$@

$(NRSFILES): $(DERFIL)
	cd $(NRS) && make sendmail
	for i in $(NRS)/*.dom $(NRS)/*.chn ; \
	do sort -u $$i | sed -e '/^co\./s/^/#/' \
			-e '/uk\.ac\.gla\.cs/s/^/#/' \
			-e '/uk\.ac\.glasgow\.cs/s/^/#/' \
			-e '/uk\.co\.stc/s/^/#/' \
			-e '/^mrc /s/^/#/' \
			-e '/^ac\./s/^/#/' >$$i-t \
	&& mv -f $$i-t $$i \
	&& chmod a+r $$i ; \
	done
EOF
-- 
Arpa:taylor@cs.glasgow.ac.uk	  \ J.A.Taylor, Computing Science,
Janet: taylor@uk.ac.glasgow.cs	   \ University of Glasgow,
Uucp: mcvax!cs.glasgow.ac.uk!taylor \ GB-GLASGOW G12 8QQ

taylor@cs.glasgow.ac.uk (Jem Taylor) (07/22/89)

	
	I'm in the process of adding a new mail host to the NRS. It will be
	known as uk.ac.bristol.computervision (uk.ac.bris.cvn).
	
	I've found that with sendmail2.1, an address of the form
	"fred@computervision" resolves to fred@uk.co.computervision because
	of the order of searches in Ruleset 11 (uk, uk.ac, uk.co, uk.ac.bristol
	in my case).
	
	Shouldn't this order be changed?
	
	Richard Hopkins
	

The order of domain resolution searches is directly dictated by the order
of domain declarations in your config.site file.

-Jem.

HopkinsRJ@bristol.ac.uk (R.J.Hopkins) (07/23/89)

| The order of domain resolution searches is directly dictated by the order
| of domain declarations in your config.site file.
| 
| -Jem.
| 

Think we're talking at cross purposes. Below is a script listing showing
the creation of 2 configs - test1 and test2. They are identical except
for the order of the domain declarations in the config file. You'll
see that there are indeed differences between the resultant sendmail
configuration files but these diffences do not affect the order of
domain resolution. In both, "computervision" still resolves to
computervision.co.uk

Here's the script listing...

Script started on Fri Jun 16 15:41:24 1989
1## Config config.test1

creating tables/test1.mk ... 
Making directory test1 ... 
creating configuration files in test1 ... 
2## Config config.test2

creating tables/test2.mk ... 
Making directory test2 ... 
creating configuration files in test2 ... 
3## cd test1
4## make
cd ../tables; make -f test1.mk test1
../Dombuild -o test1-dom.m4 bristol.local.dom  bristol.bris.dom  ac.dom  uk.dom  co.dom -top top.dom  
../Chnbuild -o test1-chn.m4 -local qgb.local.chn -ether ether.chn -janet janet.chn -janet catchall.chn -janet bristol.janet.chn -top top.dom 
make test1.cf
cp ../tables/test1-dom.m4 .
cp ../tables/test1-chn.m4 .
mv: test1.cf: Cannot access: No such file or directory
*** Exit 1 (ignored)
m4 test1.mc > test1.cf
5## cd ../test2
6## make
cd ../tables; make -f test2.mk test2
../Dombuild -o test2-dom.m4 uk.dom  ac.dom  bristol.bris.dom  co.dom  bristol.local.dom -top top.dom  
../Chnbuild -o test2-chn.m4 -local qgb.local.chn -ether ether.chn -janet janet.chn -janet catchall.chn -janet bristol.janet.chn -top top.dom 
make test2.cf
cp ../tables/test2-dom.m4 .
cp ../tables/test2-chn.m4 .
mv: test2.cf: Cannot access: No such file or directory
*** Exit 1 (ignored)
m4 test2.mc > test2.cf
7## diff test2.cf ../test1/test1.cf
17c17
< ###   test2 configuration file
---
| ###   test1 configuration file
331c331
< ##### @(#)test2-dom.m4        UK-2.1 sendmail configuration           18/11/88
---
| ##### @(#)test1-dom.m4        UK-2.1 sendmail configuration           18/11/88
340c340
< CAalv alvey forest-rd mod ac co
---
| CAac co alv alvey forest-rd mod
348c348
< CBabdn aber aberdeen aberystwyth afrc aston bangor bath bbk bham
---
| CBbris abdn aber aberdeen aberystwyth afrc aston bangor bath bbk bham
376c376
< CBumrcc uwcm warwick warwk westfield wolverhampton wolves york bris
---
| CBumrcc uwcm warwick warwk westfield wolverhampton wolves york
396,397c396,397
< CEbsa cms computervision compsci csa esa fagg gsa lib msa np1a pva qgb
< CEqsa qvc rsa lloyd knott testpc domain apl tango
---
| CElloyd knott testpc domain apl tango bsa cms computervision compsci csa
| CEesa fagg gsa lib msa np1a pva qgb qsa qvc rsa
404d403
< R$*med-image.compsci          $1med-image.compsci.bristol.ac.uk
408a408
| R$*med-image.compsci          $1med-image.compsci.bristol.ac.uk
452c452
< ##### @(#)test2-chn.m4        UK-2.1 sendmail configuration           18/11/88
---
| ##### @(#)test1-chn.m4        UK-2.1 sendmail configuration           18/11/88
8## 
script done on Fri Jun 16 15:43:31 1989