IMAP backup
August 10, 2010 6:46 AM   Subscribe

I would like to have a local mbox or Maildir backup of an IMAP account. I've investigated offlineimap, getmail and imapsync, but none seem quite right. Am I missing something? Or is there a better solution?

The IMAP account is not a Gmail account. I don't have shell access. The machine doing the backing up runs OS X. The backup doesn't need to store snapshots; a clone is fine (although ideally it would sync rather than pull down the entire email account every time!)

I've investigated three possibilities:

offlineimap looks great, but, unless I'm missing something, it is unavoidably two-way, which means if for some reason (disk failure, user error, etc.) the backup copy is modified or lost then those changes/deletions are propagated back to the server, which is potentially disastrous.

getmail is one-way (good!), but, unless I'm missing something, it requires you to manually list the IMAP mailboxes you want to backup (and to create directories for each). This creates a manual task for a user to complete to get a full backup, which they will doubtless forget.

imapsync requires the machine doing the backing up to run its own IMAP server, which is a complication that I am extremely keen to avoid.

Are there workarounds to any of these problems? Or is there another tool I should be using?
posted by caek to Computers & Internet (5 answers total) 3 users marked this as a favorite
 
imapgrab is sort of a front-end to getmail. It may very well solve your problems.
posted by the dief at 7:05 AM on August 10, 2010


I suggest using offlineimap to sync to local Maildir, and then using something like rdiff-backup to maintain incremental backups of that Maildir (and probably ~/.offlineimap).
posted by scatter gather at 7:07 AM on August 10, 2010


Response by poster: Thanks guys.

imapgrab is nearly right. It supports an "_ALL_" option when specifying which mailboxes you want to download, which is the problem I had with getmail. There are unfortunately two downsides, which are presumably also related to getmail: (i) in the backups it makes, all mail is unread, i.e. flags are not preserved (ii) it is not incremental. The backup would not quite match the original, and it would pull down the many GB of email each time.

Backing up my backup to allow me to safely use offlineimap to backup would be kind of a last resort ; )

Other suggestions welcome.
posted by caek at 12:33 PM on August 10, 2010


Response by poster: Sorry, for the record, statement (ii) about imapgrap is not true. It is incremental.
posted by caek at 1:16 PM on August 10, 2010


I don't use it and I don't personally endorse the software, but 'zimbra desktop' should do what you are asking about.

I *do* manage a relatively small install of their server product though, and really like it.

The desktop app is a big clunky java-y webapp that is pretty fully featured, including some nice search features for looking inside of attachments.
posted by BurnMage at 1:31 PM on August 10, 2010


« Older Does my computer have a simple illness?   |   Hebrew language support for the iPad Newer »
This thread is closed to new comments.