电子邮件地址中是否有下划线? [英] Leading underscores in an email address?

查看:353
本文介绍了电子邮件地址中是否有下划线?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将使用什么RFC来确定是否可以接受电子邮件地址本地部分中的前导下划线?

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?

示例: _johndoe@hotmail.com

当然,这个问题也适用于任何主要的特殊字符。

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

我在Wikipedia中找到了这一行,但是在RFC本身中找不到任何引用。我在这里错过了什么吗?

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

本地部分
电子邮件地址的本地部分可以使用以下任何ASCII字符RFC 5322第3.2节。 3:

推荐答案

引用RFC5322。

部分3.4.1说:

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.

回到3.2.3,您会得到:

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]表示注释或空格。

[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.

这篇关于电子邮件地址中是否有下划线?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