In the end now all my mail reside on gmail and I have no local copy (except for thunderbird local file...). I want to keep a local copy of the gmail account to be able to recover from loss of data by google. Also I want it to be synched daily.
Well, the first solution I thought is imapsync.
Here's how to backup a gmail account with it:
imapsync --host1 imap.gmail.com --ssl1 --user1 user@gmail.com \
--password1 gmailPass --host2 local --user2 user@local \
--password2 localPass --prefix2 INBOX.gmail-backup. \
--authuser1 user@gmail.com --authmech1 LOGIN \
--authmech2 LOGIN --syncinternaldates
A more secure way is to put the passwords in 2 file and use --passfile1 and --passfile2.
1 comment:
I've written a python-based cli for getmail4 that pretty much does the same thing. However, with mine you can download individual mailboxes. It's called ImapGrab, and it can be used for any IMAP server. I also added a special option for Gmail. Enjoy!
http://daylightpirates.org/index.php/Programs/ImapGrab
Post a Comment