Tag Archives: Gmail

Thunderbird, Gmail, and the “less secure apps” thing

For those folks wanting to use Thunderbird as a Gmail client and who are encountering an incorrect password error when attempting to configure the account in Thunderbird (irrespective of two-factor authentication), this is most likely due to Google enforcing OAuth. Google are spinning this as a “secure vs. less secure application” problem, suffice it to say opinions appear to vary on this.

For now, the conditions under which you may or may not see the incorrect password error prompt when hooking Thunderbird up to a Gmail account can be found here.

And on the Thunderbird developer community side, discussion about this can be found here.

EDIT: we’ll also highlight this most excellent point, from Twitter:

Can’t disagree with this.

 

 

Advertisements

Setting up Gmail Calendar and Tasks sync in Thunderbird

Updated 29th June 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, has full calendaring, 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.


With the latest versions of Thunderbird, and the Lightning and Provider for Google Calendar add-ons, Thunderbird now supports full Gmail Calendar and Tasks synchronisation. As the setup has changed somewhat from previous versions of these add-ons we’re going to cover the current procedure in this blog post.

We are using Thunderbird 31.2.0 on Ubuntu 14.04.

If you’ve already installed these two add-ons and you’re synchronising your Gmail calendar, please delete the calendar from Thunderbird (this unsubscribes from the calendar only, and leaves all server-side data intact), and uninstall the add-ons. Restart Thunderbird to get back to a clean-slate state.

Now, using the Thunderbird Add-ons Manager, search for and install both the Lightning and Provider for Google Calendar add-ons:

Install the Lightining add-on

Install the Provider for Google Calendar add-on

Restart Thunderbird to complete the installation process.

Next, switch to the Calendar tab in Thunderbird. Right-click in the area where the default Thunderbird calendar is visible and create a new calendar:

Create a new calendar

We now work through the “Create New Calendar” wizard. In the first two screens that appear, we want to add a calendar on the network, and this should be a Google Calendar:

Add a calendar on the network

Add a Google Calendar

You’ll now be prompted to enter your email address: this should be the Gmail address of the associated calendar you wish to synchronise:

Enter your Gmail address

Thunderbird will then list the calendars and task lists available to be synced. Tick these as you need:

Adding Calendars and Tasks lists

If all goes well you’ll see a dialogue indicating the wizard has finished, and, after a brief delay (during which the interface might not be responsive) your Gmail Calendar and Tasks will be synchronised:

Dialogue indicating the wizard is finished

Google Calendar and Tasks synced

At the far right-hand-side of the above screengrab you can see our tasks lists (only containing a single task in this example). These are synced with your Gmail account.

Configure Apple Mail 4.6 with Gmail

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.


This is a brief guide describing how to quickly configure Apple Mail with Gmail over IMAP. This is pertaining to an old release of Mac OS, specifically OS 10.6.8, which is running Apple Mail 4.6. I am documenting this for the benefit of readers stuck on Mac OS 10.6 and who have been saddled with Apple Mail in lieu of a vastly superior, free, openly-developed mail client such as Thunderbird. Note that the procedure documented here may differ in later releases of Mac OS.

Note that IMAP must be first enabled in the Gmail account in question. Be sure to disable the labels you do not wish to access as folders in Apple Mail (especially the “All Mail” folder) as documented here.

The Gmail account can be created in Apple Mail using the add account wizard (or first-run setup procedure), which will attempt to obtain the correct server settings (incoming and outgoing servers, username) automatically. Note that if using an “@gmail.com” address the correct server settings will be retrieved correctly. However, if using a Google Apps Gmail account with a custom domain name (e.g. “@mycompany.co.nz”), the server and username settings will need to be configured manually (according to the Google documentation for IMAP client connections).

Once the account is added we need to perform some additional steps.

By default, Apple will use separate local folders (called “mailboxes” in Apple Mail-speak for some bizarre reason) for the account Sent and Trash folders. We need to map the Gmail “Sent Mail” and “Bin” IMAP folders to these local folders, so that when email is sent or deleted in Apple Mail it will be updated in the server-side Gmail “Sent Mail” and “Bin” folders, respectively.

To do this, first select the relevant Gmail folder, and then go to “Mailbox -> Use This Mailbox For”. In this example we are mapping the Gmail “Sent Mail” folder to be used for Apple Mail sent items. The “Sent” folder visible at the top-left of the folder listing in Apple Mail will then contain and be sycnchronised with our Gmail “Sent Mail” folder:

