[comp.mail.misc] Screwey 'r'eply addresses

fritchie@thor.stolaf.edu (Scott Fritchie; Systems Programmer) (03/19/89)

Ever since we joined the Internet, we've been having some problems with
using the 'r' reply command in with UCB mail.  Occasionally, the addresses
the reply comes up with are horribly scrambled.  Here is a sample message:

  From fritchie@agnes.acc.stolaf.edu Sat Mar 18 15:13:14 1989
  Received: from agnes.acc.stolaf.edu by thor; Sat, 18 Mar 89 15:13:09 -0600
  Received: by agnes.acc.stolaf.edu; Sat, 18 Mar 89 15:13:00 -0600
  Date: Sat, 18 Mar 89 15:13:00 -0600
  From: fritchie@agnes.acc.stolaf.edu
  Message-Id: <8903182113.AA11602@agnes.acc.stolaf.edu>
  To: fritchie
  Subject: Agnes test
  Status: RO
  
  foo

This looks like a fairly innocent message, but if you try to 'r'eply to it,
this is what 'mail' comes up with:

      5 fritchie@agnes.acc.stolaf.edu Sat Mar 18 15:13  12/384 "Agnes test"
  & r
  To: agnes.stolaf:fritchie@edu fritchie@agnes.acc.stolaf.edu
  Subject: Re:  Agnes test

I have NO idea where it comes up with the 'agnes.stolaf:fritchie@edu', but
it's not correct.  And it doesn't just happen at St. Olaf.  Here is another
message, mailed from here to umn-cs.cs.umn.edu, that confuses 'r'eply:

  >N  1 fritchie@thor.acc.stolaf.edu Sat Mar 18 14:28  11/413 "Reply test"
  & 
  Message  1:
  From fritchie@thor.stolaf.edu Sat Mar 18 14:28:53 1989
  Date: Sat, 18 Mar 89 14:26:26 -0600
  From: fritchie@thor.acc.stolaf.edu (Scott Fritchie; ACC @ St. Olaf College)
  To: stolaf
  Subject: Reply test
  
  ack
  
  & r
  To: thor.stolaf:stolaf@edu fritchie@thor.acc.stolaf.edu
  Subject: Re:  Header reply test

Everyone I know is very puzzled about why this is happening and why it only
happens some of the time.  Use of the 'R'eply to sender only command works
perfectly -- I have never seen it screw up.  I have done all of the work on
our Sendmail config. files; perhaps I've been doing something wrong when
revamping them.  Any help you could give would be greatly appreciated.
---
Scott Fritchie, Systems Programmer, St. Olaf College, Northfield, MN 55057
Email: fritchie@stolaf.edu -OR- ..{decvax,uunet}!stolaf.edu!fritchie
"Robbery, murder, bad breath, acne, drug addiction, sleep walking, profanity,
and losing car keys each happen more often at 85 degrees than any other
temperature.  That is why I live in Minnesota."

dheller@cory.Berkeley.EDU (Dan Heller) (03/20/89)

In article <1616@thor.acc.stolaf.edu> fritchie@thor.stolaf.edu (Scott Fritchie) writes:
>Ever since we joined the Internet, we've been having some problems with
>using the 'r' reply command in with UCB mail.  Occasionally, the addresses
>the reply comes up with are horribly scrambled.  Here is a sample message:

I am growing less and less sympathetic to those who still insist on using
ucb-Mail *and* complain about it.  There are far too many "better" mailers
out there that do things right that I feel that those who use Mail "get what
they deserve."  The world is full of different mailers that appeal to any kind
of interface you like -- there is MH, gnuemacs, Elm and of course my personal
favorite is Mush.  If you say, "but I like the Mail interface best" then use
Mush -- it can be made to look exactly like Mail, but doesn't have all the
bugs :-)

Dan Heller	<island!argv@sun.com>

kurt@ks.almaden.ibm.com (Kurt Shoens) (03/23/89)

In article <1616@thor.acc.stolaf.edu> fritchie@thor.stolaf.edu (Scott Fritchie) writes:
>Ever since we joined the Internet, we've been having some problems with
>using the 'r' reply command in with UCB mail.  Occasionally, the addresses
>the reply comes up with are horribly scrambled.  Here is a sample message:

