Skip site navigation (1)Skip section navigation (2)
Date:      23 Sep 1995 19:56:45 +0800
From:      peter@haywire.dialix.com (Peter Wemm)
To:        freebsd-current@freebsd.org
Subject:   Re: rmail and brain-dead mail systems .. patch enclosed
Message-ID:  <440slt$9bb$1@haywire.DIALix.COM>
References:  <43vj8q$iq$1@haywire.DIALix.COM>, <199509230738.JAA17272@uriah.heep.sax.de>

next in thread | previous in thread | raw e-mail | index | archive | help
j@uriah.heep.sax.de (J Wunsch) writes:
>As Peter Wemm wrote:
>> 
>> >As you can see, there's 34 times "joerg_wunsch" in the envelope
>> >address.  Pretty much useless, don't you think?
>> 
>> >And that's with the stock rmail(1), of course. :)
>> 
>> Ahh, yes.. but those 34 joerg_wunsch addresses were probably from
>> cvs-committers, ...

>No, for example the message i'm replying to does also contain such a
>"joerg_wunsch" in the From_ line:

>From joerg_wunsch Sat Sep 23 06:20:53 1995
>Received: (from uucp@localhost) by uriah.heep.sax.de (8.6.12/8.6.9) with \
> UUCP id GAA16983 for freebsd-current@uriah.heep.sax.de; Sat, 23 Sep 1995 \
> 06:20:53 +0200
>[serveral Received's]
>To: freebsd-current@FreeBSD.ORG
>Date: 23 Sep 1995 08:10:02 +0800
>From: peter@haywire.dialix.com (Peter Wemm)
>[...]
>Subject: Re: rmail and brain-dead mail systems .. patch enclosed
>Sender: owner-current@FreeBSD.ORG


You're confusing two things here...  You're looking at something
generated by "mail.local", not "rmail".

>The only hint to the actual sender is the Sender: header.  As the
>first Receveived header shows, the messages wasn't even directed to
>joerg_wunsch, but to freebsd-current@uriah.heep.sax.de instead.

I've not been able to check, because your machine is not answering
smtp interrogation.. :-) but what I suspect is happening is this:

On your machine, you have some exploder aliases set up.

freebsd-current@uriah.heep.sax.de aliased to the recipients, while
owner-freebsd-current@uriah... is aliased to "joerg_wunsch"

What is happening, is that you're receiving your uucp rmail job like
this:
  uux ... uriah!rmail freebsd-current
  From owner-current@freeBSD.ORG
  From: peter@haywire.dialix.com (peter wemm)
  To: freebsd-current@freebsd.org
  ....

What happens is that rmail takes the "From " line, and passes that to
sendmail with the "-f" option, meaning rmail is piping the message to
sendmail like this:
  sendmail -fowner-current@freebsd.org -oMrUUCP freebsd-current@uriah.heep.sax.de

Up until this sendmail is successfully delivered to your exploder, any
bounces go back to "owner-current@freebsd.org", aka jmb@freebsd.org

However, I think you have that owner-freebsd-current alias in there.
So, the original envelope sender is *replaced*, *BY SENDMAIL*, with
"joerg_wunsch".  This is in the sendmail docs and FAQ, and a
workaround on how to avoid your name being there.

Sendmail is recording the original envelope sender in the "sender:"
line, so you can see where it's come from.

>The From_ line (also refered to as the "Unix From line") is not part
>of RFC822.  In particular, UUCP mailers tend to trash this line, so
>it's entirely useless.  Sendmail immediately strips it from each
>incoming message and discards it.  (Look into the mail queue, you'll
>find a header and a data file for each queue entry, and the header
>file does not include this line.)

Yes, but UUCP is *not* RFC822. :-)

Yes, sendmail does discard it, because it's expecting rmail to
retreive it out and pass it in through the "-f" switch.  It's not
sendmail's job to understand a "uucp format" message.. :-) That's for
rmail to translate.

>Since the "envelope" addresses are often bogus, they should IMHO not
>be used.  Instead, RFC822 says:

>     4.4.4.  AUTOMATIC USE OF FROM / SENDER / REPLY-TO

>        For systems which automatically  generate  address  lists  for
>        replies to messages, the following recommendations are made:

>            o   The "Sender" field mailbox should be sent  notices  of
>                any  problems in transport or delivery of the original
>                messages.  If there is no  "Sender"  field,  then  the
>                "From" field mailbox should be used.

>            o   The  "Sender"  field  mailbox  should  NEVER  be  used
>                automatically, in a recipient's reply message.

