On 5/6/2021 9:52 AM, Bryan Frimin wrote:
I am implementing an e-mail client. I have to implement the SMTP
protocol, starting with the internet message format defined by RFC
After reading the RFC, I found two points that are not clear to me.
1. The maximum line length.
RFC 5322 section 2.1.1 describes two possible line length limits. The
historical one, 78 characters, and the new one, 998 characters. Is the
historical limit still relevant for an email client in 2021, or can I
just use the new one?
For SMTP (RFC5321 et al) Internet Mail (RFC5322 et al )
transportation, MTA (client/server), 998+EOL is the requirement. EOL
is <CR><LF> (DOS-based easy to remember). If a line is ending as
Unix-based <LF> or MAC-based <CR>, then I/O translation must be taken
For DISPLAY purposes, the MUA, Mail User Agents, SMTP should at least
handle old school 80 columns, that meant 78+EOL. It was always tricky
to deal with column soft vs hard wraparounds ideas.
2. The long line folding mechanism.
RFC 5322 section 2.2.3 defines a folding mechanism for long header
fields. But it does define whether it is possible to fold a header field
name longer than the limit (yes it is an edge case, but it could
happen). And folding can only be done if a lexical token or a space is
present. So what about values without any separator ?
Serious? A Header Field Bame longer than the line limit? That would
instantly cause breakage somewhere. So I don't know off hand if the
doc makes a mention of the Header Field Name limit, but if not, this
is the group to make that clarification in the ABNF.
The reality is that there are remote hosting limits that are external
to RFC5822, perhaps even predated RFC5322 header fields, especially
the top header fields from the Host/User Mail Reader/Writer MUA
standpoint and for all telecommunications;
All others are network or some meta-related thing, perhaps, but there
are legacy and established systems that has limits based on display
designs. Much shorter than 998, How will any device display long
fields over 80 or extended graphically like 132 that the early smarter
Overall, there is no standard on displays, yet, because there are so
many different ways to do it. Smart Watches?
ietf-822 mailing list