zlacker

[return to "What's up with all those equals signs anyway?"]
1. tibors+Qa[view] [source] 2026-02-03 11:09:26
>>todsac+(OP)
> We see that that’s a quite a long line. Mail servers don’t like that

Why do mail server care about how long a line is? Why don't they just let the client reading the mail worry about wrapping the lines?

◧◩
2. direwo+6j[view] [source] 2026-02-03 12:06:39
>>tibors+Qa
SMTP is a line–based protocol, including the part that transfers the message body

The server needs to parse the message headers, so it can't be an opaque blob. If the client uses IMAP, the server needs to fully parse the message. The only alternative is POP3, where the client downloads all messages as blobs and you can only read your email from one location, which made sense in the year 2000 but not now when everyone has several devices.

◧◩◪
3. Joker_+LU2[view] [source] 2026-02-04 01:05:12
>>direwo+6j
But everything after headers can (almost) be a blob. Just copy buffers while taking care to track CRLF and look if what follows is a space. In fact, you have to do it anyhow, because line-folding is allowed in headers as well! And this "chunking long lines" technique has been around since the 70s, when people started writing parsers on top of hand-crafted buffered I/O.
[go to top]