Getmail + GMail

I found an interesting program called getmail for linux (which you can install through ‘apt-get install getmail4’ on Ubuntu), its used for fetching mail from a mail server and delivering it to a folder or MTA.

The following is the configuration file I used to download email from my gmail account to keep a back up (you need to go to setting in GMail if you want to retrieve all your messages).

I found Getmail was only pulling the first 349 emails for me, by adding an options section to the config file with ‘delete = true’ i managed to download all my email. It downloaded messages in batches so i had to run getmail a number of times to get all my email. Interestingly ‘delete = true’ doesn’t seem to actually delete the message for the GMail webbased interface, but it does mean you can’t retrieve it again via POP.

[retriever]
type = SimplePOP3SSLRetriever
server = pop.gmail.com
username = email_address
password = password

[destination]
type = Maildir
path = ~/Mail/your-maildir-folder

[options]
delete = true

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: