Skip navigation

Long title, I know. Here’s how I did it…

sudo apt-get install fetchmail postfix
cd
nano -w .fetchmailrc

Add the following to the file (replacing everything in CAPS appropriately):

poll pop.gmail.com with proto POP3 and options no dns
user 'YOUR_GMAIL_ADDRESS' there with password 'YOUR_PASSWORD' is \
'YOUR_UBUNTU_USERNAME' here options ssl

Now:

chmod 710 .fetchmailrc
sudo nano -w /etc/crontab

Add the following to your crontab file:

10 7 * * 1 YOUR_UBUNTU_USERNAME fetchmail -k

This will run fetchmail every Sunday and grab your email. It seems either fetchmail or gmail limits each connect to something around 400-500 messages, so to get started, you can run “fetchmail -k” a few dozen times to download all your mail, then let crontab do the rest on a weekly basis.

Your mail is downloaded to a single mbox file in /var/spool/mail/YOUR_UBUNTU_USERNAME. Being a single file makes it nice for backing up, moving, etc. I hear Thunderbird can easily read the file, and I think Apple Mail.app can as well.

Just makes you feel good having all your mail backed up, now doesn’t it?

Advertisements

One Comment

  1. Oh, and you’ll have to enable POP downloading of your messages from your Gmail account.


Leave a Reply

Fill in your details below or click an icon to log in:

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: