Mozilla Thunderbird Tips and Tricks

Last Modified: Tue, 12/16/2014 - 13:45

Note:  The information on this page is very likely very outdated, as it was originally written for Thunderbird 2.x and not updated since.  Some of the content may still be useful, but I've this here primarily for archival purposes

Introduction

Mozilla Thunderbird is a fantastic e-mail client and address book, brought to us by the good folks at the Mozilla Foundation.  If you're reading this page, then you're probably already familiar with Thunderbird; so, I won't spend much time on an introduction.  Just for reference, here are a few important links:

Thunderbird Home Page
Thunderbird Extensions and Themes
Thunderbird Help, Tips, and Tricks

This page is intended to provide information on a few Thunderbird tricks that I personally find invaluable.  For additional tips and tricks, please visit the links above.

Note:  Many of the tips on this page assume that you are familiar with editing Thunderbird configuration files.  Please see this Thunderbird Help page if you need more information.

Return to top

Message Highlighting

Message highlighting (overview) is a great feature of Squirrelmail that I sorely missed in Thunderbird.  Thunderbird by default does not offer the same functionality found in Squirrelmail, nor has an extension been written to add this capability.  Fortunately, however, a suitable workaround can be achieved with a little work by using Thunderbird's label and filter systems.

Label Settings

Right-click on any message in your Inbox - notice the Label option?  Thunderbird offers labels for five different types of e-mail:  Important, Work, Personal, To Do, and Later.  Unfortunately, Thunderbird is limited to only five labels, but the name and color of each can be customized through the Display tab in the Options window.  I like to use labels for different mailing lists, but there are many other possible uses.

When you apply a label to a message (or group of messages), the font of that message changes to the associated color in the thread pane.  This may work fine for you, but I strongly prefer the Squirrelmail way of changing the background color of the message.  This makes the label more noticeable, and much more readable.  To accomplish this, suitable colors must first be chosen.

What's wrong with filtering into folders?

Several people have asked me why I don't setup filters to move incoming mail into separate folders.  As a matter of fact I do use subfolders, as you can see in the screenshot below.  However, I only like to do this for mail that that I read once a day, such as the Bugtraq mailing list.

I much prefer to keep all important mail saved in one folder, so that I can see it as it comes in.  Message highlighting allows me to do exactly this, while still distinguishing between message types.

For good contrast (and, hence, easy-to-read messages), light background colors and dark foreground colors should be used.  You can use any combination you'd like (Thunderbird includes a color picker in the Options window), but I recommend the following pairs:

Light/Dark Red: Light/Dark Yellow:
#FFCCCC#DD0000 #FFFFCC#DDDD00
Light/Dark Blue: Light/Dark Purple:
#CCCCFF#0000DD #FFCCFF#CC33CC
Light/Dark Green:  
#99FF99#00CC00  

Once you've selected your colors, go click Tools, Options (or Edit, Preferences in Linux), then Display.  Enter your custom colors and label names in the Labels box.  You'll notice that only one color can be entered for each label - this will be explained later; for now, just enter the lighter shade for each color.  Click OK, then apply one of the labels to any message.  The text should change to the appropriate color, but it will most likely be too light to read.

userChrome.css Settings

To fix that problem, we need to tell Thunderbird to change the background rather than the font color on labeled messages.  We can do this by editing the userChrome.css file in your profile directory (see the Note at the beginning of this page for more information about editing this file).  I've linked to my own userChrome.css below as an example, and included one stanza for discussion.