Apple Mail IMAP folder mapping

Perform the same for mapping the Apple Mail “Trash” folder to the Gmail “Bin” folder. Once done, test that sent mail and deleted items are synchronised both ways between Apple Mail and Gmail (use the Gmail web interface to verify this). If these steps are missed or misconfigured, you will end up with local mail stores in Apple Mail for sent and deleted items (this is totally undesirable for reasons of backup, amongst other things).

Note that counter to the official Google documentation (and what we would configure in Thunderbird for example), with the above folder mapping configuration in place we have to configure Apple Mail to store sent items on the server. Mail sent out through Google’s SMTP servers is normally copied into the “Sent Items” folder anyway regardless of the client settings, but in Apple Mail this has to be enabled explicitly (as disabling it also disables the folder mapping performed above):

Settings in Apple Mail for sent items.

Finally, in Apple Mail we disable the built-in Junk email filter (as spam filtering is performed automatically in Gmail):

Settings in Apple Mail for junk email.

Apple Mail should now be configured successfully for basic interoperability with Gmail.

Google Calendar support in Thunderbird (and importing iCal files)

Capping off a nightmare week for standards support and the open web thanks to Google, they have also announced they are dropping support for the CalDAV standard later this year. I’ll have more to write on this topic in the near future (and the general gullability of social networks fanboys who are clueless about why open standards support actually matters), but for now the takeaway for Thunderbird users is that the CalDAV method of connecting to Google Calendar using Thunderbird and Lightning will soon no longer work.

Fortunately and thanks to the outstanding efforts of Philipp Kewisch, Lightning will continue to work with Google Calendar using Google’s non-standard Google Calendar API.

To get this to work, your Thunderbird client will first need the Lightning add-on to be installed and enabled. Next, download and install the Provider for Google Calendar add-on, and restart Thunderbird. Now, when adding a new network calendar you should see an option for Google Calendar:

Create a new network calendar

The address to put in the “Location” field in the above screengrab can be found by using the Google Calendar web interface, at “Settings -> Calendar -> [your calendar name] -> Calendar Address”. Clicking on the “XML” button will display the calendar address to use:

Google Calendar network address

Upon applying the remaining settings your Google Calendar should be up and running in Thunderbird. Due to Google’s assholish disregard for open standards of late, I’d strongly recommend donating to the continued development of the add-on (I have).

 

A problem I encountered when doing this, and not related to Thunderbird or Lightning, was in trying to import an ICS-format backup of one Google Calendar into another. In short, the following thread describes the problem and the resolution which worked for me:

https://productforums.google.com/forum/#!topic/calendar/cBuwVCddO3U/discussion

Disable conversation view in the Gmail Android app

Actually, the title is total linkbait because you can’t. Google would rather inflict the wretched conversation view on you whether you like it or not. This might sound peculiar, but perhaps less so if you read “GMail: designer arrogance and the cult of minimalism“, and also this legendary rant from one of Google’s own prominent software engineers (Steve Yegge), of which a relevant excerpt follows:

“But when we [Google] take the stance that we know how to design the perfect product for everyone, and believe you me, I hear that a lot, then we’re being fools. You can attribute it to arrogance, or naivete, or whatever — it doesn’t matter in the end, because it’s foolishness. There IS no perfect product for everyone.

“And so we wind up with a browser that doesn’t let you set the default font size. Talk about an affront to Accessibility. I mean, as I get older I’m actually going blind. For real. I’ve been nearsighted all my life, and once you hit 40 years old you stop being able to see things up close. So font selection becomes this life-or-death thing: it can lock you out of the product completely. But the Chrome team is flat-out arrogant here: they want to build a zero-configuration product, and they’re quite brazen about it, and Fuck You if you’re blind or deaf or whatever. Hit Ctrl-+ on every single page visit for the rest of your life.”

 

So – if you’re like me and want to check out a great email app for Android which doesn’t use conversation view and includes all the bonus goodies the Gmail app is missing (think Thunderbird for Android), you should check out K-9 Mail:

https://play.google.com/store/apps/details?id=com.fsck.k9&hl=en

The really nice thing is that if you want to support the developers of this fine application, you can pay a tiny sum for the deee-luxe version, which goes by the name of Kaiten:

https://play.google.com/store/apps/details?id=com.kaitenmail

Kaiten Mail running on Android

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.