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.