Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Leading underscores in an email address?

What RFC would I refer to in order to find out if a leading underscore in the local part of an email address is acceptable?

Example: [email protected]

Of course, this question can also apply to any leading special character.

I found this line in Wikipedia, but couldn't find any reference within the RFC itself. Did I miss something here?

Local part The local-part of the email address may use any of these ASCII characters RFC 5322 Section 3.2.3:

like image 609
Ray Avatar asked Feb 08 '12 20:02

Ray


People also ask

Can underscores be used in email addresses?

E-mail addresses are non-formated. This means that you can not underscore, superscript, bold etc.

Are underscores in emails unprofessional?

Matching your email domain with your website domain is important, but the first part of your email address is equally important. Avoid numbers and underscores if possible, and don't even consider using unprofessional, silly names.

What is underscore in an email address?

The underscore sign is mainly used to show a space where a space is not allowed, such as in internet usernames, email addresses and some computer programs. The underscore looks like a dash below the letters ( _ ). The underscore sign is also called: understrike.


1 Answers

Quoting RFC5322.

Section 3.4.1 says:

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.

Going back to 3.2.3 you get:

atext       =   ALPHA / DIGIT /    ; Printable US-ASCII
                   "!" / "#" /        ;  characters not including
                   "$" / "%" /        ;  specials.  Used for atoms.
                   "&" / "'" /
                   "*" / "+" /
                   "-" / "/" /
                   "=" / "?" /
                   "^" / "_" /
                   "`" / "{" /
                   "|" / "}" /
                   "~"

atom           =   [CFWS] 1*atext [CFWS]

dot-atom-text  =   1*atext *("." 1*atext)

dot-atom       =   [CFWS] dot-atom-text [CFWS]

[CFWS] means comment or whitespace.

So the first part of an email address can be a dot-atom, which in turn begins with an atext, which can be an underscore.

Yes, an email address can begin with an underscore.

like image 137
arx Avatar answered Oct 28 '22 23:10

arx