Live data from Hacker News

What's up with all those equals signs anyway?

lars.ingebrigtsen.no

31–40 of 200 posts

Re: What's up with all those equals signs anyway?

#31

> 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?

Keep in mind that in ye olden days, email was not a worldwide communication method. It was more typical for it to be an internal-only mail system, running on whatever legacy mainframe your org had, and working within whatever constraints that forced. So in the 90s when the internet began to expand, and email to external organizations became a bigger thing, you were just as concerned with compatibility with all those legacy terminal-based mail programs, which led to different choices when engineering the systems.

Re: What's up with all those equals signs anyway?

#32

> 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?

Back in 80s-90s it was common to use static buffers to simplify implementation - you allocate a fixed size buffer and reject a message if it has a line longer than the buffer size. SMTP RFC specifies 1000 symbols limit (including \r\n) but it's common to wrap around 87 symbols so it is easy to examine source (on a small screen).

Re: What's up with all those equals signs anyway?

#33

> 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?

Mails are (or used to be) processed line-by-line, typically using fixed-length buffers. This avoids dynamic memory allocation and having to write a streaming parser. RFC 821 finally limited the line length to at most 1000 bytes.

Given a mechanism for soft line breaks, breaking already at below 80 characters would increase compatibility with older mail software and be more convenient when listing the raw email in a terminal.

This is also why MIME Base64 typically inserts line breaks after 76 characters.

Re: What's up with all those equals signs anyway?

#34
post #29

> 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?

As far as I can remember, most mail servers were fairly sane about that sort of thing, even back in the 90’s when this stuff was introduced. However, there were always these more or less motivated fears about some server somewhere running on some ancient IBM hardware using EBCDIC encoding and truncating everything to 72 characters because its model of the world was based on punched cards. So standards were written to…

Thanks, I really expected a tale from the 70's, but did not see punch cards coming :)

Re: What's up with all those equals signs anyway?

#35

> 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?

RFC822 explicitly says it is for readability on systems with simple display software. Given that the protocol is from 1982 and systems back then had between 4 and 16kb RAM in total it might have made sense to give the lower end thin client systems of the day something preprocessed.

Re: What's up with all those equals signs anyway?

#39
post #8
post #6

CLRF vs LF strikes again. Partly at least. I wonder why even have a max line length limit in the first place? I.e. is this for a technical reason or just display related?

I am just wondering how it is good idea for a sever to insert some characters into user's input. If a collegue were to propose this, i d laugh in his face It's just sp hacky i cant belive it's a real life's solution

Just wait until you learn what mess UTF-8 will turn your characters into. ;)
Post reply on HN