Since my last poke about with Thunderbird I’ve been using Outlook Web Access and Gmail from home and trusty old Outlook 2007 at work.
But wait! It now looks like I can have my cake and eat it! IMAP support (as announced back in October) has been enabled on my Gmail account. Hurray!
I dusted off Thunderbird and set about adding IMAP accounts corresponding to my various Gmail accounts. The account set up process went very smoothly and Thunderbird is easily configured to have Drafts, Sent Mail and Junk all appear in the appropriate places. You only need to configure the IMAP Drafts to appear in [Gmail]/Drafts and that’s it. Sent Mail is handled automatically if you use the Gmail SMTP server for outgoing mail on the account. It’s all in the Recommended IMAP client settings. See the November 8th Update in this Life Hacker article for a reasons why you shouldn’t re-configure the Junk IMAP folder to [Gmail]/Junk.
So far so good. All that remains is to copy the few hundred thousand messages to their new home. Along with my normal folder the idea is that some mailing lists are to be copied from newsgroup archives to ensure there are no missing or bounced posts in my own archive. The first 1600 messages or so were very slowly copied and then I received a received an IMAP connection timeout error, after which the the copy operation abandoned. Try again, same problem. Oh dear. This may take longer that I have patience.
Not be be deterred, I tried the spiffy new Windows Mail that shipped with Windows Vista. It’s an all round very good application, slick, easy to use and responsive. The problem is that it totally refuses to download all messages from a newsgroup without tricking it by asking for the ‘next 300 headers’, forcing a synchronize waiting for it to complete an incorrect download count (downloading message 1501 of 299), and then repeating until all the messages have actually been downloaded. When they are downloaded, it works like a charm, but that could get tiresome for transferring an archive of 40,000 messages.
Back to Thunderbird then, see if we can increase the IMAP server timeout. Nothing obvious in the account serrings. However in the Tools -> Options -> Advanced -> General tab there’s a button called ‘Config Editor’. In the Config Editor there are settings called ‘mail.server.serverN.timeout’, where ‘N’ is the account index, presumably numbered consecutively, with the value presumably in seconds. I whacked all the serverN.timeout values up to 300 seconds (5 minutes) from 29 seconds and lo’ and behold, it all starts working without any timeout issues. Still painfully slow, but working none the less.
This is really just a long winded migration procedure as I’m only likely to be using IMAP in Outlook at work so I can see my Gmail next to my Exchange account, and at home in Thunderbird when I want to see multiple accounts, as to be totally honest I’m happy with Gmail and Outlook Web Access the rest of the time.
Now all I need to do it convince Thunderbird to check all IMAP folders for new mail automatically and display the unread count next to them without me having to click the folder first, just like Windows Mail does.
Update 10th November
As explained here you can have Thunderbird check all IMAP folders for new mail automatically using the Config Editor by changing the mail.check_all_imap_folders_for_new setting to true. Also, I’m not sure if the server timeout setting is being honored because it keeps getting reset to 29. It could be the correct operation is completely unrelated to my meddling.
Update 11th November
Now IMAP copies just stop after a few thousand messages without error. The Mail Redirect Thunderbird plugin looked promising but it doesn’t handle large numbers of messages well — the script stops responding. Excellent for small numbers of message though, going to keep that one in my toolkit. Instead I’m trying gExodus 0.2 again. It seems to work perfectly well with Google Apps for Domains, you just enter you full email address and ignore ‘@gmail.com’ it automatically appends, the Google SMTP server works it all out just fine.
There’s also a tool called IMAPSize that has mbox2eml in the tools menu. This will convert mbox format mail (after being ‘compacted’ in Thunderbird) to a format you can just drag into Outlook Express or Windows Mail ready for IMAP copy to Gmail — I’ll see how it goes with gExodus first, it seems much simpler to just read an mbox file and send it to an SMTP server, should have done that to begin with.
Update 11th November Again
gExodus just started failing after a few thousand messages. Converting the mesages to EML with IMAPSize and uploading with IMAP via Outlook Express had much more success. Completed 20,000 messages then said the server refused the message. I suspect that the Google server starts refusing messages for whatever reason (load perhaps). With Outlook Express it’s easy to pick up where you left off with the ‘move’ command. Messages that have completed correctly are deleted from the source folder, even on error. A custom mbox to IMAP Python script that retries and waits for periods of time when failures occur might also do the trick.
Update
I eventually gave up with this, deciding I didn’t actually care enough.