[net.unix] From:, Mail, and sendmail

phil@amd.UUCP (Phil Ngai) (07/11/84)

When mail passes through a non-sendmail site, the From: line
is not updated and becomes incorrect. But Berkeley Mail uses
it to form the return address if you do a "r" command.

How have others dealt with this problem?

	Phil
-- 
 From Joe's Foo bar and grill
 Phil Ngai (408) 982-6554
 UUCPnet: {ucbvax,decwrl,ihnp4,allegra,intelca}!amd!phil
 ARPAnet: amd!phil@decwrl.ARPA

dave@uwvax.ARPA (07/12/84)

You will notice (if you have source) that 4.2bsd Mail will take
the 'Reply-to:' field instead of 'From:' if the former exists.

A side point.  If the non-BSD site messes up the 'From:' line,
shouldn't the site in question be notified of their actions?

-- 
Dave Cohrs @ wisconsin
...!{allegra,heurikon,ihnp4,seismo,ucbvax,uwm-evax}!uwvax!dave
dave@wisc-rsch.arpa

guy@rlgvax.UUCP (Guy Harris) (07/13/84)

> From: phil@amd.UUCP (Phil Ngai)

> When mail passes through a non-sendmail site, the From: line
> is not updated and becomes incorrect. But Berkeley Mail uses
> it to form the return address if you do a "r" command.

> From: dave@uwvax.ARPA

> You will notice (if you have source) that 4.2bsd Mail will take
> the 'Reply-to:' field instead of 'From:' if the former exists.

We deal with it by using path aliasing and sending mail to "joeblow@foo.UUCP".
Most of the time, that works; when it doesn't, the user does have to
construct the path themselves (using ~h to monkey with the "To:" field),
but that's fairly rare.

"Reply-to:" was, I believe, intended for use with messages sent to
distribution lists, so the whole list wouldn't see the replies, so it isn't
a solution to the problem.  Besides, the non-"sendmail" sites aren't likely
to properly update "Reply-to:" if they don't update "From:".  The problem
is somewhat one of relative (UUCP "bang") vs. absolute addressing.  I
shouldn't have to know or care how a mail message got here; getting a reply
back is the responsibility of the mail system.  Hopefully, the UUCP project
will clear up these problems, at least for participating sites.

> A side point.  If the non-BSD site messes up the 'From:' line,
> shouldn't the site in question be notified of their actions?

Yes, if you consider RFC822 compliance to be everybody's responsibility and
you consider not properly updating the "From:" field to imply non-compliance
with 822.  However, not everybody out there can get "sendmail" (it's not
a BSD vs. non-BSD question; lots of non-BSD sites run "sendmail") and not all
of them are really better off going through the trouble to get and run
"sendmail" (it does impose a cost - see the paper on 4.2BSD performance from
Leffler, McKusick, et. al. from the SLC USENIX).

	Guy Harris
	{seismo,ihnp4,allegra}!rlgvax!guy

dave@uwvax.ARPA (07/13/84)

> We deal with it by using path aliasing and sending mail to "joeblow@foo.UUCP".

Unfortunately, not everyone uses path aliasing either (the uw for one).
Not that we wouldn't like to, its just that we never got the software.

> "Reply-to:" was, I believe, intended for use with messages sent to
> distribution lists, so the whole list wouldn't see the replies, so it isn't
> a solution to the problem.  Besides, the non-"sendmail" sites aren't likely
> to properly update "Reply-to:" if they don't update "From:".

I sit corrected here.

Another plan of attack:  uucp sites *should* update the UN*X 'From ' line
correctly.  A BSD site will probably also be running rmail (the 4.2 rmail
is even portable to 2.9) and will reconstruct a 'correct' 'From ' line from
those contained in the header.  It could easily be modified to fix the 'From:'
line also.  Obviously, if some site messes up the 'From ' line, there isn't
much hope here either.  A non-BSD site just takes the address in the 'From '
line and replies to this address, doesn't it (assuming the site runs some
kind of UN*X)?  This should also get the reply to the right place.
-- 
Dave Cohrs @ wisconsin
...!{allegra,heurikon,ihnp4,seismo,ucbvax,uwm-evax}!uwvax!dave
dave@wisc-rsch.arpa

rcc@imsvax.UUCP (07/13/84)

>When mail passes through a non-sendmail site, the From: line
>is not updated and becomes incorrect. But Berkeley Mail uses
>it to form the return address if you do a "r" command.

>How have others dealt with this problem?

>	Phil

