Re: [Exim] From Header format

Etusivu
Poista viesti
Vastaa
Lähettäjä: Philip Hazel
Päiväys:  
Vastaanottaja: Dave C.
Kopio: Russell Wilton, exim-users
Aihe: Re: [Exim] From Header format
On Wed, 3 Jul 2002, Dave C. wrote:

> >     From: Russell Wilton <wilton@???>  (Authenticated)

>
> This format is not valid.


Actually, it is. Comments may appear in parentheses almost anywhere in a
mail header. These examples come from RFC 2822:

-----------------------------------------------------------------------
From: Pete(A wonderful \) chap) <pete(his account)@silly.test(his host)>

To:A Group(Some people)
     :Chris Jones <c@(Chris's host.)public.example>,
         joe@???,
  John <jdoe@???> (my dear friend); (the end of the group)


Cc:(Empty list)(start)Undisclosed recipients :(nobody(that I know)) ;
-----------------------------------------------------------------------

> You can have one of the following (but not both) forms:
>
>
> From: "arbitarary text" <valid@???>
>
> or
>
> From: valid@??? (arbitrary text)


No, you can have either form, and many more besides. Mind you, I suspect
some mail-handling software will break on the more esoteric examples.
(That's a polite way of saying "it's a programmer's nightmare".)

> Note that the second form is often rewritten to the first by many modern
> apps..


True. There seems to be some consensus that the user's name should go in
the "phrase" part of the address, rather than in a header line comment.
Maybe this is because you don't need the quotes unless that text
contains special characters. Thus, I can use

From: Philip Hazel <ph10@???>

--
Philip Hazel            University of Cambridge Computing Service,
ph10@???      Cambridge, England. Phone: +44 1223 334714.