[net.mail.headers] internetwork addressing questions, with sendmail.cf fix

gnu@sun.uucp (John Gilmore) (07/17/84)

To answer just a few of the questions:
	2) Since '%' (percent) it isn't part of the RFC822 grammer, what 
	does it mean and what is the convention for parsing it?  
It is a kludge invented somewhere on the Arpanet which was used to get
around the rule that "there can only be one '@' in an address".  If you
send something to user%host@gateway, by 822 rules it should go to 'gateway'.
There at the gateway, the 'user%host' part is subject to local rules, and
it turns out that treating it as 'user@host' is a very useful local rule,
given the current chaotic state of the various interconnected nets.

	4) Is there a permissable way to do the ARPA-to-BIT-to-USEnet
	addressing implied in the second choice above?  In other words, is there
	an accepted way to parse a mixture of '!', '%' and '@' together.  If so,
	how widely would it be accepted?
Here at Sun I made a minor change to the sendmail config files and noticed
that more mail was failing, so 'fixed' our config files to avoid giving
precedence to any of ':^!=%'.  We simply take the leftmost of them
and deal with it.  This fixed the problems people were having.  As with
any 'rule' in the nets, you can't depend on it, but it might be a useful
starting point.  Note that any site that connects to multiple networks will
probably parse '@' at high precedence (as required by RFC822) though.

This is the section of our sendmail.cf (at the end of ruleset 3) which
implements the non-precedence.  The important part is that the leftmost
token to match be '$-' rather than '$+'.  Note that this also parses
the new uucp transport-addrs (host.domain!user).  Enjoy.

# convert old-style addresses to domain-based addresses
# All old-style addresses parse from left to right, without precedence.
# Note that the left side of '%' is a username; it is matched with $+ so
# that complex names like "john.gilmore%l5" will be caught and translated.
# The rest can only have an atom as the host name (left of the symbol).
R$-:$+			$@$>3$2@$1			host:user
R$-^$+			$1!$2				convert ^ to !
R$-!$+			$@$>6$2<@$1.uucp>		uucphost!user
R$-=$+			$@$>6$2<@$1.bitnet>		bitnethost=user
R$-.$+!$+		$@$>6$3<@$1.$2>			host.domain!user
R$+%$+			$@$>3$1@$2			user%host

steve@dartvax.UUCP (07/19/84)

>To answer just a few of the questions:
>	2) Since '%' (percent) it isn't part of the RFC822 grammer, what 
>	does it mean and what is the convention for parsing it?  
>It is a kludge invented somewhere on the Arpanet which was used to get
>around the rule that "there can only be one '@' in an address".  If you
>send something to user%host@gateway, by 822 rules it should go to 'gateway'.
>There at the gateway, the 'user%host' part is subject to local rules, and
>it turns out that treating it as 'user@host' is a very useful local rule,
>given the current chaotic state of the various interconnected nets.
	...

>This is the section of our sendmail.cf (at the end of ruleset 3) which
>implements the non-precedence.  The important part is that the leftmost
>token to match be '$-' rather than '$+'.  Note that this also parses
>the new uucp transport-addrs (host.domain!user).  Enjoy.
>
># convert old-style addresses to domain-based addresses
># All old-style addresses parse from left to right, without precedence.
># Note that the left side of '%' is a username; it is matched with $+ so
># that complex names like "john.gilmore%l5" will be caught and translated.
># The rest can only have an atom as the host name (left of the symbol).
>R$-:$+			$@$>3$2@$1			host:user
>R$-^$+			$1!$2				convert ^ to !
>R$-!$+			$@$>6$2<@$1.uucp>		uucphost!user
>R$-=$+			$@$>6$2<@$1.bitnet>		bitnethost=user
>R$-.$+!$+		$@$>6$3<@$1.$2>			host.domain!user
>R$+%$+			$@$>3$1@$2			user%host

The only catch is that if "%" is really a "@" in hiding, then it should
be parsed right-to-left, not left-to-right like the other forms.  In
particular, if you are parsing  user%hostA%hostB, you want it to become
user%hostA@hostB, not user@hostA%hostB.  An alternative section of
sendmail.cf would be:

# convert old-style addresses to a domain-based address
R$+^$+			$1!$2				convert ^ to !
R$-!$+			$@$2<@$1.uucp>			resolve uucp names
R$-.$+!$+		$@$>6$3<@$1.$2>			host.domain!local-part
R$+%$-			$@$>6$1<@$2>			local-part%host
R$+%$-.$-		$@$>6$1<@$2.$3>			local-part%host.domain
R$-:$+			$@$>6$2<@$1>			host:local-part
R$-=$+			$@$2<@$1.bitnet>		resolve bitnet names

One limitation with this is that it fails to parse  

	local-part%host.subdomain.domain

correctly.  Comments?
--------------------------------------------------------------------
Steve Campbell

	UUCP: {decvax|linus|cornell|astrovax}!dartvax!steve
	CSNET: steve@dartmouth     ARPA: steve%dartmouth@csnet-relay