3 ms·
I hesitate to ask this because I don't want to minimize the contributions of all the people working on Thunderbird, but why is making an email client so difficu
by criddell 7y ago
I hesitate to ask this because I don't want to minimize the contributions of all the people working on Thunderbird, but why is making an email client so difficult?
- Alex3917 7y agoBecause in order to maintain backwards compatibility from 1971ish onwards, each new standard has been awkwardly shoehorned onto the previous standards. And even then lots of big email senders don't properly follow the standards, so displaying email correctly requires being able to discover and implement thousands of unwritten and undocumented rules.
- deleted 7y ago[deleted]
- petschge 7y agoThe IMAP standard is known to be vague in places and different servers implement it in different ways. Some server also have long standing bugs that a client has to deal with gracefully. And of course you still have to implement SMTP, POP3 and possible a bunch of different protocols for searching, address book and calendar synchronization.
- newscracker 7y agoIn the case of Thunderbird, there is also shared code with Firefox, and so any core architecture and design changes in Firefox necessitate that the same be adopted in Thunderbird too, as quickly as possible. The mail client code is also very old. Last I recall, there was a plan to rewrite it completely using web technologies.
- pizza234 7y ago> The mail client code is also very old The codebase in general is also quite a tangle, as newsgroups code (newsgroups are still supported!) is mixed with mail code. All past attempts to make the email composition window a tab, which is a deceivingly simple task, failed.
- jcranmer 7y agoEh, newsgroups aren't all that different from email. The newsgroup message format is the email message format, just slightly stricter, and newsgroups can largely be treated as read-only folders (especially if you can equate cross-posting to something like X-GM-UUID mapping a message between multiple folders). It also turns out that many mail clients already support yEnc and uuencode--I've seen email scanners scanning yEnc attachments before. The tangles come from poor separation of low-level protocol/parsing code with the front-end logic--there's no way to parse a message (or even decrypt it) without displaying it at the same time, for example.
- IdiocyInAction 7y agoMy university still uses newsgroups and everyone uses Thunderbird as a client for that reason. It honestly works surprisingly well.
- Mathnerd314 7y agoMostly it's just a lot of code. Notmuch only does index/search for email and it is 46k LOC (https://www.openhub.net/p/notmuch https://www.openhub.net/p/notmuch). Thunderbird in contrast is 1.2 million LOC (https://www.openhub.net/p/thunderbird https://www.openhub.net/p/thunderbird). A fair amount of that is detritus from being an ancient project, or else is shared with Firefox as the browser toolkit, but handling email and all the dialogs etc. are quite complicated. Mailspring uses Electron and is 218k LOC (https://www.openhub.net/p/mailspring/analyses/latest/languages_summary https://www.openhub.net/p/mailspring/analyses/latest/languag...). You get the idea And nobody wants to start a new one, because the majority of people use webmail or the mail app on their phone. Thunderbird is at 1% marketshare, although the sparkchart is weird suggesting measurement difficulties: https://emailclientmarketshare.com/ https://emailclientmarketshare.com/
- jcranmer 7y ago> Thunderbird is at 1% marketshare, although the sparkchart is weird suggesting measurement difficulties: https://emailclientmarketshare.com/ https://emailclientmarketshare.com/ Analytics is usually counted by displaying invisible remote HTTP images and looking at the user-agent of the HTTP request. Thunderbird blocks all HTTP requests in email by default for privacy reasons, which means it's systematically undercounted in these surveys.
- bo1024 7y agoI wrote a basic one, and I think the answer is that there are just so many moving parts (many of which I didn't attempt). - mail transfer and delivery (IMAP/POP3, SMTP) - organization, folders, tags, database, search, indexing, etc. Performance becomes a big issue. - Email threading (conversations) is a whole thing. - Email file format, MIME standards, parsing emails is a WHOLE thing. (What is an rfc822-formatted email and why I am getting them?) - For non-text email, need an entire HTML rendering engine. - The graphical user interface is not trivial, should be intelligently multithreaded. - More features: spam filtering, encryption/digital signatures. Vacation replies. Address book. Calendar integration is a whole (optional) thing. Todo-lists. - For some reason, Thunderbird has a live chat system. It also seems to be the kind of thing where the last 10-20% is a lot harder than the first 80%.
- jcranmer 7y agoEmail is hard (I wrote a blog series on it at http://quetzalcoatal.blogspot.com/search/label/email-hard http://quetzalcoatal.blogspot.com/search/label/email-hard, and I haven't even touched anything beyond the message format!). Some highlights: * The MIME and message format specifications are often implemented incorrectly (particularly whenever you deal with non-ASCII text!), so you need a lot of logic interpreting the mess that people think is a valid email. * IMAP is a database synchronization protocol that doesn't think it's a synchronization protocol, and isn't really well-suited for its tasks. That also means, once again, it's often implemented incorrectly, so you get to spend a lot of time working around server bugs. (There was one message where I managed to get 4 different results from 4 different servers on what its structure was!). * The big webmail services (e.g., Gmail) often use their own extensions that they really want you to use. So you need to have custom code for big servers. And users demand feature parity, so you have to support it. * By the way, you also need to integrate a web browser to display HTML email. Except quirks of email rendering abound. And there are severe privacy and security concerns too--you need to disable JS at the very least, and often times be very careful about network access so that people can't leak contents out.