• Welcome to Overclockers Forums! Join us to reply in threads, receive reduced ads, and to customize your site experience!

Email experts... (RFC help)

Overclockers is supported by our readers. When you click a link to make a purchase, we may earn a commission. Learn More.

kmfdm515

Member
Joined
Nov 24, 2002
Hi guys,

I am looking for a specific paragraph in an RFC that states what characters are allowable in email addresses - namely stating that the '&' character isn't allowed.

I found RFC 2822 - but I can't quite understand it... :eh?:

This section referring to 'atoms':

3.4.1. Addr-spec specification

An addr-spec is a specific Internet identifier that contains a
locally interpreted string followed by the at-sign character ("@",
ASCII value 64) followed by an Internet domain. The locally
interpreted string is either a quoted-string or a dot-atom. If the
string can be represented as a dot-atom (that is, it contains no
characters other than atext characters or "." surrounded by atext

characters), then the dot-atom form SHOULD be used and the
quoted-string form SHOULD NOT be used. Comments and folding white
space SHOULD NOT be used around the "@" in the addr-spec.

addr-spec = local-part "@" domain

local-part = dot-atom / quoted-string / obs-local-part

domain = dot-atom / domain-literal / obs-domain

domain-literal = [CFWS] "[" *([FWS] dcontent) [FWS] "]" [CFWS]

dcontent = dtext / quoted-pair

dtext = NO-WS-CTL / ; Non white space controls

%d33-90 / ; The rest of the US-ASCII
%d94-126 ; characters not including "[",
; "]", or "\"

The domain portion identifies the point to which the mail is
delivered. In the dot-atom form, this is interpreted as an Internet
domain name (either a host name or a mail exchanger name) as
described in [STD3, STD13, STD14]. In the domain-literal form, the
domain is interpreted as the literal Internet address of the
particular host. In both cases, how addressing is used and how
messages are transported to a particular host is covered in the mail
transport document [RFC2821]. These mechanisms are outside of the
scope of this document.

The local-part portion is a domain dependent string. In addresses,
it is simply interpreted on the particular host as a name of a
particular mailbox.



seems to be the part that explains it, but I can't see how. Can some kind techie break it down for me? :)
 
RFCs are written by engineers, and not meant to be understood by anyone else ;)

Looking at it quickly, it says that ASCII character 046 (&) is allowed in the headers:
2.2. Header Fields

Header fields are lines composed of a field name, followed by a colon
(":"), followed by a field body, and terminated by CRLF. A field
name MUST be composed of printable US-ASCII characters (i.e.,
characters that have values between 33 and 126, inclusive), except
colon. A field body may be composed of any US-ASCII characters,
except for CR and LF
. However, a field body may contain CRLF when
used in header "folding" and "unfolding" as described in section
2.2.3. All field bodies MUST conform to the syntax described in
sections 3 and 4 of this standard.
And investigating your quote, it you check out "3.2.4. Atom", I follow it to mean that "atext" (which contains the & symbol) exists in both "atom" "dot-atom" and "dot-atom-text", which is allowed in the email address.

Also, I created a quick email addy containing an &, and sent myself an email. Worked fine, no errors.
 
Ah...that makes sense...after I checked the section you mentioned it all came together. So there's many charatcers that technically are valid, but aren't permitted by a lot of mail providers because they might cause conflicts. (#,$,&,etc...)

Thanks su root...you're always so helpful. :thup:
 
Back