Scott goes on to give an example replying to a message with...
   From fritchie@agnes.acc.stolaf.edu Sat Mar 18 15:13:14 1989
   To: fritchie
   (etc and so on)

Replying to this yields
   To: agnes.stolaf:fritchie@edu fritchie@agnes.acc.stolaf.edu

I think the phrase "every since we joined the internet" is the key clue.
Mail's trying to be clever and tack the "from" hostname onto the to:
addressee "fritchie." From looking at the code in mail (that horrible
dreck in optim.c) it seems that .'s are considered by mail to separate
significant parts of addresses (i.e., parts that mail should be fooling
with) and for domain style names, this is untrue.  In the file config.c,
there is an initialization of the string "metanet" which might be improved
by removing the . from the list.  Also, the reason that :'s drift into the
address has to do with the way mail preprocesses addresses with @'s in them.

In the name of thoroughness, I just tried this on my own copy of Mail
and duplicated the symptoms you described.  The change to the definition
of metanet in config.c produced the correct rewriting.

The R command doesn't alter the address at all; it just takes the address
that the message is from.  That's why you're not seeing any scrambling of
those addresses.

The rewriting of addresses by Mail as a Larger Issue was debated briefly
in this space a few weeks ago.  Some folks argue that you will be better
off if you cause sendmail to rewrite the To: and Cc: addresses so that
they are fully qualified.  In fact, the addresses have to be rewritten
this way to conform to RFC822 (and they new one, whose number I don't know)
anyway.  Then, rewriting of addresses on reply is not needed.  I think
that MH requires the addresses to be fully qualified for replies to work.
The advantages of having sendmail do the rewriting is that 1) sendmail's
mechanisms to rewrite are very flexible; and 2) sendmail's rewriting can
be changed without recompilation.

Kurt Shoens, IBM Almaden Research Center, SHOENS at ALMADEN

msir@uhura.cc.rochester.edu (Mark Sirota) (03/24/89)

In article <740@ks.UUCP> kurt@ibmarc.UUCP (Kurt Shoens) writes:
>In article <1616@thor.acc.stolaf.edu> fritchie@thor.stolaf.edu (Scott Fritchie) writes:

>> Ever since we joined the Internet, we've been having some problems with
>> using the 'r' reply command in with UCB mail.  Occasionally, the addresses
>> the reply comes up with are horribly scrambled.  Here is a sample message:

> Scott goes on to give an example replying to a message with...
>    From fritchie@agnes.acc.stolaf.edu Sat Mar 18 15:13:14 1989
>    To: fritchie
>    (etc and so on)
>
> Replying to this yields
>    To: agnes.stolaf:fritchie@edu fritchie@agnes.acc.stolaf.edu

Ahh, we have been having this problem as well, but I didn't realize that
this was a result of the same garbage as I complained about a little while
ago here.

> In the file config.c, there is an initialization of the string "metanet"
> which might be improved by removing the . from the list.
>
> The rewriting of addresses by Mail as a Larger Issue was debated briefly
> in this space a few weeks ago.

That was me.  I still maintain that rather than make Mail ignore dots, as
Kurt suggests, you should just completely remove the rewriting rules
altogether.  UCB Mail should just not be rewriting addresses at all.

This is easily done by commenting out the two calls to mapf() in
_respond() (cmd3.c).  mapf() calls netmap(), which is the particularly
evil function lurking in there.

In article <11283@pasteur.Berkeley.EDU> dheller@cory.Berkeley.EDU (Dan Heller) writes:
> I am growing less and less sympathetic to those who still insist on using
> ucb-Mail *and* complain about it.  There are far too many "better" mailers
> out there that do things right...

I agree.  And Mush rocks.  I refuse to use UCB Mail, but unfortunately
lots of my users do.  I don't use UCB Mail, but I certainly do complain
about it.
-- 
Mark Sirota - University of Rochester, Rochester, NY
 Internet: msir@cc.rochester.edu
 Bitnet:   msir_ss@uordbv.bitnet
 UUCP:     ...!rochester!ur-cc!msir