Avoid this deletion gotcha when using Thunderbird with Google Mail

I’ve been using Thunderbird to manage my Google Mail account for years, but only recently did I discover that the recommended settings weren’t doing what I intended when it comes to deleting items. The TL;DR for this post is the following:

  1. If you use Google’s suggested IMAP configuration for Thunderbird to “Just mark it as deleted” for deleted items, they will be archived, not deleted
  2. The same goes for “Remove it immediately”.
  3. If you want to actually delete items from your Google Mail account, use the “Move it to this folder” option and select your Google Mail trash.

If you want to see the details, read on…

First, why would somebody want to use Mozilla Thunderbird as a client to their Google Mail account? I primarily use it for archiving all of my mail, and also managing messages more easily than the web interface that Gmail has when I want to clean things up.

Everybody should have a backup solution for the data they have in SaaS tools if you truly care about it. Google has some good documentation on how to do this quickly using Google Takeout. There are some limitations to Takeout, however: it takes time to run (hours to days), it takes up space on your Google Drive at least temporarily, and every time you export, you essentially get all of your data all over again: there is no concept of a differential backup, downloading only new things since the last backup. So that also takes a ton of time.

By using Thunderbird to back up your data, you have much more control over how often you back up data, and where you put it. Plus, since it only grabs new things since you last backed up, it typically takes much less time. Both Mozilla and Google have instructions on how to configure Thunderbird with Google Mail, but there are a few caveats that I discovered.

First, the easy stuff:

  1. You can select which tags you want to sync by either turning off those tags in the Google Mail label settings (figure 1 below), or by checking/unchecking the folders on the “Synchronization & Storage” page in Thunderbird Account Settings by clicking on Advanced (figure 2 below).
Google Mail label settings
Fig. 1: Google Mail Settings
Advanced message synchronizing setup
Fig. 2: Advanced Message Synchronizing
  1. The main thing you want to sync is All Mail, since that has everything. There’s no need to sync the Sent Items label since those are in All Mail already, just with a Sent label. If you choose to sync a label explicitly, you’ll get multiple copies of a message depending on how many labels it has. However, syncing labels as folders is really the only way to get that label info into Thunderbird, so you can decide whether you just want the messages themselves, or you’d like to keep things organized with labels at the cost of storage.
  2. If you don’t want email bodies stored locally, like your Trash, you can right-click on the folder in Thunderbird, go to Synchronization, and uncheck “Select this folder for offline use” under Synchronization as shown below. Obviously, leave this checked for email you want to back up!
Offline use setting
Fig. 3: Offline use setting

So far, this is pretty standard configuration information. Where it gets a bit tricky is configuring how deleted items are handled. This is especially important if you are using Thunderbird to clean out your email account, such as when you are reaching your mailbox size limit and you want to delete things you no longer need. Thunderbird can work pretty well for this, but only if you configure it correctly, which is NOT the way Google tells you to do it.

First, let’s take a look at how Google suggests configuring Thunderbird for deleted mail:

Google-suggested settings for Thunderbird
Fig. 4: Google-suggested settings

That seems reasonable enough: when you delete a message, just mark it as deleted. This is how it looks when you do just that:

Testing the deleted option
Fig. 5: Testing the mark deleted option

But how does Google implement that? Surprisingly, not by moving it to trash or removing it entirely, but by archiving it to All Mail. So it’s not deleted at all, and it’s still taking up space in your account!

Fig. 6: “Deleted” message still in All Mail

It took me a long time to realize that when I thought I was deleting messages, I was just archiving them. What a waste of time when I really and truly wanted to delete them!

The solution then is to change the configuration in Thunderbird to “Move it to this folder: Trash on XXXXX” instead of “Just mark it as deleted”.

Move the deleted item to the trash folder
Fig. 7: Move it to Trash instead

When this option is selected, any item you delete is moved to the Trash as expected, where it will be cleaned out after 30 days:

Moved to trash successfully
Fig. 8: Moved to Trash successfully

What about “Remove it immediately”? Confusingly, it also archives it to All Mail, archiving it instead of deleting it.

Remove immediately also just archives in All Mail
Fig. 9: “Remove immediately” also just archives to All Mail

Lesson learned: if you want things you delete in Thunderbird to be deleted in Google Mail, move it to Trash, don’t follow Google’s instructions.

With this information, I hope you can take back your account and manage it easily using Thunderbird.

Leave a comment

Your email address will not be published. Required fields are marked *