- Has a lot of storage space
- Has a domain that's free of spammers and other kinds of abusive people
- Supports POP3 and SMTP
Setting up fetchmail to get emails from your GMail inbox isn't hard, and there are numerous guides on the internet on how this can be done. I found this guide to work for me. The following is a cliff notes step by step procedure of what to do (I put my certs into
~/.certsinstead of the system-wide
$ mkdir ~/.certs
$ cd ~/.certs
$ wget -O Equifax_Secure_Certificate_Authority.pem https://www.geotrust.com/resources/root_certificates/certificates/Equifax_Secure_Certificate_Authority.cer
$ chmod 644 Equifax_Secure_Certificate_Authority.pem
$ openssl x509 -in Equifax_Secure_Certificate_Authority.pem -fingerprint -subject -issuer -serial -hash -noout
$ c_rehash .
Now, assuming that you've enabled POP3 in your GMail account preferences already, you can use the following
.fetchmailrcexample to grab your email:
# Set some defaults
defaults protocol pop3,
mda "procmail -f-"
# Get mail from Gmail
user 'gmailusername' there with password 'topsekrit' is localusername here
ssl sslcertck sslcertpath /home/localusername/.certs
gmailusername, the password, the certs directory (
localusernameto values that make sense for your system. The
nokeepoption removes email from the server, so you might want to change that to
keepif you like GMail to retain the messages (I don't know if that option works correctly with GMail, though).
Next you'll need a
.procmailrc. Mine is relatively unsophisticated (everything goes inside the inbox):
# All mail goes to Inbox
For setting up exim4 for mail delivery via gmail, this guide at the Debian wiki gives a solution that works pretty well.
Finally, you might want to automatically retrieve email via a cron job (this does it every 15 minutes):
$ (crontab -l 2> /dev/null | echo '0,15,30,45 * * * * fetchmail') | crontab -