ietf-822
[Top] [All Lists]

[ietf-822] Question about line folding and maximum line length

2021-05-06 08:52:31
Hello everyone,

I am implementing an e-mail client. I have to implement the SMTP
protocol, starting with the internet message format defined by RFC
5322[1].

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[2] 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?

2. The long line folding mechanism.
RFC 5322 section 2.2.3[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 ?

Regards,

[1] https://tools.ietf.org/html/rfc5322
[2] https://tools.ietf.org/html/rfc5322#section-2.1.1
[3] https://tools.ietf.org/html/rfc5322#section-2.2.3

-- 
Bryan Frimin
https://www.frimin.fr
bryan(_at_)frimin(_dot_)fr

_______________________________________________
ietf-822 mailing list
ietf-822(_at_)ietf(_dot_)org
https://www.ietf.org/mailman/listinfo/ietf-822