treechildren::-moz-tree-cell(lc-FFCCCC) { background-color: #FFCCCC !important; }
treechildren::-moz-tree-cell(lc-FFCCCC, selected) { background-color: #DD0000 !important; }
treechildren::-moz-tree-cell-text(lc-FFCCCC) { color: #000 !important; }
treechildren::-moz-tree-cell-text(lc-FFCCCC, selected) { color: #FFF !important; }

My full userChrome.css is also available.

If you choose the same colors I did, you can simply copy my userChrome.css into your profile/chrome directory.  If not, you'll need to customize it to match your own colors.  Each stanza defines the colors used by the label for the background and font color, both when the item is selected and not selected.  It may look confusing, but it's actually quite straightforward:

  1. Set each (lc-*) tag to the color you selected in Thunderbird (this should be the lighter color).  For example, if Label 1 is #FFCCCC, then all four (lc-*) tags should be (lc-FFCCCC).
  2. The background-color on the first line defines the default, unselected color.  This should also match the color selected in Thunderbird, as well as the (lc-*) tags.
  3. The second line defines the highlight color when the message is selected.  Set this to the darker color.
  4. The third and fourth lines set the font color when the message is/isn't highlighted.  I find black (#000) when not highlighted and white (#fff) when selected to be the easiest to read.

Once everything is set, save the file, then launch Thunderbird (or restart if it's already open).  If you haven't already done so, apply labels to a few random messages.  You should now have the sweetest message highlighting this side of Squirrelmail!

Tip:  Labeling Mailing Lists

Most mailing lists include a List-ID attribute in the message headers. To filter based on this attribute, first view the message headers (View, Headers, All), then find the value of List-ID. Determine a unique keyword for this list (eg, for Bugtraq I simply use "bugtraq").

Next, create a new filter. For the condition, select Customize, type in List-ID, then click Add and OK. Now, for the condition select List-ID => contains => keyword. Finish applying the filter as usual.

Message Filters

Now that your label system is setup, you need to make sure it's automatically applied to incoming mail.  To do this, click Tools, Message Labels.  Click New, then enter a filter name (my preference is to use the same name as the filter).  Next, decide on and set the criteria for the label.  For example, if you want to label mail from people in your Personal Address Book, you could set Sender => is in my address book => Personal Address Book.  Finally, for the action check 'Label this message', then select the appropriate label.  Click OK, then repeat the process for each additional label you want to apply.

Once you've adding new filters, return to the Message Filters window.  If you'd like to apply any of the filters to your current mailbox, select the filter then click Run Now.  When you're finished, close the Message Filters window.  From now on, Thunderbird will apply these filters to all incoming messages.  Success!

Tip:  Backing up Filters and Labels

If you use Thunderbird on multiple computers (like I do), you'll undoubtedly want to use the same filters and labels with each instance.  This can be done by copying two files, user.js and msgFilterRules.dat, to each Thunderbird installation.  user.js is found in your profile folder, and is detailed below.

msgFilterRules.dat, unfortunately, is a bit more tricky.  This file is found in your actual mailbox folder.  Since I use IMAP on my legroom.net mail server, my personal filters file is in profile/ImapMail/
mail.legroom.net/msgFilterRules.dat
.  Your path will vary, but will be similar: ImapMail (for IMAP) or Mail (for POP3) followed by your mail server.  Once you're happy with your filter and label settings, copy these two files to any other Thunderbird installation and you can quickly and easily enjoy the same setup.

Finally, I present a screenshot of message highlighting in Thunderbird, in all it's multicolored glory:

Message Highlighting in Thunderbird
Click to enlarge

Return to top

Thunderbird Extensions

Here are a few Thunderbird Extensions that I find invaluable.

Addressbooks Synchronizer  (alternate link)

Addressbook Synchronizer can syncrhonize Thunderbird address books with FTP, WebDAV, or IMAP servers, allowing you to keep the address books across multiple Thunderbird instances in sync.

Enigmail  (alternate link)

The Enigmail extension integrates the authentication and encryption features provided by GnuPG.

keyconfig  (alternate link)

keyconfig allows you to change keyboard shortcuts.  Configuration can be difficult, so be sure to check out the examples.

Local Install  (alternate link)

The Local Install extension allows you to install extensions from the local filesystem.  It also adds many additional features and options to the Extensions and Theme managers.

Mail Redirect  (alternate link)

The Mail Redirect extension adds the ability to redirect (aka, bounce) one or more mails to one or more recipients.

Menu Editor  (alternate link)

The Menu Editor extension allows you to customize the menus in Thunderbird.

Mozilla New Mail Icon  (alternate link)

This extension displays an icon in the system tray when new mail arrives. It supports the standard (FreeDesktop.org) system tray, as used by GNOME, KDE and IceWM.

No New Window on Double Click  (alternate link)

The No New Window on Double Click extension prevents new windows from being launched when double-clicking an item in the Folder tree.  The content is loaded in the current frame, and the folder is expanded/collapsed if appropriate.

View Headers Toggle Button  (alternate link)

This extension adds in icon to the toolbar that toggles between the All and Normal header views.

Return to top

user.js Settings

Thunderbird offers literally hundreds of possible options and settings, and as you can imagine taking the time to review all of these setting on each and every install can become quite tiresome.  To solve this problem, Thunderbird allows users to set their personal preferences in the user.js file in their profile directory (for more info on user.js, see the links in the introduction).

user.js settings have been fairly well documented throughout the web, but here are the settings that I use in my own file.

user.js - these preferences are hardcoded and never change

# Mozilla User Preferences

// Add List-ID Header
user_pref("mailnews.customHeaders", "List-ID");

// Address Book preferences
user_pref("mail.addr_book.lastnamefirst", 1);

// Mail Interface preferences
user_pref("browser.preferences.instantApply", true); //make window non-modal
user_pref("mail.biff.show_tray_icon", false); //don't show new mail icon
user_pref("mailnews.attachments.display.largeView", false); //small attachments
user_pref("mailnews.show_send_progress", false); //don't display send window
user_pref("mail.warn_on_send_accel_key", false); //don't prompt on Ctrl-Enter
user_pref("security.warn_entering_secure", false); //don't prompt for SSL

// Mail Navigation preferences
// Set the "Advance to next unread message in [x] folder" behavior
// 0 - Always go to the next folder without prompting
// 1 - Ask before going (the default behaviour)
// 2 - Never go to the next folder with unread messages
user_pref("mailnews.nav_crosses_folders", 0);

// Mail Reply header
user_pref("mailnews.reply_header_authorwrote", "%s wrote");
user_pref("mailnews.reply_header_ondate", "On %s");
user_pref("mailnews.reply_header_separator", ", ");
user_pref("mailnews.reply_header_type", 2);

// Password protect the message list pane
//user_pref("mail.password_protect_local_cache", true);

// Default browser, for Linux
// user_pref("network.protocol-handler.app.http", "/usr/bin/firefox");
// user_pref("network.protocol-handler.app.https", "/usr/bin/firefox");
// user_pref("network.protocol-handler.app.ftp", "/usr/bin/firefox");

prefs.js - this sets default preferences that can be changed

# Mozilla User Preferences

/* Do not edit this file.
*
* If you make changes to this file while the browser is running,
* the changes will be overwritten when the browser exits.
*
* To make a manual change to preferences, you can visit the URL about:config
* For more information, see http://www.mozilla.org/unix/customizing.html#prefs
*/

// Auto Update preferences
user_pref("app.update.enabled", true);
user_pref("app.update.interval", 172800);
user_pref("app.update.auto", false);
user_pref("app.update.mode", 0);
user_pref("browser.search.update", false);
user_pref("extensions.update.enabled", true);
user_pref("extensions.update.interval", 172800);

// Download preferences
user_pref("browser.download.dir", "C:\\1");
user_pref("browser.download.downloadDir", "C:\\1");
user_pref("browser.download.folderList", 2);
user_pref("browser.download.useDownloadDir", true);
user_pref("mail.compose.attach.dir", "C:\\1");
user_pref("messenger.save.dir", "C:\\1");

// Message Display preferences
user_pref("mail.default_html_action", 1); //send messages in plaintext
//user_pref("mailnews.display.html_as", 3); //display sanitized (simple) HTML
//user_pref("mailnews.display.disallow_mime_handlers", 1); //part of html_as pref

// Labels and Color preferences
user_pref("mailnews.tags.$label1.color", "#DD0000");
user_pref("mailnews.tags.$label1.tag", "LOULUG");
user_pref("mailnews.tags.$label2.color", "#0000DD");
user_pref("mailnews.tags.$label2.tag", "LUGOJ");
user_pref("mailnews.tags.$label3.color", "#00CC00");
user_pref("mailnews.tags.$label3.tag", "GOLUM");
user_pref("mailnews.tags.$label4.color", "#DDDD00");
user_pref("mailnews.tags.$label4.tag", "Personal");
user_pref("mailnews.tags.$label5.color", "#CC33CC");
user_pref("mailnews.tags.$label5.tag", "Work");
user_pref("mailnews.tags.version", 2);

// Layout preferences
user_pref("mailnews.start_page.enabled", false);
user_pref("mailnews.wraplength", 72);
//user_pref("mail.show_headers", 2); //display all headers

// Miscellaneous preferences
user_pref("mail.biff.show_alert", false); //don't show new mail pop-up notice
user_pref("mail.collect_addressbook", "moz-abmdbdirectory://history.mab");
//user_pref("mail.compose.autosave", true);
user_pref("mail.mdn.report.enabled", false); //disable return receipts
user_pref("mail.phishing.detection.enabled", false);
//user_pref("mail.spellcheck.inline", true);
//user_pref("mail.spellcheckbeforesend", false);

// Addressbooks Synchronizer preferences
user_pref("extensions.addressbookssync.hidepopups", true);
user_pref("extensions.addressbookssync.protocol", "https");
user_pref("extensions.addressbookssync.syncpolicy", "file");
user_pref("extensions.addressbookssync.syncremote", true);
user_pref("extensions.addressbookssync.synctype", "imap");
user_pref("extensions.addressbookssync.usepost", true);

// Enigmail preferences
user_pref("extensions.enigmail.advancedUser", true);
user_pref("extensions.enigmail.autoKeyRetrieve", "www.keyserver.net");
user_pref("extensions.enigmail.configuredVersion", "0.95.0");
user_pref("extensions.enigmail.encryptAttachments", 2);
user_pref("extensions.enigmail.encryptAttachmentsSkipDlg", 1);
user_pref("extensions.enigmail.encryptToSelf", true);
user_pref("extensions.enigmail.keyserver", "www.keyserver.net, pgp.mit.edu, subkeys.pgp.net, random.sks.keyserver.penguin.de, ldap://certserver.pgp.com");
user_pref("extensions.enigmail.maxIdleMinutes", 180);
user_pref("extensions.enigmail.recipientsSelectionOption", 0);
user_pref("extensions.enigmail.saveEncrypted", 1);
user_pref("extensions.enigmail.useDefaultComment", true);
user_pref("extensions.enigmail.usePGPMimeOption", 2);
user_pref("extensions.enigmail.wrapHtmlBeforeSend", false);


// Keyconfig preferences
user_pref("keyconfig.main.key_getAllNewMessages", "control shift][N][");
user_pref("keyconfig.main.key_installToolsExtensions", "!][][");
user_pref("keyconfig.main.key_installToolsThemes", "!][][");
user_pref("keyconfig.main.key_selectThread", "control shift][T][");
user_pref("keyconfig.main.xxx_key__Accounts", "control shift][A][][MsgAccountManager(null);");
user_pref("keyconfig.main.xxx_key__Add-ons", "control shift][E][][openAddonsMgr();");
user_pref("keyconfig.main.xxx_key__Back", "alt][][VK_LEFT][goDoCommand('cmd_goBack')][chrome://messenger/content/messenger.xul");
user_pref("keyconfig.main.xxx_key__Forward", "alt][][VK_RIGHT][goDoCommand('cmd_goForward')][chrome://messenger/content/messenger.xul");
user_pref("keyconfig.main.xxx_key__Options", "control shift][O][][openOptionsDialog('');");
user_pref("keyconfig.version", 1);

// Local Install preferences
user_pref("local_install.ToolsExtension", true);
user_pref("local_install.ToolsOptions", true);
user_pref("local_install.contextMenuHideBrowse", true);
user_pref("local_install.contextMenuHideDown", true);
user_pref("local_install.contextMenuHideGUID", true);
user_pref("local_install.contextMenuHideTop", true);
user_pref("local_install.contextMenuHideUp", true);
user_pref("local_install.enableInstall", true);
user_pref("local_install.extensionSortList", true);
user_pref("local_install.hideExtensionMenu", true);
user_pref("local_install.hideFileRestart", true);
user_pref("local_install.hideGetMoreLink", true);
user_pref("local_install.hideHelpGetExtensions", true);
user_pref("local_install.hideHelpGetThemes", true);
user_pref("local_install.hidePasteBuildID", true);
user_pref("local_install.hideRepairExtensions", true);
user_pref("local_install.hideThemeMenu", true);
user_pref("local_install.hideToolsBuildID", true);
user_pref("local_install.hideToolsExtensionOptionsMenu", true);
user_pref("local_install.hideToolsMyConfig", true);
user_pref("local_install.hideToolsOpenProfile", true);
user_pref("local_install.hideToolsOptionsMenu", true);
user_pref("local_install.hideToolsThemeSwitcherMenu", true);
user_pref("local_install.promptOnThemeChange", false);
user_pref("local_install.prompt_disableInstallDelay", false);
user_pref("local_install.themeSortList", true);

// Mail Redirect configuration
user_pref("extensions.mailredirect.copyToSentMail", true);

// View Headers preferences
user_pref("viewheaders.auto-add", false);

Return to top