有效电子邮件地址的最大长度是多少? [英] What is the maximum length of a valid email address?

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

问题描述

有效电子邮件地址的最大长度是多少?有什么标准定义的吗?

What is the maximum length of a valid email address? Is it defined by any standard?

推荐答案

电子邮件地址不得超过 254 个字符.

An email address must not exceed 254 characters.

提交勘误.在线 提供了对任何给定地址的完整诊断.RFC 3696 的原始版本将 320 描述为最大长度,但 John Klensin 随后接受了一个不正确的值,因为路径被定义为

This was accepted by the IETF following submitted erratum. A full diagnosis of any given address is available online. The original version of RFC 3696 described 320 as the maximum length, but John Klensin subsequently accepted an incorrect value, since a Path is defined as

Path = "<" [ A-d-l ":" ] Mailbox ">"

所以 Mailbox 元素(即电子邮件地址)在它周围有尖括号以形成一个 Path,其最大长度为 254 个字符以将 Path 长度限制为 256 个字符或更少.

So the Mailbox element (i.e., the email address) has angle brackets around it to form a Path, which a maximum length of 254 characters to restrict the Path length to 256 characters or fewer.

RFC 5321 中规定的最大长度:

反向路径或正向路径的最大总长度为 256 个字符.

The maximum total length of a reverse-path or forward-path is 256 characters.

RFC 3696 已在此处更正.

RFC 3696 was corrected here.

人们应该特别注意针对 RFC 3696 的勘误.其中三个规范示例实际上是无效地址.

People should be aware of the errata against RFC 3696 in particular. Three of the canonical examples are in fact invalid addresses.

我整理了几百个测试地址,您可以在 http://www.dominicsayers.com 上找到这些地址/isemail

I've collated a couple hundred test addresses, which you can find at http://www.dominicsayers.com/isemail

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

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