Wednesday, November 14, 2012

Thunderbird-GMail set up and usage notes

Introduction

Motivation

GMail's web interface is really nice, but I like having a local copy of my email on my computer. Having a local copy managed by an email program is useful for a few different reasons.

  1. For reference when there is no internet access. With the rise of smartphones, the likelihood of someone being cut off from email has been greatly diminished. Personally though I still do not own a smart phone. Also, occasionally it is beneficial to have a copies of attachment files on your actual computer, and they might be hard to transfer from your phone if you are temporarily without email access.

  2. For backup. Google is a pretty successful company and is probably not going away soon, but it is still possible that your account could get hacked or otherwise corrupted. Having a local copy of your email that you can backup to additional locations provides added redundancy.

  3. Thunderbird gives greater control over some aspects of account management than GMail does. For instance, it is possible to delete individual attachments from messages. In GMail, one can only delete the messages themselves. There are many Add-ons for Thunderbird, and some of them might be useful for account management. For instance, the Delete Duplicate Messages* extension makes it easy to identify duplicate messages for deletion. It is also not that hard to write simple extensions of your own.

Usage Modes

I use Thunderbird and GMail for three different kinds of email accounts: my main personal email account (a GMail account), my work email (a non-GMail IMAP account), and my old email from defunct email accounts (eg my college email). The regular GMail is fairly straightforward. Interfacing it with Thunderbird will be discussed below. I keep all the mail from old email accounts in the "Local Folders" section of Thunderbird.* I wanted to briefly outline the setup for my non-GMail IMAP account here since it is very similar to the GMail account but has some small differences that will be pointed out below.

The IMAP account I use is associated with an Exchange web mail interface, which I do not like. In order to avoid using this, I switched it to a GMail account "by hand." The switch required:

  1. Creating a new GMail account to associate with this other email account.
  2. Setting the original account to forward all mail to the new GMail account without saving a local copy (so that I never have to worry about the original account using up all of its storage space).
  3. Setting the GMail account to use the original account's SMTP server, so that outgoing mail appears to come from the original account's address (in GMail: Settings->Accounts and Import->Send mail as; see this Google support page for more).

Thunderbird Setup

Basic setup

The basic Thunderbird setup is covered in various blog posts and support sites online (such as this MozillaZine one). Looking things up online might not even be necessary. If you just do, Tools->Account Settings->Account Actions->Add a mail account and then enter your GMail account information, you get the basic set up done almost automatically. The only choice is IMAP vs. POP3. I use IMAP, just because it is what I have always used.

Folders versus Labels

It is important to understand how Thunderbird/IMAP and GMail treat folders/labels differently. In GMail, there is basically just "All Mail" and then labels that get added to that mail. You can add as many labels as you would like. GMail still keeps just one copy of that email in your "All Mail" "folder". IMAP organizes mail into folders with individual emails acting like the files of a traditional file system. GMail translates its labels into IMAP folders when it syncs with an email client via IMAP. If you like to use a lot of labels, you will end up with a lot of duplicated messages in your IMAP files -- one for each GMail label that a message has (see "Folder Subscriptions" below for a potential solution).

Message Archiving Strategy

My email archiving strategy is to keep one copy of each message. Additionally, I try to limit the size of individual email folders to a few hundred MB's if possible and to keep most of my old mail in inactive folders. Thunderbird stores the contents of an IMAP folder as a single file. If you use a versioned data backup system, every time anything changes in that folder that single file is modified and the new version is saved to the backup system. It saves backup transfer time and storage space to keep most old emails in folders that are rarely modified and thus do not require new backups constantly. I don't worry about small folders, but for folders that cover my largest amount of space (eg correspondence with family) I make an "archive" version of that folder in which I create a separate subfolder for each year. Then I save all messages from 2010 to the 2010 folder, all from 2011 to the 2011 folder, etc. Keep in mind that all sent mail goes to the Sent Mail folder by default -- you might want to move old sent mail out of the Sent Mail folder and into archives to keep the Sent Mail folder size down.

Folder Subscriptions

