Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.1 6/24/83; site umcp-cs.UUCP
Path: utzoo!linus!philabs!cmcl2!seismo!umcp-cs!chris
From: chris@umcp-cs.UUCP (Chris Torek)
Newsgroups: net.mail
Subject: Re: Mail addressing and routing
Message-ID: <1156@umcp-cs.UUCP>
Date: Thu, 8-Aug-85 07:42:01 EDT
Article-I.D.: umcp-cs.1156
Posted: Thu Aug  8 07:42:01 1985
Date-Received: Sun, 11-Aug-85 05:15:32 EDT
References: <644@adobe.UUCP> <734@vortex.UUCP>
Organization: U of Maryland, Computer Science Dept., College Park, MD
Lines: 96

Let me see if I can take Lauren's suggestion and get pseudo-code out of
it.  If I ever get shanghaid into hacking mailers, I would probably
implement the "UUCP" "domain" like this:

	rmail: given !, just forward by direct UUCP
		to the first host in , doing what rmail has
		always done with these.  If it fails, return
		to sender.  Rmail is a transport system, not a
		router.
		
		Note that I ignore any @-signs in !.
	
	rmail: given  with no !s, hand it to mailer.

	mailer: given ! with no @-signs, just hand it
		off to uux.  (Pretend to be a transport system; no
		routing.)

	mailer: given @, look up "string" in our
		local UUCP database and see if we have a route for
		it.  (I.e., given "cbosgd.att.uucp" see if we know
		how to get to "cbosgd.att".)  If so, then it should
		hopefully be a fully specified ! string, and I hand
		that straight to uux (without even looking at it).
		(In this case I would get "seismo!cbosgd" as the
		full route.  Note that you can put arbitrary stuff
		in the database if you think it will "work right".)

		Otherwise, do a "nameserver lookup" on the "domain"
		part of "string" (excluding UUCP---there is no top
		level uucp name server), again by a local UUCP
		database lookup (different database though).  E.g.,
		if I don't know "cbosgd.att" then I look for "att".
		If I can get there, then I take the string I get
		back from that, append the original address, and
		hand *that* to uux.

		Just for completeness, here's an example if I get
		(say) user@tinyhost.smalluniv.bigcity.calif.uucp:
		1. look under "full routes for hosts" for
		   tinyhost.smalluniv.bigcity.calif.uucp; fails.
		2. look under "partial routes for domains" for
		   smalluniv.bigcity.calif.uucp; fails.
		3. look under "partial routes for domains" for
		   bigcity.calif.uucp; fails.
		4. look under "partial routes for domains" for
		   calif.uucp; succeeds; I get "seismo!vortex"
		   (vortex is such a smart router :-) ), so I
		   send to
	  seismo!vortex!user@tinyhost.smalluniv.bigcity.calif.uucp

In other words, if I don't have a route for the full domain name,
I will try to find a route for what I have put into my database as
the "domain server" for the partial domain.  It is entirely the
responsibility of *me* to have correct data in my UUCP database.
My database can be as extensive (or not) as I want.

Also, I am depending on myself (again) not to put "dumb" hosts in
my "partial routes for domains" table.  I could (it would be a bad
idea but I could) put myself in for something, causing a mail loop.
I could also put a host in that I thought was smart, but actually
wasn't, again causing a mail loop.  If I find I've done that, I
change my database.

Also, if I am a "partial route for domains" for someone else for
maryland.uucp, then things work too.  Suppose someone else, let's
call him otherguy@hishost.hisuniv.uucp just to give him a "full
name", uses my scheme to send to user@sphinx.ee.maryland.uucp and
gets me as his partial route for maryland.uucp.  He sends to
hplabs!hao!seismo!umcp-cs!user@sphinx.ee.maryland.uucp.  Now (if
everyone is using my algorithm, or if they're running v7 rmail),
that finally gets here and all the ! stuff has been used up and
rmail gets "user@sphinx.ee.maryland.uucp".  Since this doesn't have
!s, rmail pops it over to the mailer, which looks up
sphinx.ee.maryland.uucp and finds it, and sends the mail off to
"eneevax!umd-sphinx!user"---which is the right place.  (Or maybe
it can only handle ee.maryland.uucp and routes it to
"eneevax!user@sphinx.ee.maryland.uucp" for further processing.)

Finally, down!honey can still do his tricksy pathalias stuff and
send to what I label "user@sphinx.ee.maryland.uucp" by sending to
"princeton!seismo!umcp-cs!eneevax!umd-sphinx!user", and that works
too.  (Isn't backwards compatibility fun?)

Of course, this does not address what happens in the user interface,
nor with crossover between DARPA Internet and UUCP (but we're not
supposed to do that anyway).  I'll think about that later. . . .

Another problem is that I have this huge UUCP routing database
duplicated at lots of UUCP sites.  down!honey just has a huge
pathalias database duplicated at lots of UUCP sites, which is
clearly better, right? :-)
-- 
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 4251)
UUCP:	seismo!umcp-cs!chris
CSNet:	chris@umcp-cs		ARPA:	chris@maryland