Time for an update about my experiment about moving into the cloud. The original plan involved importing my email into Mail.app and copying from there into gmail. It turns out that this is an appalling idea for two reasons.
The first is that it'll take until approximately the heat death of the universe to copy my emails up this way. When the connection drops, which it does from time to time, Mail.app displays a friendly error message and stops. This sub-optimal behaviour means emails must be ferried up to the server in batches of about 200-400. Given that there are several tens of thousands of emails, this is a tedious process at best.
Secondly, gmail gets the wrong dates attached to the messages; using the date on which the message was uploaded rather than the date in the email itself for the "Date" column. Without sniffing network traffic, I suspect that what's happening is that either Mail.app isn't setting the date right in the APPEND command, or it's omitting it and gmail is guessing the date wrong, possibly because it's not parsing the incoming message. Or it might be both. Who knows? Either way, the wrong date is being displayed.
I think what we need here is a decent dose of automation. What's the point of being a geek if I don't take advantage of the awesome power of the computer? If the emails were appearing in gmail with the correct date, I'd suck up the pain of the one time import from mbox into Mail.app and use the wonder of Applescript to automate the upload, but since it's not and the JRuby 1.1RC2 has just been released, now's as good a time as any to see whether I put together a little ruby script to do the hard work.
Initial poking around suggests that this won't be too hard. There's a nice Net::IMAP module in the core Ruby distribution, and a tinker with irb quickly shows that it's possible to connect successfully and get some basic information out of gmail. Now, here's hoping that my mbox file and Maildir files are in RFC 822 format (or that gmail isn't too fussy about its inputs) I wonder if there's an implementation of the IMAP Multiappend extension?
If this doesn't work, then I may have to follow the advice of my friends and do the decent thing: set up an IMAP server somewhere and just do a straight copy. That plan reeks of "sounds easy, but isn't" to me, but that's because I'm a wimp when it comes to things like this. I'd use Google's email importer if it supported standard gmail accounts.
Right, time to throw some scripts together. How hard can this be?
Update: Ah! The wonders of Google. With the aid of this script, it looks like this won't be too bad. I've done a quick experiment with Maildir and mbox format folders and it looks like we're good to go. Wish me luck.