Thunderbird allows you to subscribe to the folders (ie the GMail labels) in your IMAP account individually. These subscriptions can be managed by clicking on the account in Thunderbird and then "Manage folder subscriptions." By default all folder subscriptions are turned on.

I recommend unsubscribing from these subfolders of the [GMail] folder: All Mail, Important, and Starred. Each of these folders will automatically duplicate messages saved in other folders, so if you are following my strategy above of storing all messages in well defined folders you will end up duplicate messages in your Thunderbird account.

If you like to use multiple GMail labels for individual emails, you will also end up with duplicate messages for individual emails. One solution to this problem would be to create separate folders for Thunderbird, for example just a single folder for each year, and then copy all messages to the appropriate folder (or label if you do it in GMail). Then you could keep your old labels in GMail and just subscribe to the new labels in Thunderbird (with the extra burden being sure to add these new labels to your new messages in GMail in addition to your old labels).

A couple additional notes about setting up folders and avoiding duplicate messages:

  • The "All Mail" folder in GMail contains all received mail. All of your mail (not counting what is in Spam or Trash -- they are not visible in All Mail in GMail but might actually be there hidden somehow) should be in All Mail.

  • The "Sent Mail" folder is similar to the "All Mail" folder but contains only mail that you have sent. Like the "All Mail" label, the "Sent Mail" label is hidden in the GMail interface. I subscribe to the "Sent Mail" folder because new messages that I compose have no other label. For a mail account that is used primarily via GMail, over time sent messages will get labeled when someone responds and I move the conversation out of my inbox by giving it a new label. At the end of the year, I quickly scan through my "Sent Mail" folder on GMail and label any messages that I sent that didn't get labeled during the year. Then I delete all of those messages from the Sent Mail folder in Thunderbird to remove the "Sent Mail" label. For a mail account used primarily with Thunderbird, the sent mail will only be in the sent mail folder, so I just move all of that to another folder at the end of the year.

  • When you assign a label to a message in GMail, it gives that label to all messages in the conversation. There is no way to label only part of a conversation.

  • If you are organizing messages by year, it is easier to copy messages to folders in Thunderbird. If you use GMail, any conversation that has messages in multiple years will end up with the same messages duplicated in the folders for each of those years.

  • If you are worried about duplicated messages, the Remove Duplicate Messages Add-on for Thunderbird can help you identify them (I recommend removing them by hand rather than trying to use the add-on to remove the messages because of the interaction between the way the add-on deletes messages and the way GMail treats deleted messages (see the Trash section below)).

  • One thing that is nice about dealing with duplicate messages: if you move a message from one folder in Thunderbird into another folder with the same message already in it, you end up with only one copy of the message in the folder (because both messages correspond to the same message in GMail and GMail is really just changing the message labels).

  • If you are worried about breaking mail up into individual folders making it difficult to read through your mail in a logical way, note that Thunderbird has an "Open in Conversation" function that lets you open a message in a separate tab with a tree view of all replies/forwards/etc related to that message -- similar to GMail's conversation view.

Trash

Like the rest of folders in GMail, the Trash is just another label. Thirty days after items are given the Trash label they are expunged from GMail. When you follow the default GMail setup in Thunderbird, messages are moved to the Trash folder in when you delete them (this can be set in the Server Settings section of the Account Settings for the email account). If you follow the message archiving strategy outlined above (ie no duplicate messages), this setting will cause things to work the way you expect them to -- the message will disappear from the folder it was in and appear in the Trash folder, and after thirty days it will be expunged.

With delete set to move a message to the Trash folder, it is important to keep in mind that if the message also had other labels and so was in other folders the copies of the message in those other folders will also be expunged after thirty days because in GMail there is really only one copy of the message that is being given different labels. If you just want to remove a message from a folder but do not want to remove it from GMail, you can switch the delete action to "Remove it immediately" and then delete the message. This method will never completely remove the message from GMail because the copy in All Mail is never removed until you move it to Trash and then expunge it from the Trash. If you move or delete things from All Mail, the copy in GMail will still be there (though it might take a while for Thunderbird to realize to re-sync and show the message in All Mail again). The "Remove it immediately" option is useful for eliminating duplicated messages (if you have the "Move to Trash" setting on, you will end up deleting all copies of the duplicated message!).

