The mere mortals’ guide to setting up Gmail with Thunderbird

Updated 12th March 2016: For folks landing here via search engines and the like, I recommend ditching Gmail as a mail service altogether – as I now have. The hoops one has to jump through to simply get Gmail to behave normally with an external mail client are no longer worth the effort in light of the better business email hosting services now available. FastMail in particular is a cinch to set up, is stable and affordable, and just simply works with minimal setup on the Thunderbird side. Google clearly has zero interest or business reason to permit Gmail to work seamlessly with external clients, especially as it removes the vector for targeted advertising.

Having said this, the below should still work well.


After throwing my toys out of the cot regarding Google’s attempts to shoehorn stupid features into their mail offering in an attempt to turn email into something it’s not, I thought I’d blog the settings I use in both the Gmail web interface and Thunderbird to get it behaving sanely over IMAP.

So, if you’d like to use Thunderbird with Gmail and be able to do the following:

  • deal with a single copy of each mail item
  • be able to sort that copy into a folder
  • delete mail items and have them go into a Trash folder, which you can then empty
  • just generally and basically have it work without it getting in the way…

Then read on! The good news is that once you’ve jumped through these hoops, Thunderbird makes a fabulous Gmail client, especially in combination with goodies like the QuickFolders add-on.

I am using Thunderbird 9.0 on OpenIndiana oi_151a (Note: still current as of Thunderbird 38 on Ubuntu 14.04), and a Google Apps account for my Gmail. I am assuming you have first already enabled IMAP support in Gmail, but have yet to create an IMAP connection to it in Thunderbird.

First, let’s prevent Gmail’s new, “special” folders from appearing in Thunderbird. This a) reduces a great deal of interface confusion for Thunderbird users, and b) prevents a duplicate copy of every single email from being created in Thunderbird thanks to the “All Mail” folder. Don’t think too hard about it, just log into the Gmail web interface, go to Settings -> Labels, and apply the settings as highlighted in the following:

Gmail settings - disable Labels for IMAP users

Next, configure an IMAP connection to your Gmail account in Thunderbird. Once the account is visible in your client, make particular note of the set of folders visible under the funny-looking “[Gmail]” folder – it should look like the following:

Gmail special folders in Thunderbird

Now let’s configure Thunderbird such that when you delete an email, it goes into the Gmail Trash folder, and from there if you empty the Trash folder, the message is permanently deleted. No, don’t ask why I am stating the bloody obvious, just observe the following settings for the Gmail account in Thunderbird (and note that this runs counter to the completely bizarre “recommended IMAP settings” Google would have you use). Make sure that the Trash folder you reference is the one that sits under the [Gmail] folder:

Trash settings in Thunderbird for Gmail

Test this by deleting a message from your Inbox or whatever – it should go into the [Gmail] -> Trash folder, and you should be able to right click on that folder and empty it to permanently delete items.

Disable Thunderbird’s junk email detection for the Gmail account (as we’re using Google’s existing spam filtering):

Thunderbird - disable Junk email detection for Gmail accounts

Finally, and this is referenced in Google’s documentation, if you are sending mail out through Google’s SMTP server, then make sure that you are not also saving a copy in the Sent Mail folder for the account. Again confusing, because this is naturally what you would want to do for an IMAP account – but as it happens Gmail will save a copy automatically in the [Gmail] -> Sent Mail folder if you use their outbound server (which I do). I use the following settings for copies of sent mail, and any other copies:

Disable saving copies of sent mail for Gmail in Thunderbird

Update: To configure a mail sorting rule (known as a “Filter” in Gmail-speak…..) such that messages are sorted automatically into Thunderbird folders depending on conditions such as the recipient email address, it’s best to do this using the native Gmail web interface. In this way it’s a server-side rule – and when you set up Thunderbird on another computer or otherwise have to reinstall, you won’t have to reconfigure your mail rules all over again.

In Gmail, go to “Settings -> Filter -> Create a new filter”:

Add a new filter in Gmail

In the below example, we are simply creating a rule that will sort incoming mail addressed specifically to “ekiga-list@gnome.org”:

Gmail mail filter settings...

In the next screen, ensure the setting marked “Skip the Inbox (Archive it)” is ticked – otherwise you will end up with mail double-ups in Thunderbird. Second, set the “Apply the label” setting to the desired destination Thunderbird folder – in this example, I have selected an existing folder named “Ekiga”. All other settings are left blank:

More Gmail filter settings...

Once you have clicked “Create filter”, the rule is then in effect. You can test it by switching back to Thunderbird where new messages should be sorted automatically on arrival to the desired folder.

Advertisements

