Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I run an internal mail server which I make nightly backups of. I want to also make backups of 3rd party email accounts such as Gmail and Hotmail. I know that both these services have access via POP/IMAP, but is there an easy way to grab messages from the commandline and back them up as with normal Maildir format files?

share|improve this question
up vote 0 down vote accepted

Someone heard about the google debacle. :-)
Every service that has POP or IMAP, can be backed up by using fetchmail in Maildir-format.

This is a very nice tutorial:

share|improve this answer
Cheers :)...... – Jay White Feb 28 '11 at 23:10
Quick question, can I download via imap, and can I download only inbox and sent folders and exclude certain labels? – Jay White Mar 1 '11 at 0:51
Someone wrote a script for getmail (alternative to fetchmail) that should do the trick.… – Bart De Vos Mar 1 '11 at 7:40

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.