3

Over the last week I've slowly grown to fucking hate IMAP and SMTP. You'd think after so many years we'd have come up with better servers to manage email but no we still rely on fucking decades old protocols that can't even batch requests.

To make things worse I need to attach to IMAP through node and that has been a nightmare. All the libraries suck ass and even the ones tailored towards Gmail don't work for Gmail because Google decided one day to fucking out the header at the bottom of some emails and split into mimeparts. Also why the fuck is fetching email asynchronous? There's no point at all since we requests are processed line by line in IMAP, and if the library actually supported sending asynchronous requests it wouldn't require a new object to be created for each request and allow only a single listener.

Also callbacks are antiquated for a while and it pisses me off that node hasn't updated their libraries i.e. TLS to support async/await. I've taken to "return await new Promise" where the resolve of the promise is passed as the callback, which let's me go from callback to promise to async/await. If anyone has any other ideas I'm all ears otherwise I might just rewrite their TLS library altogether...

And this is just IMAP. I wish browsers supported TLS sockets because I can already see a server struggling with several endpoints and users, it would be much easier to open a connection from the client since the relationship is essentially:

Client [N] --- [1] Server [1] --- [1] IMAP

And to make the legs of that N : N which would fix a lot of issues, I would have to open a new IMAP connection for every client, which is cool cause it could be serverless, but horrifying because that's so inefficient.

Honestly we need a new, unifying email protocol with modern paradigms...

Comments
  • 1
    What are you trying to do?
  • 1
    Yep we need a new modern protocol for mails. I'm saying that already since a long time, but mostly because I don't wanna learn both in university :D
  • 1
    @Cheeseus you have to study protocols in university? There's a reason why they made IETF RFCs for all of this shit, it's so we could find it and wouldn't have to memorize every fucking detail. Any curriculum that puts that much focus on the application of CS instead of testing on theory is going in the wrong direction...
  • 1
    @tokumei I studied IP, TCP, HTTP and a couple other protocols, but not really in depth. They were mostly used to teach things like how segmentation, routing, error recovery and others are implemented.
  • 0
    Well those make sense, but I can't think of anything that makes IMAP so special in its design...
  • 0
    @tokumei Yep we had a computer networks course for one semester where we saw a lot of that stuff very detailed...
  • 0
    @Linux making an email assistant, everything except email is properly async with promises and etc :(
  • 0
    @tokumei I think I have a networks class that covers this in third year, some things have become so ingrained into the internet and how we communicate that it would be nearly impossible to get rid of them, so then they're taught as skills even though the reference sheet exists 😂
Add Comment