Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Local-part length #204

Open
viruthagiri opened this issue Jan 21, 2020 · 5 comments
Open

Local-part length #204

viruthagiri opened this issue Jan 21, 2020 · 5 comments

Comments

@viruthagiri
Copy link

viruthagiri commented Jan 21, 2020

I noticed this part.

// The maximum total length of a user name or other local-part is 64
// however, here we double it, since a few major services don't respect that and go over
LimitLocalPart = 64 * 2

RFC 821 Section 4.5.3 says,

There are several objects that have required minimum maximum
sizes. That is, every implementation must be able to receive
objects of at least these sizes, but must not send objects
larger than these sizes.

      ****************************************************
      *                                                  *
      *  TO THE MAXIMUM EXTENT POSSIBLE, IMPLEMENTATION  *
      *  TECHNIQUES WHICH IMPOSE NO LIMITS ON THE LENGTH *
      *  OF THESE OBJECTS SHOULD BE USED.                *
      *                                                  *
      ****************************************************

        user

           The maximum total length of a user name is 64 characters.

RFC 2821 and 5321 says the same thing.

For receiving servers 64 characters local-part is a soft limit. i.e. A receiving server MUST support AT LEAST 64 maximum characters.

VERP and SRS requires more than 64 characters in the local-part.
https://en.wikipedia.org/wiki/Variable_envelope_return_path
https://en.wikipedia.org/wiki/Sender_Rewriting_Scheme

Original: <user@domain.com>

VERP: <bounces+user=domain.com@alioth-lists.debian.net>

SRS: <SRS0=2wQu=2C=alioth-lists.debian.net=bounces+user=domain.com@bounce.secureserver.net>

128 character may sound reasonable, it's not enough for SRS in some cases.

You can read my I-D which I published couple of months back. https://tools.ietf.org/html/draft-viruthagiri-email-address-length-01

My suggestion is stick to the overall length defined in LimitPath constant. i.e. 256. LimitLocalPart and LimitDomain should have 254 as value. i.e. You allocate 1 char for @ symbol and 1 for the minimum possible char in local-part or domain.

Or provide a config to override both LimitLocalPart and LimitDomain.

Gmail supports upto 900 characters in email address without any local-part or domain limitation.

Hope that helps.

@viruthagiri
Copy link
Author

@viruthagiri
Copy link
Author

Sorry. Here it is.

The labels must follow the rules for ARPANET host names. They must
start with a letter, end with a letter or digit, and have as interior
characters only letters, digits, and hyphen. There are also some
restrictions on the length. Labels must be 63 characters or less.

https://tools.ietf.org/html/rfc1034#section-3.5

@viruthagiri
Copy link
Author

Just to give some more info.

RFC 5321 says, The maximum total length of a domain name or number is 255 octets. My proposal removes that limitation in email address. It means if an email address length is 500 characters, then the maximum total length of a domain name is 498 ("n-2" characters).

I brought the RFC 1034 into the spec because I don't want people to think that they can have a 498 character string as domain without any dot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
@viruthagiri and others