As part of Project Reclaim, I’m gearing up to move my email off of Gmail and onto my own server. Email is, and long has been, central to my life online – it’s my main point of contact for so many personal and professional connections, and my email archives are the closest thing I’ve got to a record of my online activity. So I’m keen to make the move as smooth as I can.
For that reason, I’m handling the transition in stages. The first stage involves transitioning email client software away from the Gmail website.
Choosing a client
I’ve chosen Thunderbird as my alternative, for a couple reasons.
- It’s open-source.
- It’s highly extensible and customizable.
- It works across platforms. That’s important, because I’ll be migrating away from OSX.
Choosing Thunderbird is not without its sacrifices. For one thing, moving to an OS-native application, rather than an app that runs in a browser window like Gmail does, means that I’ll no longer be able to count on having a consistent UI and feature set between different devices. In some cases, this is not a huge loss. The UI for Gmail on my Android phone is really quite different from the normal web version, and it’s never bothered me very much. My biggest worry, though, is that I’ll have multiple workstations – a primary work machine and a netbook, for example – with different email setups. I’m hoping to mitigate the problem by coming up with some idiot-proof backup and syncing methods for the fairly small number of files that comprise Thunderbird’s configuration. (This’ll be necessary for other software transitions as well, like my gradual move to Vim. It’d be quite easy with Dropbox and some strategically-placed symbolic links, but I’m trying to break the Dropbox habit too 🙂 )
It’s a considerable comfort that, now that I have a smart phone (and am thus no longer reliant on public or borrowed computers for email access), the vast, vast majority of my email use is centered on a handful of devices, all of which I own. The last time I checked my email on a device other than my own was probably three years ago. Weird, now that I think of it.
The other sacrifice is related to UX. I happen to like Gmail’s interface. In particular, I’ve grown quite used to Gmail’s thoughtful keyboard shortcuts, which make it possible to do nearly navigation without touching the mouse. Coming up with a reasonable facsimile of these shortcuts in Thunderbird would be the biggest part of my configuration process.
Thunderbird has pretty good keyboard shortcuts out of the box. I didn’t feel like learning a whole new system, though, so I wanted a way to map Gmail-style shortcuts onto Thunderbird. There used to be a Thunderbird extension to do just that, called GmailUI. But the GmailUI website suggests that the extension is only compatible with Thunderbird versions 0.8-2.0 (Thunderbird’s currently in 3.1), which would explain why the extension doesn’t show up in a search on tho Mozilla repo (the “Expression Search” plugin does come up, which is a fork of a part of GmailUI that I’ll talk about in a minute – but it doesn’t do keyboard shortcuts).
So I looked for a more general method for customizing Thunderbird’s keyboard shortcuts, and found it with Keyconfig. It’s pretty straightforward to remap keystrokes using Keyconfig (Tools > Keyconfig), though it can be a bit of a pain because many of the standard Gmail shortcuts (like
k for up/down navigation) are already in use by Thunderbird, so that changing one shortcut often means making two. You might find it helpful to borrow my configuration, which I’ve pasted below. Add these lines to your user.js config file (create if it doesn’t exist):
<br /> user_pref("keyconfig.main.key_killThread", "][I][");<br /> user_pref("keyconfig.main.key_markJunk", "meta shift][J][");<br /> user_pref("keyconfig.main.key_markReadByDate", "meta shift][D][");<br /> user_pref("keyconfig.main.key_markThreadAsRead", "meta shift][R][");<br /> user_pref("keyconfig.main.key_newMessage", "meta shift][M][");<br /> user_pref("keyconfig.main.key_newMessage2", "meta shift][N][");<br /> user_pref("keyconfig.main.key_nextMsg", "][J][");<br /> user_pref("keyconfig.main.key_previousMsg", "][K][");<br /> user_pref("keyconfig.main.key_reply", "][R][");<br /> user_pref("keyconfig.main.key_replyall", "shift][R][");<br /> user_pref("keyconfig.main.key_toggleMessagePane", "][V][");<br /> user_pref("keyconfig.main.xxx_key74_SwitchPaneFocus(event);", "][D][");<br />
Briefly, this does the following. First, it maps some familiar keystroke combos from Gmail to Thunderbird:
k to up and down, and
R to Reply and Reply To All. Second, because two-stroke codes from Gmail (like
gi for Go To > Inbox) don’t seem to be supported natively by Thunderbird, I’ve mapped
D to SwitchPaneFocus, which lets me get back and forth between the folders pane, the message list pane, and the single message pane, for easier navigation. As I get more comfortable with it, I might write my own extension that ports over some of the other most convenient Gmail shortcuts, but for now this covers a good 80% of what I might regularly use.
The other big shortcut missing from Thunderbird is
y, which is the Archive command in Gmail. For that purpose, I installed Nostalgy, which allows you to move messages with keyboard shortcuts. I don’t think I’ve set this up in 100% the right way, but here’s how I’ve approximated Gmail’s
y using Nostalgy. First, at Tools > Nostalgy > Keys, I’ve set ‘Save message’ to ‘shift Y’ and ‘Save as suggested’ to ‘Y’. ‘Save as suggested’ seems to work on a session basis; it suggests the folders that you’ve used since the last time you started Thunderbird. Thus, every time I start Thunderbird, the first time I want to archive a message, I use the more verbose shift-Y. A dialog at the bottom of the window suggests places where I might put the message; I select Gmail’s All Mail folder. Then, the next time I want to archive a message, I can use
y by itself to go to the suggested (i.e. the last-used) location. Since I just throw all of my email into All Mail – no complex tagging or organization – this is all I need.
One of the best things about Gmail its easy searchability. Gmail searches are generally fast, accurate, facet-able, and easy to navigate. Mimicking this in Thunderbird is, at one level, impossible; you’ll never have access to Google’s search algorithms. (Though probably this doesn’t matter much, since searching on a finite corpus like an email archive doesn’t require fancy logic like what’s in PageRank.) But I’ve got a few tips for making Thunderbird search a bit more like Gmail.
- Searching vs filtering – The main search box, accessible by Cmd-K/Ctrl-K, is a true search. The nice thing about it is that it searches through all available metadata fields, and in all folders. The bad thing about it is that the search results interface, which comes up in a new tab, is totally different from the standard message viewing interface, and has (so far as I can tell) absolutely no keyboard shortcuts. As an alternative, you can use the Filter mode, which is available via the Quick Filter Bar (View > Toolbars > Quick Filter Bar). That allows you to filter the messages in your current view according to various search terms, within the default UI. If you’re like me, and you have an empty inbox and an All Mail file with all the things you want to search, the Filter method will mean switching to All Mail before you start searching.
- Sort search results by date – A small annoyance: when you do a Cmd-K search, results are, by default, in order by Relevance. Usually this is not what I want (I’m looking for that person who emailed me about BuddyPress yesterday) – I’d be much better served by Date sorting. Search Results Sort By Date Not Relevance is an aptly-named extension to change this behavior.
- Gmail-type expression searches – Gmail search has a handful of handy expressions for narrowing your search: from:x will search for ‘x’ in the From field only; attachment:yes will limit results to those that have attachments, etc. Enabling this sort of filtering in Thunderbird was part of the aforementioned GmailUI. A kind-hearted dev has ported it over to Expression Search, which adds the same syntax to a special Expression box on the Quick Filter bar. (This last point is important – I spent some time messing around, thinking that the extension was broken, because I was expecting it to interact with the main search bar. It works only on the Filter bar.)
As a side note related to search, I fear that one of the things I will lose irrevocably when I move away from Gmail as a provider is mobile search. Gmail searches take place on Gmail’s servers, so they work equally well on a mobile device. Thunderbird searches depend on local copies of the mail archive, which is impractical on a mobile phone. Suggestions for getting around this restriction are quite welcome.
Bonus! Offline Access and New Email Throttling
Moving to a non-web-based email client is not all bad. For one thing, moving to a local application means that my email – archives and all – are available offline. I know that Google Gears and some of the new HTML5 goodies mitigate the issue somewhat with respect to Gmail, but offline access for a webapp is always going to be something of a hack.
On a related note, one thing that I have always hated about using Gmail is how it weaves together the process of checking for new email and accessing old email. I like to check for new mail at specified intervals only (once every few hours); anything more than that is extremely distracting. In Gmail, this meant closing the browser tab. Yet, fairly frequently, I find that I need to access an older email from my archive in order to do a specific task. In Gmail, this meant checking my new email as well. Now that I’ve moved to Thunderbird, I can access my archive without checking for new mail – the way it ought to be!
Setting it up this way was not straightforward. There are a few things you’ve got to do:
- In Tools > Account Settings > Server Settings, configure the ‘Check for new messages at startup’ and ‘Check for new messages every x minutes’ however you’d like. I have them both disabled, so that email can only be checked manually.
- Here’s the tricky part: Gmail, in its futuristic wisdom, uses a special protocol called IDLE to push new email to remote clients – bypassing the settings from step (1). (This took me half a day to figure out.) Disable this feature at Tools > Account Settings > Server Settings > Advanced > ‘Use IDLE command if the server supports it’.
I’m planning to spend a few weeks improving and getting used to this setup before starting the migration to self-hosted email.