[comp.mail.misc] Mail transfer vs. gatewaying

moore@CYGNUSX1.CS.UTK.EDU (Keith Moore) (07/22/89)

From article <4291@viscous.sco.COM>, by stewarte@sco.COM (Stewart Evans):
> As I understand it, it is proper for transfer agents
> to rewrite from: fields so that they point back to 
> the sender.  Is it "proper" to do the same with to:
> and cc: fields?  

To which Christian Huitema <huitema@mirsa.inira.fr> replies in article
<203@mirsa.inria.fr>:
>It is improper to rewrite any field, except perhaps the "envelope". Just
>pass the message as it is: if the originating MUA used proper domain

To which David Herron <david@ms.uky.edu> replies in article 
<12226@s.ms.uky.edu>:
>Wrong, wrong, wrong, wrong, 1,000,000 times wrong
>
>For instance, mail going from UUCP-land to RFC-land must have
>the ! type addresses translated to @ type addresses before they'll
>be understood by RFC-land mailers.
>
>In general gateway machines MUST rewrite headers

Perhaps I misunderstood the question by Stewart Evans, but I thought
he was referring to the simple *transfer* of mail within the UUCP
mail network.  If this was the case then the correct answer is indeed
to avoid rewriting any header field.

On the other hand, David Herron is also correct in that it is often necessary
to rewrite mail headers when gatewaying mail from one mail network (say UUCP)
to another mail network (say SMTP/RFC822).

Many of these arguments about header rewriting seem to be a consequence of 
the Procrustes theory of mail handling.

Keith Moore			Internet: moore@utkcs2.cs.utk.edu
University of Tenn. CS Dept.	BITNET: moore@utkvx
107 Ayres Hall, UT Campus	UT Decnet: utkcs2::moore
Knoxville Tennessee 37996-1301	Telephone: +1 615 974 0822

huitema@mirsa.inria.fr (Christian Huitema) (07/27/89)

There was a slight component of provocation in my assertion that "it is
improper to rewrite any field, except perhaps the envelope". However, the
discussion pointed out clearly that:

* header rewriting should be avoided in vanilla UUCP systems, for there is
no such thing as a UUCP "mail header". The normal UUCP mail forwarding agent
is /bin/mail, called as /bin/rmail, and only looks at the enveloppe -- i.e.
its arguments.

* header rewriting should be avoided on Internet relays using the RFC-822
conventions, for addresses are names, and are absolutes.

I guessed that someone would raise, as David Herron, the gateway objection
"the ! type addresses translated to @ type addresses before they'll
be understood by RFC-land mailers". This raise several comments, like "shall
we use bang addresses in headers at all" and "how shall we translate the
bang addresses". 

My personal opinion is that the gateways should indeed perform all required
translations in the enveloppes, for "uux rmail" understand the "!" syntax,
and SMTP the "@" syntax; but leaving the text as it stands would has a lot
of advantages. For one thing, you should note that if a header is forwarded
(as a digest), it will never be rewritten; the digest can then be exploded,
and the message folded or replied to. And that will only work if the header
contains absolute addresses, in a commonly agreed format. Hence, the
guidelines:

* use domain names in headers,

* when replying to a message, derive a route from the domain name if that is
needed, and place it in the enveloppe.

And, yes, I must confess that some rewiting has to be done. Illegal
addresses, in the headers, shall be rewritten. For example, our gateways
would rewrite:

cc: what!ever!that!we!can!forget!bar!foo

into an absolute address:

cc: foo@bar	(if bar is a domain name)
cc: foo@bar.uucp (if bar is in the uucp map).

Similarly, we would try to remove all funny pseudo information inserted by
intermediate routers, in the form of "%" qualifiers. We have warned our
users more than one year ago that only plain domain addresses are supported,
and that placing a ! or a % in the addresses would remove all guaranties;
there was some humming and grumbling at first, but the situation is now much
cleaner.

Christian Huitema