Is there a limit of the length of users email address?

Nextcloud version : 17.0.5 via Docker fpm image.

One of the users we need to create has a very long email (84 characters).
When we enter it in the user admin page and validate, we have a generic error.

Is there a size limit in the code ?
I’ve seen that in the database, it is not a specific column, but a data TEXT in the oc_account table.

I’ve also seen that the RFC3696 specify a 64 character max before the @, and we have a bit more.

But, the response I have from my boss is, it’s working as is for several years ! Clients knows that email…

So, is there a way to accept longer emails, via settings ? In the code ? Where ?

Thanks for reading !

Interesting question?

Maybe @juliushaertl knows it?

We use to validate the email address, so that limit from the RFC is kicking in here.

1 Like

That limit is a maximum of 64 characters (octets) in the “local part” (before the “@”) and a maximum of 255 characters (octets) in the domain part (after the “@”) for a total length of 320 characters. However, there is a restriction in RFC 2821 on the length of an address in MAIL and RCPT commands of 254 characters.
(RFC 3696)

Thanks for all !

I finally manage to make them use a shorter alias.

1 Like

That is exactly what I thought :slight_smile: