having colon in from name (henrik:gemal) make wrong from header

RESOLVED WORKSFORME

Status

RESOLVED WORKSFORME
16 years ago
10 years ago

People

(Reporter: bugzilla, Assigned: mscott)

Tracking

Trunk
x86
Windows 2000

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

16 years ago
if you set up an account which has the following from name:
henrik:gemal

and send a mail the From header then looks something like this when you recieve
a mail:
From: henrik@pfepc.post.tele.dk:gemal <no@spam.com>

somehow the SMTP server is inserted into the from header!

20030310
(Reporter)

Comment 1

16 years ago
it's something that the SMTP server inserts. Should we encode the :
?
(Reporter)

Comment 2

16 years ago
Outlook Express doesn't have this problem since it puts the names inside quotes:
From: "henrik:gemal" <no@spam.com>

while Mozilla produces this header:
From: henrik:gemal <no@spam.com>
(Reporter)

Comment 3

16 years ago
Reading RFC822 I think having an colon in an fromname is illegal. Mozilla should
quote the name if the Fromname as a colon!

Comment 4

14 years ago
This is also true for the "To/Cc" headers if the colon ispresent in Address
Book's name field.

Comment 5

14 years ago
(In reply to comment #3)
> Reading RFC822 I think having an colon in an fromname is illegal.

Not exactly.  A colon in the name should be parsed as the beginning of an RFC822 
group.  With:
  henrik:gemal <hg@wherever.tld>
"henrik" would be the group name and "gemal <hg@wherever.tld>" would be the 
first address in the group.  This address would still be illegally formed, 
however, since the group (which may include several comma-separated addresses) 
is supposed to end with a semicolon.

Note that Mozilla does not parse the groups syntax correctly even when well-
formed; see bug 83521, bug 110605.


> Mozilla should quote the name if the Fromname as a colon!

Since the colon is legal RFC822 syntax, you should be responsible for quoting it 
yourself, just as if you wanted the name to include an @ sign:
  "henrik@gemal" <hg@wherever.tld>
Status: NEW → RESOLVED
Last Resolved: 14 years ago
Resolution: --- → WORKSFORME
Product: MailNews → Core

Comment 6

13 years ago
*** Bug 324444 has been marked as a duplicate of this bug. ***
*** Bug 362581 has been marked as a duplicate of this bug. ***
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.