I wanted to name this article How to finally do away with Gmail, but such a title wouldn’t have revealed the technical content of the writing, which represents its most relevant part.

Why would I want to leave Gmail?

There are plenty of reasons:

  • Privacy: most major email providers have serious privacy issues, but at least stalking you isn’t their core business, as it happens with Google.
  • Webmail: Gmail web interface was nothing short of revolutionary when it was launched, back in 2004, but it evolved into a bloatware full of mostly useless - if not totally worthless - features.
  • Ads: unless you pay for a Google Workspace subscription, you get tons of ads in various shapes, some of which are very creative: they vary from suggestions put between your messages (which is reasonable, a free service needs to pull money in some way) to custom sponsored content which haunts you everywhere in your online experience.
  • IMAP support: folders - a bizarre IMAP representation of Google’s own labels concept - are clumsy, deceptive and tend to leave you with tons of duplicated messages.
  • Biodiversity: Internet was born with great ideals of freedom and distributed governance: show that these principles are still alive in you, don’t allow all e-mails in the world to be in the hands of a few companies (Google, Apple and Microsoft in particular).

What are the options?

I’m not recommending any particular provider, but just what I think are the rules to help choosing it:

  • Enter in a state of mind where you have to pay for good e-mail service. Be willing to shell out from 20 to 50 Euro per months, for a 8 to 25 Gb quality mailbox.
  • Prefer a relatively small email service provider - it is less likely they monitor your data to sell it to someone or to use it to target you with “content of your interest”.

Properly transferring away mail from Gmail via IMAP

Now to the important thing. How to migrate away all my email from Gmail to the new provider?

Any decent provider will offer a tool for migrations, which will basically connect via IMAP to your Gmail mailbox, download all the messages, and transfer them to you new account. Many of these tools are quite sophisticated, and they will map the IMAP folder hierarchy perfectly, so that you will experience a smooth transfer.

If the provider does not provide a tool, look for another one. But there are also a lot of software packages (the best ones are not free, though) which download the e-mail from the old mailbox and upload it to the new one. Or, well, you could always do it by hand using Thunderbird or Outlook, but this is not particularly reliable for large boxes, in my own experience.

Even though Gmail’s folders are actually labels, everything tends to work well, as (for example) messages with the Sent label are mapped to a Sent folder and therefore correctly migrated.

There is, however, a problem in the All Mail folder, which contains (as the name suggest) all your mail: things your archived (that’s it to say, they live in no other place), but also everything else: Inbox, Sent, messages in other folders (=with other labels). The only messages which are spared are the ones in Spam and Trash. If you think this is awkward, it’s not only that: it’s also bad implemented on the IMAP side, because it insists putting every message into All Mail, this creating a lot of duplication, adding download time, and occupying more space on the client.

While one may just shrug (albeit not before downing a couple of pints) for this problem on an e-mail client, it’s impossible to avoid wanting to take care of it when migrating to another mailbox: if not for all the rest, at least for the (paid) space wasted to duplicated messages.

The first thing to make sure is that All Mail does not get copied to the new mailbox. To do this, it’s enough to remove it from the folders exported via IMAP by Gmail. Go to Settings, then Labels and remove the check from Show in IMAP from All Mail label. Note that the check only appears if you enabled IMAP access for the mailbox.

This avoids the disaster, but has a big downside: all the messages you archived that have no other label would get lost, because All Mail doesn’t get copied and it’s the only one containing them. So, you need to assing all your archived messages a specific label, using Gmail’s web interface.

But, how can you single out these messages among all the shit in All Mail? 🤔 Here’s the solution, that is to say the search string which finds all of them:

has:nouserlabels -in:Sent -in:Chat -in:Draft -in:Inbox 

Once you have the results, you check to select them all and then click Select all conversations that match this search. Assing them a labels (I use GoogleMail Archive) to the results: this will translate to an IMAP folders which all the messages, which will be safely translated to their new home.

I hope this information will help some of those who want to say Bye bye to Gmail.