18 thoughts on “The mere mortals’ guide to setting up Gmail with Thunderbird

  1. orschiro

    Hi Dave,

    You’re really a life saver. I have exactly the problems you described in your blog post and I never came to the idea that it might be due to the labels.

    However, one question. According to your settings your archives go into “All Mail”.

    Where do you get that folder from? If I follow your settings and especially the labels then I do not have such a folder but just “Archive” which creates a folder Archive in TB and a label in Gmail.

    Regards

    Reply
    1. davekoelmeyer Post author

      Good catch. Your procedure is correct, and this is an oversight in the screengrab on my part – I never use the Archive function in Thunderbird, preferring to simply leave items either in the Inbox, or sorted into folders, or deleted entirely. I’ll update the post with the correct screengrab.

      Thanks for commenting and glad it helped. Once Gmail is beaten into shape, it actually works very nicely with Thunderbird.

      Reply
      1. Jeff

        Dave….I too have had these same gmail problems forever, with no understanding of them, other than Google wants to keep a copy of all our emails forever,,,lol, I implanted your instructions exactly and I had one problem. When I right click on the trash folder, I do not get an option to empty trash. In fact the gmail trash folder/account does not show up under the trash folder heading under inbox in the left column. Is this something Google has changed since you wrote your article? That they prevent you from even seeing the real trash folder using IMAP?

      2. davekoelmeyer Post author

        Hi Jeff, thanks for commenting. Yes, it looks like at some stage the “Trash” folder has been renamed to “Bin” in consumer Gmail accounts. I say consumer, because in my Google Apps Business Gmail accounts it is still named “Trash”. Confusing…

        Anyway, I believe to resolve this you’ll need to do the following. First, in Thunderbird go to the account settings for your Gmail account. Click on the “Server Settings” option, and under the “When I delete a message:” heading, make sure that the “Move it to this folder:” radio button is selected. You’ll need to explicitly set the “[Gmail] -> Bin” folder as the folder to use.

        This summarises the settings needed: https://davekoelmeyer.files.wordpress.com/2012/11/gmail-trashfolder-1.png

        Once you’ve done that, quit and relaunch Thunderbird. If you now look at the set of folders underneath the “[Gmail]” folder, you should notice the “Bin” folder is visible. If you right-click on it, you should now have the option of emptying the trash:

        I hope this helps. The good news is that I believe changes are on the way for Thunderbird that will better handle the hoops that Google impose for using IMAP mail in a simple and sane manner.

      1. orschiro

        You’re welcome.

        Though I experience still some problems with TB and Gmail.

        Annoying stuff, especially when you want to work with “All Mail” folders, conversation extension, resulting in duplicates in search queries and TB new message notifications.

        But I’m on a good track and will publish my result as soon as I got it together. 🙂

        Regards,

        Robert

  2. Ivanius

    Many thanks, Dave. I was looking for help to get rid of the (incredibly annoying) multiple copies of a single message; will try this out and report back. Cheers!

    Reply
  3. orschiro

    You guys should check out Postbox 3 which has by far the best Gmail support I have experienced so far. It makes all the configuration necessities and obstacles obsolete.

    Regards,

    Robert

    Reply
  4. orschiro

    All of you who are looking for a decent Gmail experience should consider Postbox 3. It’s based on Thunderbird but offers by far the best Gmail support of any client out there available.

    Unfortunately it’s not freeware but really worth trying it.

    Regards,

    Robert

    Reply
  5. Craig

    Finally! An answer to the very annoying problems I’ve had with Thunderbird since upgrading to Ubuntu 12.04 Thanks so much for posting this.

    Craig

    Reply
  6. startagl

    IMAP and gmail are horribly slow. I am using with Outlook. I can not believe that Google allows this to continue after years of complaints. I know GMail is free, but from what I’ve read on the internet even the paid version is slow. Ridiculous.

    Reply
    1. davekoelmeyer Post author

      Thanks for commenting! Personally in spite of all the hoops one has to jump through to get IMAP up and running with a desktop client, I’ve found that the performance itself with Gmail is fine. Feel free to share your settings here if you like – it could be that something on the client end is not quite right.

      Reply
  7. Pingback: The curious case of Postbox « Dave Koelmeyer

  8. Pingback: Configure Apple Mail 4.6 with Gmail | Dave Koelmeyer

  9. Pingback: Thunderbird, Gmail, and the “less secure apps” thing | Dave Koelmeyer

  10. chrissdragon

    Another reason messages sent through Thunderbird can end up in the Inbox is gmail’s ‘Never send to spam’ filter option. A side effect of that option is to apply the Inbox tag. For some reason, filters are applied when you send a message, so if your sent message matches the filter, it ends up in Inbox and Sent folders (in the gmail interface as well as in Thunderbird).
    This situation only occurs with filters that can match a message being sent, so if you’re filtering on to: or from: it probably won’t match when you reply to a message because to and from get reversed in the reply. Usually the problem happens with subject or body filters.
    The only solution I’ve found is to add a to: criteria to the filter. Example if you receive email at me@domain.com and myself@domain.com:
    Has the words: (to:me@domain.com OR to:myself@domain.com) AND (subject:(Match this subject) OR subject:(Also this subject))

    Reply

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s