Sent Mail

The other setting that might need to be tweaked is the outgoing mail server. If you are connecting Thunderbird to a GMail account, then the outgoing mail server should be set up correctly with the default settings. However, if you are using GMail as the web interface for another account (as described in the "Usage Modes" section of the introduction), you will want to configure Thunderbird to use the original email account's SMTP server, so that mail you send appears to come from youraddress@originalaccount.com rather than yourgmailaddress@gmail.com. You can add SMTP servers by scrolling down to the bottom of the Account Settings window. The outgoing server for a particular email account can be selected in the top section of its of account settings (not one of the subcategories). See this mozillaZine article) for more.

Fine Tuning

With the basic, structural setup done, there are a few tweaks that can be implemented by using add-ons to closely mirror the behavior of GMail with Thunderbird. Here I mention a few extensions that I have found useful:

Keyconfig

This add-on works on all Mozilla programs (Thunderbird, Firefox, etc.). It provides a comprehensive interface for modifying existing keyboard shortcuts or creating new ones. In Thunderbird, I use it to copy GMail's keyboard shortcuts into Thunderbird, mainly J, K, C, O, F, #, R, A, and U. All of these mappings are straightforward renaming or copying of existing Thunderbird keyboard shortcuts except for U. To have U check for new mail when in folder view and to close the current message, return to folder view and check for new mail when looking at a message (in a separate tab from the folder view), I use the following code in Keyconfig:

if (((document.activeElement.id == 'messagepane') || 
    (document.activeElement.id == 'threadTree')) && 
    (document.getElementById('tabmail').tabContainer.selectedIndex != 0)) {
    CloseTabOrWindow();
}

goDoCommand('cmd_getMsgsForAuthAccounts');

One other note about standard Thunderbird keyboard shortcuts: * and \ expand and collapse all threads. This is useful to know because it is hard to navigate messages using only the keyboard when all threads are collapsed. On OSX, I find it hard to deal with some dialog windows from the keyboard. To choose "Don't Save" from the dialog that appears when closing a compose window, I have found that ctrl+n works.

Nostalgy

