[comp.bugs.4bsd] BSD 4.2 Mail not RFC822-compliant?

fritz@unocss.UUCP (Tim Russell) (12/09/88)

Hi all,

    I recently acquired the MM mailer that Columbia has ported to Unix
(it's in beta-test), and discovered a bug, for lack of a better word,
in the Berkeley mail program.

    First off, let me set things up: this is on a Sequent Balance 8000,
running Dynix 2.1.1 (BSD 4.2 and System V.2 together).  I've also tried
this on a Vax 8200 running Ultrix 2.3.

     Here's the deal:  MM sends out messages with "From" headers of the
form:

          From: Real Name <address.domain>

which, I have come to find out, is used as an example throughout RFC822.
The specific they use is "From: George Jones <Jones@Group.Org>".

     When I send a message out from MM to myself, and read and reply to
it, however, Berkeley mail generates an extra, totally wrong, recipient.
Here is a log of the Berkeley mail session (thanks to screen):

--------------------
Mail version 2.18 5/19/83.  Type ? for help.
"/usr/spool/mail/fritz": 1 message 1 new
>N  1 fritz@unocss.unl.edu Thu Dec  8 19:16  10/241 "Test message."
&
Message  1:
From fritz Thu Dec  8 19:16:19 1988
Date: Thu, 8 Dec 1988 19:15:50 CST
From: Tim Russell <fritz@unocss.unl.edu>
To: fritz
Subject: Test message.
Message-Id: <CMM.0.88.597633350.fritz@unocss.unl.edu>
Status: R

This is a test message to demonstrate.


& reply
To: unl:fritz@edu fritz@unocss.unl.edu
Subject: Re:  Test message.

--------------------

Notice the "To" line in the reply above?  This is, as you can see,
nowhere in the original message.  According to RFC822, when an address
of the form "<address>" is included in the header line, everything else
should be ignored and this should be used as the address.

    The Ultrix mailer (fergvax.unl.edu) generated this as the "To"
line under the same circumstances:

        To: fritz@fergvax.unl.edu fritz@fergvax.unl.edu

    Interestingly enough, when I tell MM to put my name in quotes, as in:

          From: "Tim Russell" <fritz@unocss.unl.edu>

neither of the mailers I tried had any problem at all.  Wierdness abounds.
Also, the problem can be fixed by including a "Reply-To" header, not
of the same format, of course.

    People at Columbia tell me they have never had any problem of this kind.

    So, can anyone tell me what could be causing this?  Is this a common
problem?  Does Berkeley know about it?  Has it been fixed?

    Sorry for being so verbose, but I wanted to make the problem clear.
Thanks for any help anyone can give me!

-- 
---------------------------------+--------------------------------------------
 Tim Russell, Computer Operator  | Internet: fritz@fergvax.unl.edu
 Campus Computing                | Bitnet:   russell@unoma1
 University of Nebraska at Omaha | UUCP:     uunet!btni!unocss!fritz

arnold@emory.uucp (Arnold D. Robbins {EUCC}) (12/13/88)

In article <555@unocss.UUCP> fritz@unocss.UUCP (Tim Russell) writes:
>From fritz Thu Dec  8 19:16:19 1988
>Date: Thu, 8 Dec 1988 19:15:50 CST
>From: Tim Russell <fritz@unocss.unl.edu>
>To: fritz
>Subject: Test message.
>Message-Id: <CMM.0.88.597633350.fritz@unocss.unl.edu>
>Status: R
>
>This is a test message to demonstrate.
>
>& reply
>To: unl:fritz@edu fritz@unocss.unl.edu
>Subject: Re:  Test message.

The problem is that the To: address does not have an "@dom.ain" part.
For reasons I was not able to pin down, both the To: and the From:
address need to be either fully domain'ed or non-domain'ed ("fritz")
but having mixtures produces this problem.

/usr/ucb/Mail very badly needs an overhaul; the AT&T folks basically
have already done it, and called the result mailx.  It is interesting to
note that Sun's /usr/ucb/Mail is actually mailx.

The way I fixed things was to have my sendmail always put a domain,
even on mail from users on the same machine to each other.  Mail was
just too hard to fix. Sigh.
-- 
Arnold Robbins -- Emory University Computing Center
DOMAIN:	arnold@unix.cc.emory.edu
UUCP:	{ decvax, gatech, skeeve }!emory!arnold		BITNET:	arnold@emoryu1
PHONE:	+1 404 727-7636		FAX:	+1 404 727-2599

ronc@fai.UUCP (Ronald O. Christian) (12/14/88)

>The problem is that the To: address does not have an "@dom.ain" part.
>For reasons I was not able to pin down, both the To: and the From:
>address need to be either fully domain'ed or non-domain'ed ("fritz")
>but having mixtures produces this problem.

I just performed the same experiment (Sequent Symmetry running
Dynix 3.0.something.... 12, I think) and did not see the problem.

>The way I fixed things was to have my sendmail always put a domain,
>even on mail from users on the same machine to each other.

Yeah, I just looked again, and sendmail at our site does exactly
the same thing.  My network administrator is not here right now,
so I can't say what he might have done (if anything) to fix the
problem.  I suspect a minor change to sendmail.cf.

>/usr/ucb/Mail very badly needs an overhaul; the AT&T folks basically
>have already done it, and called the result mailx.

The AT&T salesperson pushed mailx really hard as a clean rewrite of berkeley
Mail, but our copy (SysV on a Vax 11/780) dumped core randomly and frequently.
Perhaps they've come out with something since that works?

>It is interesting to
>note that Sun's /usr/ucb/Mail is actually mailx.

With how much work done by Sun??  At least the network stuff must
have been added by Sun -- AT&T has only recently acknowledged the
existance of SMTP mail.


				Ron
-- 

      Ronald O. Christian (Fujitsu America Inc., San Jose, Calif.)
      {amdahl, pyramid, sun, unisoft, uunet}!fai!ronc -or- ronc@fai.com

leres@ace.ee.lbl.gov (Craig Leres) (12/14/88)

(Followups to ... uh ... gee, so many groups to choose from ... uh ...
comp.mail.headers, yeah, that's the ticket.)

Arnold D. Robbins writes:
> For reasons I was not able to pin down, both the To: and the From:
> address need to be either fully domain'ed or non-domain'ed ("fritz")
> but having mixtures produces this problem.

If the recipient is non-local, then all addresses in the message
(including the sender) must be domainized. Otherwise, the recipient
might have a difficult time replying to the message.

		Craig

guy@auspex.UUCP (Guy Harris) (12/14/88)

>The problem is that the To: address does not have an "@dom.ain" part.
>For reasons I was not able to pin down, both the To: and the From:
>address need to be either fully domain'ed or non-domain'ed ("fritz")
>but having mixtures produces this problem.

I think part of the problem may be that the 4.2BSD version of Mail got
confused by the "." when it constructed the address for the reply; it
may think that "." is a Berknet addressing character or something.  This
may be fixed in the 4.3BSD version.

>/usr/ucb/Mail very badly needs an overhaul; the AT&T folks basically
>have already done it, and called the result mailx.  It is interesting to
>note that Sun's /usr/ucb/Mail is actually mailx.

I don't know that "mailx" is a complete overhaul; they added a bunch of
stuff, and may have cleaned up some things, but one thing they didn't
touch was the address parsing.  The 4.2BSD "Mail" and S5R2 "mailx" had a
parser that claimed to be an RFC733 parser; the 4.3BSD "Mail" and S5R3
"mailx" picked up an updated parser I did that claims to be an RFC822
parser, although there are still some holes in it.

The generation of "unl:fritz@edu" is, I suspect, due to the problem I
cited above.  However, the SunOS 4.0 "Mail", which is derived from the
S5R2 "mailx" but has a bunch of 4.3BSD "Mail" and other fixes, including
my updated parser, still generates two "fritz@unocss.unl.edu" in the
"To:" line when you do "replyall".

guy@auspex.UUCP (Guy Harris) (12/15/88)

>The AT&T salesperson pushed mailx really hard as a clean rewrite of berkeley
>Mail, but our copy (SysV on a Vax 11/780) dumped core randomly and frequently.
>Perhaps they've come out with something since that works?

Calling "mailx" a "rewrite" of "Mail" is incorrect.  The S5R2 "mailx" is
basically an *enhanced* version of a "Mail" of somewhere between 4.1BSD
and 4.2BSD vintage; the stuff they added is obviously new, but the
4.xBSD-derived stuff is pretty much unchanged.  The S5R3 one may have
changed more, but I still wouldn't call it a "rewrite".

>>It is interesting to
>>note that Sun's /usr/ucb/Mail is actually mailx.
>
>With how much work done by Sun??  At least the network stuff must
>have been added by Sun -- AT&T has only recently acknowledged the
>existance of SMTP mail.

Basically, stuff from the 4.2BSD (and, later, 4.3BSD) "Mail" was merged
back into the S5R2 "mailx" to make the SunOS "Mail".  Among the stuff
merged back was the use of "sendmail" to actually deliver mail, hence
the support for SMTP or anything else you get "sendmail" to support.  A
bunch of other miscellaneous stuff was added as well.

csg@pyramid.pyramid.com (Carl S. Gutekunst) (12/15/88)

In article <555@unocss.UUCP> fritz@unocss.UUCP (Tim Russell) writes:
>... and discovered a bug, for lack of a better word, in the Berkeley mail
>program.
>
>... this is on a Sequent Balance 8000, running Dynix 2.1.1....

To make a long story short, this is little a bug in the 4.2BSD version of
Mail. Get your machine upgraded to Dynix 3.n, which uses the 4.3BSD version
of Mail.

<csg>

avolio@decuac.dec.com (Frederick M. Avolio) (12/15/88)

Yes, the 4.2 Mail program did have some code in it which assumed that "."
was akin to an "@".  I recall finding and fixing this in a version of
ULTRIX a while back.  If you have the code the fix is somewhat 
straightforward.  I mean if I could find and fix it...

Fred

hanst@htsa.uucp (Hans Trompert) (12/15/88)

In article <555@unocss.UUCP>, fritz@unocss.UUCP (Tim Russell) writes:
> Hi all,
> 
>     I recently acquired the MM mailer that Columbia has ported to Unix
> (it's in beta-test), and discovered a bug, for lack of a better word,
> in the Berkeley mail program.
> 
>     First off, let me set things up: this is on a Sequent Balance 8000,
> running Dynix 2.1.1 (BSD 4.2 and System V.2 together).  I've also tried
> this on a Vax 8200 running Ultrix 2.3.

Greetings,
We too have a Sequent Balance 8000, and we are running Dynix V3.0.4.
We have never used the original mail, because we were told there are many
problems using RFC822 mail headers. So we use RSMTP instead (originally
written by Jack Jansen CWI Amsterdam Netherlands, uunet!mcvax!piring!jack or
jack@cwi.nl). RSMTP (Realy Simple Mail Transfer Program) 
pretends to understand internet addresses, but what it
does is just converting these addresses to uucp-like addresses: jack@cwi.nl
becomes cwi.nl!jack. Installing RSMTP is rather straight forward, a manual
is included, but you can also ofcourse examine the sources. For those who
are interested we are willing to post those sources.


Hans Trompert HTS "A" Amsterdam Netherlands
--> hanst@htsa.uucp
--> uunet!mcvax!htsa!hanst

fletcher@cs.utexas.edu (Fletcher Mattox) (12/15/88)

In article <51056@pyramid.pyramid.com> csg@pyramid.UUCP (Carl S. Gutekunst) writes:

>To make a long story short, this is little a bug in the 4.2BSD version of
>Mail. Get your machine upgraded to Dynix 3.n, which uses the 4.3BSD version
>of Mail.

To make a short story (slightly) more accurate, n > 0.4.
DYNIX 3.0.4 still uses the the 4.2 Mail. 

Fletcher

lindberg@cs.chalmers.se (Gunnar Lindberg) (01/07/89)

In article <555@unocss.UUCP> fritz@unocss.UUCP (Tim Russell) writes:
    > ...
    >From: Tim Russell <fritz@unocss.unl.edu>
    >To: fritz
    >
    >& reply
    >To: unl:fritz@edu fritz@unocss.unl.edu

I hope I haven't missed the point completely, but this used to happen
here too. It seems like the routine "map()" in "src/ucb/Mail/names.c"
does a lot of funny things with reply addresses, so we simply replaced
it with a "return;" (well, its content, of course). What "map()" was
really supposed to do I still don't know...

	Gunnar Lindberg