Are email addresses case sensitive?

后端 未结 5 1854
旧巷少年郎
旧巷少年郎 2020-12-04 05:21

I\'ve read that by standard first part of e-mail is case sensitive, however I\'ve tried to send e-mail to name@example.com, Name@example.com and

5条回答
  •  死守一世寂寞
    2020-12-04 06:20

    From RFC 5321, section 2.3.11:

    The standard mailbox naming convention is defined to be "local-part@domain"; contemporary usage permits a much broader set of applications than simple "user names". Consequently, and due to a long history of problems when intermediate hosts have attempted to optimize transport by modifying them, the local-part MUST be interpreted and assigned semantics only by the host specified in the domain part of the address.

    So yes, the part before the "@" could be case-sensitive, since it is entirely under the control of the host system. In practice though, no widely used mail systems distinguish different addresses based on case.

    The part after the @ sign however is the domain and according to RFC 1035, section 3.1,

    "Name servers and resolvers must compare [domains] in a case-insensitive manner"

    In short, you are safe to treat email addresses as case-insensitive.

提交回复
热议问题