[comp.mail.headers] RFC-822 'phrase' question

markh@caen.engin.umich.edu (Mark Harris) (06/11/89)

I have noticed that a number of mailers will generate From: lines like:
  From: John Q. Public <JQP@MIT-AI.ARPA>
This is clearly wrong according to a strict interpretation of RFC-822,
since periods are not allowed in a 'phrase', unless they are part of a
'quoted-string', which must be enclosed in quotes.  Not only have I
found that several mailers use such syntax, but some RFCs as well!  (In
fact, the above line was taken from RFC-821, page 53.)  Is such syntax
acceptable, or should my mailer put quotes around all user names containing
periods?

On a related note, I have also seen the following header:
  In-Reply-To:  Your message of Tue, 30 May 89 15:49:35 EDT
Although it may look pretty, this header is also wrong according to RFC-822
since neither commas nor colons are allowed in a 'phrase'.  This header
would look a lot uglier if quotes were used, however.

Are all mailers that generate either of these two types of headers broken,
or am I missing something?  I know that there is a correction to the
RFC-822 'mailbox' definition in the Host Requirements RFC, but have there
been other changes that I missed?  Thanks in advance to anyone that can
enlighten me.

--
Disclaimer:  I speak only for myself.
Mark Harris <markh@caen.engin.umich.edu>

wunder@hp-ses.SDE.HP.COM (Walter Underwood) (06/22/89)

> I have noticed that a number of mailers will generate From: lines like:
>   From: John Q. Public <JQP@MIT-AI.ARPA>

A safe version of this is:

   From: (John Q. Public) JQP@MIT-AI.ARPA

In strict 822-land, the angle brackets are only allowed if there is a
route address, but the draft host requirements RFC amends the BNF to
allow that.  The above example could have angle brackets, but they
are not necessary.

wunder

7thson@daffy.slcs.slb.com (Chris Garrigues) (06/24/89)

In article <1760002@hp-ses.SDE.HP.COM> wunder@hp-ses.SDE.HP.COM (Walter Underwood) writes:
>> I have noticed that a number of mailers will generate From: lines like:
>>   From: John Q. Public <JQP@MIT-AI.ARPA>
>
>A safe version of this is:
>
>   From: (John Q. Public) JQP@MIT-AI.ARPA
>
>In strict 822-land, the angle brackets are only allowed if there is a
>route address, but the draft host requirements RFC amends the BNF to
>allow that.  The above example could have angle brackets, but they
>are not necessary.
>
>wunder

I don't see the problem with the other form.

Some of the rules from RFC822:
     authentic   =   "From"       ":"   mailbox  ; Single author
                 / ( "Sender"     ":"   mailbox  ; Actual submittor
                     "From"       ":" 1#mailbox) ; Multiple authors
                                                 ;  or not sender

 
     mailbox     =  addr-spec                    ; simple address
                 /  phrase route-addr            ; name & addr-spec
 
     route-addr  =  "<" [route] addr-spec ">"

     addr-spec   =  local-part "@" domain        ; global address

and a parse tree of the sample given above:
	From: John Q. Public <JPQ@MIT-AI.ARPA>	=>
	From: phrase <local-part@domain>	=>
	From: phrase <addr-spec>		=>
	From: phrase route-addr			=>
	From: mailbox				=>
	authentic


What's the problem?

Chris Garrigues,
7thSon@SLCS.SLB.COM

miller@uwovax.uwo.ca (Greg Miller) (06/26/89)

In article <399@linus.SLCS.SLB.COM>, 7thson@daffy.slcs.slb.com (Chris Garrigues) writes:
> and a parse tree of the sample given above:
> 	From: John Q. Public <JPQ@MIT-AI.ARPA>	=>
> What's the problem?

The problem is that unquoted periods in the name tag are not allowed
by RFC 822.

So the above should be written as -

        From: "John Q. Public" <JPQ@MIT-AI.ARPA>

//Greg Miller//