>            o   If the "Reply-To" field exists, then the reply  should
>                go to the addresses indicated in that field and not to
>                the address(es) indicated in the "From" field.

>            o   If there is a "From" field, but no  "Reply-To"  field,
>                the  reply should be sent to the address(es) indicated
>                in the "From" field.

>        Sometimes, a recipient may actually wish to  communicate  with
>        the  person  that  initiated  the  message  transfer.  In such
>        cases, it is reasonable to use the "Sender" address.
>...

>I think, sendmail does it this way.

Yes.  Dont forget, this behaviour is very much clarified and
reinforced in later RFC's.  RFC822 is getting rather dated.  I think
RFC1123 (the host requirements RFC) says the mail system must handle
envelope addresses.

I've not seen the context of the bit of rfc822 that you've quoted, but
it looks to me like it's the MUA section, not the MTA section.  It's
saying that the envelope sender should not be used for personal
replies.  It's saying the envelope sender should be used for
transport/delivery initiated replies.  IMHO, "vacation" is a
"transport" notification, and *should* use the envelope sender, which
is what it currently does.

If you sent a message to freebsd-hackers, do you *want* to get (say) 6
vacation replies from people you've never heard of?  No...  It's the
list-owner's problem whether he decides to drop them off the mailing
list until they return and resubscribe.  There's no sense in wasting
network resources on somebody who's left a vacation message running
saying they've changed jobs and their new address is enclosed in the
reply.   Imagine the complaints if some user sent mail to -hackers,
and got one of those because the hacked vacation program on the remote
end used the "From: " line instead of the "From " line..  The originater
is totally powerless to do anything about it.

>vacation(1) is the last program i know that does not comply to RFC822.
>It should probably be rewritten to do a better job.  I cannot use it
>in its current form, and last time i've been using it, i've put a Perl
>wrapper around that generated the beloved From_ line out of the RFC822
>headers...

(My reading suggests it is quite compliant, because it's a
transport/delivery initiated message, not a personal/user initiated
message...) 

Hmm.. How have you changed your sendmail and sendmail.cf?  The
standard freebsd sendmail.cf generates a new "From " line as it pipes
it to vacation.

.forward:   "| cat > /tmp/mailfile"
% sendmail testuser
test
^D
% cat /tmp/mailfile
>From peter  Sat Sep 23 19:27:45 1995
Received: (from peter@localhost) by jhome.DIALix.COM (8.6.12/8.6.9) id TAA04373 for testuser; Sat, 23 Sep 1995 19:27:45 +0800
Date: Sat, 23 Sep 1995 19:27:45 +0800
From: Peter Wemm <peter>
Message-Id: <199509231127.TAA04373@jhome.DIALix.COM>
Apparently-To: testuser

test
% sendmail -fpresident@usa.org testuser
test2
^D
% cat /tmp/mailfile
>From president@usa.org  Sat Sep 23 19:30:58 1995
Received: (from peter@localhost) by jhome.DIALix.COM (8.6.12/8.6.9) id TAA04384 for testuser; Sat, 23 Sep 1995 19:30:58 +0800
Date: Sat, 23 Sep 1995 19:30:58 +0800
From: president@usa.com
Message-Id: <199509231130.TAA04384@jhome.DIALix.COM>
Apparently-To: testuser

test2

As you can see, sendmail has *generated* a "From " line for our
benefit.. :-)  mail.local will as well when it delivers it to the
mailbox.  Dont confuse these with what rmail wants..  It's unfortunate
that the meaning is overloaded...

You can change the Mprog mailer definition so that it doesn't include
the "From " line, but instead includes things like "Return-Path:" or
"Sender:" instead. 

An RFC822-style address isn't an easy thing to parse once several
styles of comments get in there.. :-)  They can get really UGLY.. :-)

As a side note, in SMTP, the envelope sender and recipient are passed
like this...
  MAIL From: <owner-current@freebsd.org>
  RCPT To: <freebsd-current@uriah.heep.sax.de>
It's no different to this:
  uux .... rmail uriah.heep.sax.de!freebsd-current
  From owner-current@freebsd.org .....

It does work very well on the whole, far better than you're giving it
credit for... :-)  (witness the amount of bounce jmb/mailman get on freefall,
and how much (zero!) bounce mail people get when sending to -current.)

However, as you say, there are some pretty horrible ways older systems
*mangle* it.  IMHO, SYSV mailers tend to be some of the worst offenders,
followed very closely by Suns.

-Peter

>-- 
>cheers, J"org

>joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/
>Never trust an operating system you don't have sources for. ;-)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?440slt$9bb$1>