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 have an IMAP account with limited space. I would like to archive "old" mails to local storage, and I want to do it automatically (from cron) on my Linux system. I still want to keep the latest mail (up to a year or so) on the IMAP server.

What is the best way to do this automatic archiving? Is it fetchmail I am looking for?

What is a good format for the local storage? I assume Maildir is a good choice.

share|improve this question

it is fetchmail, - just replace: 'POP3' => 'IMAP', 'no keep' => 'keep', write a some wrapper (su user -c fetchmail) and put it under cron.

btw, mailbox is better, for example you can use munpack utility with it.

share|improve this answer
Please explain how to make fetch download and remove old mails and leave the newer ones. – dkagedal Oct 14 '10 at 20:02

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.