Ray*_*Ray 12 rfc email-validation
为了找出电子邮件地址本地部分中的前导下划线是否可以接受,我会参考哪些RFC?
例: _johndoe@hotmail.com
当然,这个问题也适用于任何领先的特殊角色.
我在维基百科中找到了这一行,但在RFC本身内找不到任何引用.我在这里错过了什么吗?
本地部分电子邮件地址的本地部分可以使用任何这些ASCII字符RFC 5322第3.2.3节:
arx*_*arx 20
引用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.
Run Code Online (Sandbox Code Playgroud)
回到3.2.3你会得到:
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]
Run Code Online (Sandbox Code Playgroud)
[CFWS]表示评论或空白.
因此,电子邮件地址的第一部分可以是点原子,而点原子又以atext开头,可以是下划线.
是的,电子邮件地址可以以下划线开头.
| 归档时间: |
|
| 查看次数: |
6277 次 |
| 最近记录: |