Nostalgy is a useful extension that allows you mimic some of the keyboard shortcuts used with labels in Gmail. In particular, I use Nostalgy's "Go to folder" function for GMail's jumping function (the G plus additional key set of shortcuts) and Nostalgy's "Save message" function for GMail's open move to function (the V shortcut). Nostalgy autocompletes folder names making it easy to move messages around (ie move them out of the inbox to an appropriate folder) and to navigate between folders with the keyboard. It has some additional features that are worth checking out as well (like a function to toggle the folder pane's visibility). Looking at the usage notes, I see lots of useful keyboard commands that I either just forget to use (eg pane/message navigation) or haven't taken the time to set up (eg rules for automatic message archiving).

QuoteCollapse

QuoteCollapse replaces quoted text in email messages with a small "+" icon that can be clicked on to show the quoted text (in Thunderbird, all quoted text is shown otherwise). It works pretty well, except that the icon is small and hard to click. Also, supposedly there is a keyboard shortcut to expand/collapse quoted text, but it did not work for me. Both of these issues were dealt with by creating a new expand/collapse text keyboard shortcut in Keyconfig. I use:

tree =  QuoteCollapse._messagePane.contentDocument.getElementsByTagName("blockquote");

if (tree.item(0).getAttribute("qctoggled") == "true") {
    QuoteCollapse._setTree(QuoteCollapse._messagePane.contentDocument, 0);
}
else {
    QuoteCollapse._setTree(QuoteCollapse._messagePane.contentDocument, 1);
}

which allows a single shortcut to toggle the expansion/collapse of quotes. To use separate keys for quote expansion and collapse, set the expansion shortcut to execute:

QuoteCollapse._setTree(QuoteCollapse._messagePane.contentDocument, 1);

and the collapse shortcut to execute:

QuoteCollapse._setTree(QuoteCollapse._messagePane.contentDocument, 0);

Lightning

Lightning adds a calendar feature to Thunderbird similar to Google Calendar (and other similar programs...). It can also sync to an existing calendar including a Google Calendar. If you search for how to sync Lightning with Google Calendar, you will find a lot of sites instructing you to use the Provider for Google Calendar add-on. This add-on works but is no longer necessary. As explained on this Google support page, it is now possible to sync Lightning to Google Calendar directly using CalDAV.

Summarizing those instructions: you use the New Calendar wizard to add a CalDAV network calendar and enter [ https://www.google.com/calendar/dav/ [ your Google Calendar ID ] /events ] for the location. Your Google Calendar ID for your primary calendar is just your email address, but for all other calendars the Calendar ID will be in the form of [ long string of characters]@group.calendar.google.com. You can get the Calendar ID by clicking the down arrow next to your calendar at calendar.google.com and selecting 'Calendar Settings'. The username is the full email address associated with that Google Calendar (and the password is that account's password).

Zindus

Zindus allows you to sync your GMail and Thunderbird contacts. Sync'ing physical addresses is a little tricky because GMail uses a single field and Thunderbird uses separate fields for street, city, zip code, etc. I rarely use contacts (I probably should make some new keyboard shortcuts to make it easy to add email senders as new contacts) and Zindus seemed to be constantly running, so I turned off auto-sync and just do a manual sync when I change a contact.

Remove Duplicate Messages

This add-on was discussed above. I just list it here for completeness. It is useful for identifying duplicated messages but not for actually deleting them (because it moves the extra copies to the Trash rather than just deleting them and causes GMail to remove all copies of the message).

Thunderbird Conversations

Thunderbird Conversations is an interesting add-on with a lot of appealing features. The short version is that skins Thunderbird to look and function almost identically to GMail. I wish it were more customizable because it has some features that I would like to use. However, I currently do not use it because those features come along with other features that I do not like and can not disable.

Here are the features I like:

  • Quick reply in the message pane. One of things that annoys me most about Thunderbird is that message composition must be done in a separate window. Thunderbird Conversations allows you to compose quick replies in the same window as the original message (like a reply in GMail). It also supposedly lets you compose new messages in a separate tab rather than a separate window, but I couldn't get that to work.

  • Attachment preview. Thunderbird Conversations shows you thumbnails of image and pdf attachments at the bottom of the image and can open them in a new tab (like GMail). Base Thunderbird can show image attachments if you toggle on View->Display Attachments Inline, but it is nice to be able to view pdf's as well.

Here is what I don't like:

  • The conversation view. Thunderbird Conversations replaces the message display window with a conversation display that looks like a GMail conversation including the GMail style fonts and stacking of individual messages, the GMail style message icons and action links, and the GMail style avatars for message senders. Thunderbird already has a conversation view that is easy to open with a keyboard shortcut and that replaces the current folder view a tree showing the conversation and individual messages appearing in the message window. The conversation can be navigated with the keyboard in the same manner as a folder. With Thunderbird Conversations, the whole conversation is now compressed into the message window and the extra GMail stylings take up even more space, leaving little room for the text. Also, supposedly it is possible to navigate through the conversation with the keyboard, but it didn't work for me -- maybe there was a conflict with my custom keyboard shortcuts. I didn't try too hard to get it to work.

  • The bugginess. Thunderbird Conversations changes so much of Thunderbird's basic interface that it seems to run into a number of conflicts. In the documentation, there are a few common problems listed, and reviewers on [AMO][http://addons.mozilla.org] list some others. No fault to the developer, but I would worry that every update to Thunderbird would break functionality in some way just because of all the changes Thunderbird Conversations builds onto the interface. Also, because of all these changes, opening messages incurred a small lag for me, which was slightly annoying when navigating messages.

I'd love a Thunderbird add-on that would enable viewing of pdf's within Thunderbird (and potentially other document formats like text documents or spreadsheets as GMail does). An add-on that allows message composition within the main Thunderbird window (in the message frame or a new tab) would also be a big upgrade. For now though, I am holding off on Thunderbird Conversations and waiting for these features to be implemented as separate add-ons or core Thunderbird features.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home