Backing up Proton Mail (and other IMAP email)

Tutanota app screenshot

I have used Proton Mail for quite a while because it was really the only horse in the race a few years ago. Hushmail was OK, but too expensive (although I did use it for a year) and Tutanota was too immature – my biggest complaint being that it did not support 2FA at the time which was too glaring a deficit for me to overlook. Fast-forward a year or so, and I am moving to Tutanota.

My choice to move to Tutanota is almost entirely based on cost. Proton has a lot of features but I really only use the custom domain feature, and its associated aliases support. For those features I pay about $8 CAD/month. For the same level of plan on Tutanota I paid $18 CAD for the entire year.

Tutatnota Cons

It's not all gravy. The Tutanota iOS app isn't very polished. It does not support TouchID or PIN, for example. So unless you're willing to log in every time you want to check your email or, alternatively, just have the app “remember” you so you don't have to log in at all, you're out of luck. I've decided I can live with that because my phone is secured in other ways, but it still makes me feel a little naked.

In addition to that security issue, it doesn't format emails as nicely as the Proton app. HTML emails are still just a little too wide for the screen so there's a little right-to-left scrolling to read them. That's an unpolished edge that bothers me, but not enough to pay four times as much for encrypted email.

Tutanota Pros

The desktop experience with Tutanota is better than Proton. Proton offers web-based access or its (in)famous “bridge”. The browser experience is OK, but it's still a clunky old web browser interface. The bridge is supposed to be a piece of software that runs on your local system and provides a local mail server for your choice of email client to use instead of connecting directly to any Proton servers. The Bridge provides the en/decryption layer so a normal email client can use Proton without being bothered by having to know about the encryption layer.

It's a great idea, but in practice I haven't found a desktop Linux client that works well with it. Thunderbird has always been a complete piece of junk in my opinion so it is no surprise that it barely functions with the bridge. I then tried good old Evolution and the K-sute of tools like KMail with no luck. I then literally search the software repos for any IMAP email client and tried every one. None of the GUI packages seem to be able to handle the Proton bridge for a variety of reasons. Literally the only IMAP client that worked reliably with the Proton Bridge is Mutt. I love Mutt and all, but even I have my limits for what I can put up with for heavy daily email use.

Tutanota has a desktop app. I'd prefer it to be open source but it is an AppImage. It's not ideal in that form, but again, I can live with it because it actually works and provides a nice desktop experience.

Backing up Proton Mail

Now we get to the point of this post. If you want to stop paying for Proton Mail you have two choices. Either drop your account down to the free levels of service and then downgrade, or just cancel your account.

The free level of Proton Mail tops out at 500M of storage and doesn't support any of the custom domain stuff I have going on. Ideally, I'd like to drop down to the free level but I have 1.7G of email on Proton and without a working bridge there's really no feasible way to selectively remove 1.2G of email using the web interface alone. So I will have to cancel, but I don't want to lose all my email.

The easiest solution would be to just use the bridge and some IMAP client to download all my mail offline. I've already stated why that's not going to work for me. But there's another solution.

Enter IMAP Grab. This amazingly useful Python script does what it says; it grabs your IMAP email. Despite the Proton bridge being essentially non-functional in any graphical IMAP client for Linux, it worked perfectly with IMAP Grab. The steps are:

  1. Download IMAP Grab
  2. Ensure you have the Proton Bridge running
  3. Fire up IMAP Grab. Use your Proton Bridge server details in IMAP Grab (this is your localhost running on port 1143 and the Bridge credentials)
  4. Test the connection by clicking the Get List of Mailboxes button. If you've set it up correctly you will be rewarded with a list of folders in the Available Mailboxes field.
  5. Select the folders you want to download.
  6. I prefer Maildir format so I selected that option.
  7. Click the Save to folder button to select the directory where you want it to store your mail.
  8. Click the Download Selected Mailboxes button
  9. Grab a coffee.

This worked so well for my Proton mail that I decided to try it on an old GMail account. It failed overnight for some undocumented reason but given how well IMAP Grab worked on Proton I assume it was some kind of Google throttling.

IMAP Grab Gmail setup

I really liked how the error messages from Gmail were displayed in the IMAP Grab interface. That allowed me to easily fix errors such as IMAP not being enabled for my account, and also to be reminded that I need an app password on Google to allow IMAP Grab get by the 2FA set up on my account.

GMail errors

You cannot upload your mail to Tutanota

Because I'm a Linux-head I find text files incredibly useful and that is what IMAP Grab gives me. I have 1.7G of Proton emails stored in individual text files on my system now. There is no way to send those to Tutanota but that is not a concern for me. My use case doesn't include the need to use these emails in any way other than being able to search through them from time to time if I need to look up some historical thing.

If you want to upload your backed up email to Tutanota you will have to wait until Tutanota supports IMAP or some other migration system.

#Tutanota #email #Proton