nmh-workers
[Top] [All Lists]

Re: [Nmh-workers] Length of the display name of an Email Address

2014-05-06 08:19:01
As for a practial limit ... good question!  I would guess that anything
over a kilobyte would be asking for trouble.

The RFC 5322 limit of 998 characters (excluding the trailing CRLF)
in a line would apply here, I believe.  A variable amount of that
would be available for the display name, taking into account the
field name, punctation, and the real address(es).

That's for a SINGLE line.  From §2.2.3 of RFC 5322:

   The process of moving from this folded multiple-line representation
   of a header field to its single line representation is called
   "unfolding".  Unfolding is accomplished by simply removing any CRLF
   that is immediately followed by WSP.  Each header field should be
   treated in its unfolded form for further syntactic and semantic
   evaluation.  An unfolded header field has no length restriction and
   therefore may be indeterminately long.

A display-name is a “phrase” in RFC 5322 parlance.  A phrase consists of
one or more “word”s.  So you could have as many words as you want as long
as you never exceeded the single-line size limit.  And as I read RFC 5322
more closely, I see that a “quoted-string” can contain folding white
space and can be folded, so you could in theory make one quoted-string
that was a megabyte (but I think you'd be asking for trouble if you
did that).

--Ken

_______________________________________________
Nmh-workers mailing list
Nmh-workers(_at_)nongnu(_dot_)org
https://lists.nongnu.org/mailman/listinfo/nmh-workers

<Prev in Thread] Current Thread [Next in Thread>