- Reliable
- 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
~/.certs
instead of the system-wide /etc/ssl/certs
):
$ 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
.fetchmailrc
example to grab your email:
# Set some defaults
defaults protocol pop3,
timeout 300,
nokeep,
mda "procmail -f-"
# Get mail from Gmail
poll pop.gmail.com
user 'gmailusername' there with password 'topsekrit' is localusername here
ssl sslcertck sslcertpath /home/localusername/.certs
Change
gmailusername
, the password, the certs directory (/home/localusername/.certs
) and localusername
to values that make sense for your system. The nokeep
option removes email from the server, so you might want to change that to keep
if 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):
PATH=/bin:/usr/bin:/usr/bin
MAILDIR=$HOME/Mail
LOGFILE=$MAILDIR/procmaillog
# All mail goes to Inbox
:0:
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 -
1 comment:
I have set up everything (hopefully correct) but have one question about how to configure mutt to use all the following settings that we just set up.
Thanks,
TJ
Post a Comment