Tuesday, September 28, 2004
I’ve been looking for a way to get all my old e-mail into gMail for a while now. I tried out =http://www.marklyon.org/gmailGML[/url] and gExodus, but neither of them worked quite right for me. I couldn’t get GML to run (though I didn’t try all that hard), and gExodus would keep aborting after sending the first 17 messages. I also tried using =http://www.aaltonen.us/archive/2004/04/26/tip-batch-forward-emailpine[/url] to forward it, but that didn’t work right either.
So, I finally gave up, and did it myself. It was surprisingly easy, and I should have just done it this way in the first place. First, I created a procmailrc file that looked like this:
#Get the subject
# SPAM STUFF
Then, I just ran: cat old_archive | formail -Y -s procmail procmailrc. That’s it. formail splits the mbox file, and runs each one through procmail, which adds [old] to the subject, and forwards it along to gMail. Nice and simple. It even runs all my old stuff through my current spam filter, which catches a lot of stuff that was still lying around.
Updates: It didn’t work quite right the first time. It was merging some messages together, and doing weird stuff. The -Y option to formail fixes that, at least with my mbox file. Also, it goes MUCH faster if I disable the spamassassin stuff, so that’s what I’m doing the second time around. I’ll let Google catch the spam for me.