-
Notifications
You must be signed in to change notification settings - Fork 123
Description
We are seeing incoming email that fail validation because the localpart is too long, e.g., mailSyntaxError: The email address is too long before the @-sign (37 characters too many).
The reference for this is RFC 5321 4.5.3.1.1.
We were surprised by the fact that these email actually made it all the way to us (our tools are behind the receiving email client) if they are truly invalid. According to the reference in RFC 5421:
There are several objects that have required minimum/maximum sizes.
Every implementation MUST be able to receive objects of at least
these sizes. Objects larger than these sizes SHOULD be avoided when
possible. However, some Internet mail constructs such as encoded
X.400 addresses (RFC 2156 [35]) will often require larger objects.
Clients MAY attempt to transmit these, but MUST be prepared for a
server to reject them if they cannot be handled by it. To the
maximum extent possible, implementation techniques that impose no
limits on the length of these objects should be used.
Based on this, it sounds like the size limits described there are in some sense optional. They "SHOULD" be avoided "when possible".
Currently, there appears to be no way to turn off or configure any of the length checks. If the size limits truly are as vague as it sounds, we think it would make sense for them to be somehow configurable.