Bitch a lot.  Seriously, though.  I posted a request for this fix a
while back figuring that it's such an *obvious* bug that someone must
have fixed it long ago.  Wrongo.  There may be a way to take care of it
if you're running a BSD site.  I noticed that in all the machines that
I've worked on (all BSD) a "From" line at the top of the message is
constructed correctly.  The problem is that reply uses the "From:"
field instead of the "From" at the top.  Unfortunately, I haven't had
time to take a good look at the problem.  I usually alias the people I
mail to most, and the site I'm going back to at Princeton (in Sept.)
has pathaliasing so for me this is only a temporary problem anyway.
Good luck...

-- 

The preceding message was brought to you by --

		Ray Chen

UUCP:	umcp-cs!eneevax!imsvax!rcc

roots@cbhydra.uucp (07/13/84)

This all assumes that the right thing to do is for each hop to update
the From: line from, say
	From: daemon!root
to
	From: tektronix!daemon!root
if your machine is called "tektronix".  However, nothing in RFC822
says this change is supposed to be made.  In fact, both of these
lines are illegal 822 because there is no @ in them.  If we were
conforming properly to 822, what we would do is
	From: root@daemon.tektronix.UUCP
to
	From: root@daemon.tektronix.UUCP
If it's done right, there's no need to change.  Furthermore, if I
send out a message with a from line like this and somebody turns it into
	From: tektronix!root@daemon.tektronix.UUCP
I'm going to get very upset - this is a blatent violation of 822 and
also breaks the message.

I don't understand why sendmail makes this change anyway.  The previous
system was that the From<space> line had the ! path and the From: line,
if any, was a legal RFC822 line.  Lines like
	From: tektronix!daemon!root
are not legal 822 lines.

Please do not take the above as picking on tektronix, I'm just grabbing
an example out of thin air.  It can probably be argued that tektronix
is one of the few machines on the UUCP net that conforms to RFC822 in
this respect.

pag@hao.UUCP (07/14/84)

uwvax!dave:
> Another plan of attack:  uucp sites *should* update the UN*X 'From ' line
> correctly.  A BSD site will probably also be running rmail (the 4.2 rmail
> is even portable to 2.9) and will reconstruct a 'correct' 'From ' line from
> those contained in the header.  It could easily be modified to fix the 'From:'
> line also.  Obviously, if some site messes up the 'From ' line, there isn't
> much hope here either.  A non-BSD site just takes the address in the 'From '
> line and replies to this address, doesn't it (assuming the site runs some
> kind of UN*X)?  This should also get the reply to the right place.

The problem, Dave, is NOT sites messing up the "From " line, but rather
Berkeley Mail uses the "From: " line in preference to it (since "From: "
complies with RFC822, and "From " does not).  Non sendmail sites which
don't update "From: " cause it to become incorrect.  I posted a hack to
Berkeley Mail for this a few weeks ago, if anyone still has it online.
If not, I can resurrect it.

--peter gross
hao!pag

phil@amd.UUCP (Phil Ngai) (07/14/84)

I think David is saying you can either hack Mail to ignore From:
and use From or you can hack rmail to update the From: line with
the correct information in the From line. This should always be
safe since rmail is only called from uux anyway. This has the
added advantage that it is possible for the From: line to get
fixed by passing through a site with a hacked rmail.

-- 
 From Joe's Foo bar and grill
 Phil Ngai (408) 982-6554
 UUCPnet: {ucbvax,decwrl,ihnp4,allegra,intelca}!amd!phil
 ARPAnet: amd!phil@decwrl.ARPA

eric%ucbarpa@UCB-VAX.ARPA (08/11/84)

From:  Eric Allman <eric%ucbarpa@UCB-VAX.ARPA>

The problem with using the UNIX-style "From" line as a return address
is that it is not necessarily the sender of the message.  It corresponds
to the "Return-Path:" field in Arpa-land, which is really the address
to send delivery errors to.

In UNIX these have traditionally been the same (he who sends the mail
gets the errors), but that is changing.  Several sites now change that
address when they forward messages to a list.  For example, mail to
"INFO-UNIX@BRL-VGR.ARPA" is resent "From INFO-UNIX-REQUEST@BRL-VGR.ARPA".

My belief is that the "correct" solution is to eliminate routing from
the addresses, so that it would not be necessary to rewrite headers
on the fly.  For example, a reasonable address would be "eric@ucbvax.UUCP"
no matter where you were sitting on the net.  [Peter Honeyman would
accuse me of being an at-ist (he proudly admits to being a bang-ist),
but you can't have everything.]  The "uucp project" is putting together
software now that appears to have this functionality.

eric