Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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 recently discovered cli email clients and have fallen in love with their speed and simplicity. After playing around with mutt and alpine I decided I favor alpine. I am a Gmail IMAP user and have many years of emails that I'd like to store locally. Is there a more or less convenient way to retain IMAP functionality and backup only the emails that haven't been backed up already on a weekly basis? I have alpine setup with my Gmail with IMAP and it's working great. I'm just wondering if there is a way to make an offline backup or "archive" locally on my computer while retaining the multi device access that IMAP offers. I apologize if this has been asked before, I did search for it and did not find my answer. Thank you for reading.

share|improve this question
up vote 3 down vote accepted

Alpine isn't very suited for this – it's for reading mail, not automating backups. Try OfflineIMAP; it will not conflict with Alpine's access.

  accounts = Gmail
[Account Gmail]
  localrepository = backup
  remoterepository = Gmail
[Repository backup]
  type = Maildir
  localfolders = ~/Backup/mail
[Repository Gmail]
  type = Gmail
  remoteuser =
  readonly = True
share|improve this answer
Thank you very much I will look into OfflineIMAP – BasicObject Nov 19 '11 at 21:03

Alternative: fetchmail. It's in every major distro.


poll with proto POP3
user ""
password "appl-specific-password-from-gmail"
options ssl keep

Then, type:

$ fetchmail -vk

You might have to do that several times to get all your email for the first time. Once this is done, every time you type the command above, it will fetch only mail that has not been fetched so far.

This writes fetched mail to /var/spool/mail/.

share|improve this answer

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.