From Linux
Based on these instructions
[http://datalinkcontrol.net/dlc/content/gmail-backup-getmail http://datalinkcontrol.net/dlc/content/gmail-backup-getmail]
Install
We will use getmail, much faster and makes mbox and maildir files.
aptitude install getmail
Configure
mkdir .getmail vi getmail.gmail #can be any name really, more descriptive the better. # and make it so
[retriever]
type = SimpleIMAPSSLRetriever
server = imap.gmail.com
username = YOU@nablacor.com
password = YOURPASSWORD
mailboxes = (“[Gmail]/All Mail”,)
port = 993
[destination]
type = Maildir
path = ~/.getmail/nablacor.com/YOU/
[options]
received = false
delivered_to = false
read_all = false
verbose = 0
# Now to make some dirs mkdir -p ~/.getmail/nablacor.com/YOU/cur mkdir -p ~/.getmail/nablacor.com/YOU/tmp mkdir -p ~/.getmail/nablacor.com/YOU/new
Now to explain a bit.
- mailboxes = (“[Gmail]/All Mail”,)
- you can specify mailboxes like inbox and so on, but you want a backup so we chose all mail. Naturally you can list (comma separated) the boxes you want to backup
- type = Maildir
- This storage makes each mail a file. This is easier for command line scanning and viewing. You can use mboxwhich would be more easily read by clients such as Thunderbird. Me, Eli, I like the individual file method.
- Each time you run getmail will get the newest stuff, so it will run faster then the first time. First time will be “long”.
- If an error occurs in retrieval, fear not, just restart and it will startup where it left off.
Now Run it.
getmail -r getmail.gmail # Remember, first time it is run will take a long time.