yum install getmail
$ mkdir ~/.getmail
$ touch ~/.getmail/getmailrc
$ chmod 700 ~/.getmail
$ mkdir -p ~/mailbackup/mail
$ cd ~/mailbackup/mail
$ mkdir cur new tmp
[retriever]
type = SimpleIMAPSSLRetriever
server = imap.xxx.co.uk
username = martin@xxx.co.uk
password = xx
port = 993
mailboxes = ALL
[destination]
type = Maildir
path = ~/nrmartin/
[options]
# retrieve only new messages
# if set to true it will re-download ALL messages every time!
read_all = false
verbose = 2
message_log = ~/.getmail/nrmartinlog
mailboxes = ALL
# do not alter messages
delivered_to = false
received = false
getmail --rcfile getmail1rc
getmail --rcfile getmail1rc --rcfile getmail2rc
A bash script: `
set -e cd /path/to/my-rc-directory rcfiles="" for file in rc-* ; do rcfiles="$rcfiles --rcfile $file" done exec /path/to/getmail $rcfiles $@ `
http://pyropus.ca/software/getmail/faq.html https://wiki.archlinux.org/index.php/Backup_Gmail_with_getmail https://www.linode.com/docs/email/clients/retrieve-email-using-getmail/
[offlineimap]