This page was rescued from The Wayback Machine. See the original. The opinions and softwares expressed in this blog post are from 2009.
I no longer use imap2maildir, or Gmail for that matter. Please consider something else. But if you really wanna, see the bottom for a link to the Codeberg.
For awhile now, I've had that paranoia kicking in about my online data. Almost all of us have a lot of useful information out there that is entirely under someone else's control: if someone messes up, or the wrong component fails, or the wrong business process fails, or a company goes out of business with your data as their asset, poof! It's gone. The only way to ensure that your data has a chance to survive is by properly backing it up.
I am a heavy user of Gmail, Google's gift to those who love e-mail. It's got a solid web interface, spam filtering that lets you forget spam exists, and (best of all) IMAP support. It's also got a huge-ass quota, so you can keep your mail around forever. This has resulted in me accumulating over 80,000 e-mails so far. That's a lot. In the unlikely event Gmail loses my mailbox, I'd be right miffed.
However, I'd at least have my mail, thanks to... imap2maildir! Faced with a lack of any quick and reliable way to do exactly what I wanted to do, I wrote a quick script to incrementally back up any IMAP mailbox (defaulting to Gmail) to a local maildir store. This stores messages in individual files, and is readable by pretty much any IMAP server one might need to deploy in a hurry.
This script kind of sucks, but that's what open source is all about, right? It's got a few limitations and is lacking some important stuff, and there's no companion maildir2imap tool yet, but I suppose if Gmail does eat my mailbox, I'll be motivated to create one.
So, give it a spin, let me know what you think. It will definitely work fine under Linux, although you should, in theory, be able to use it with Windows (assuming the maildir filenames aren't eaten by NTFS). You can download it from https://codeberg.org/rtucker/imap2maildir/.