Why you can’t use all 320 characters in an email address

What is the maximum size of an email address? I was giving it some thought this week and after a little searching I realised it was a tricky one.

Several different RFCs have over time defined how an email address is built up in the SMTP protocol; 821, 2821 (update by 5336 and later on by 6531), 3696 and 5321) The latest RFC for SMTP (5321) defines the following constraints for an email address:

user 64 characters
@ 1 characters
domain 255 characters

That would give a maximum length of 320 characters (64+255+1=320). So, that’s it, right? Wrong!

SMTP also defines that the maximum length for the address field is 256 characters. But that’s not the end of it. The address will also be encapsulated with < and > when being used in the protocol, thus leaving only 254 characters for the actual address.

Now notice that a valid domain still can be 255 characters but not in a valid email address.