fetchmail gmail via POP3 to macosx for backup

by bram

first, enable POP for all mail in gmail.

$ vi .fetchmailrc

if you have a mta running:

poll pop.gmail.com with proto POP3 and options no dns
user ‘<snip>’ there with password ‘<snip>’ is ‘<snip>’ here options ssl keep sslcertck sslcertpath “/Users/<snip>/.ssl/certs”

if not, deliver via procmail to /var/mail…:

poll pop.gmail.com with proto POP3 and options no dns
user ‘<snip>’ there with password ‘<snip>’ is ‘<snip>’ here and wants mda “/usr/bin/procmail -d %T” options ssl keep sslcertck sslcertpath “/Users/<snip>/.ssl/certs”

$ mkdir -p .ssl/certs

$ openssl s_client -connect pop.gmail.com:995 -showcerts

(copy the key)

$ vi .ssl/certs/gmailpop.pem

(paste the key)

$ wget http://www.geotrust.com/resources/root_certificates/certificates/Equifax_Secure_Certificate_Authority.cer ; mv Equifax_Secure_Certificate_Authority.cer .ssl/certs/equifax.pem ; c_rehash ~/.ssl/certs/

$ fetchmail -v