using fetchmail with imap and ssl

I use fetchmail to retrieve my mail from my provider using fetchmail with pop3. Fetchmail keeps complaining from the beginning like this:

fetchmail[]: Warning: the connection is insecure, continuing anyways. (Better use –sslcertck!)

Time to do something about it (and do it secure):

Because I want to use ssl with IMAP I need the IMAP certificate fingerprint of the provider imap mailserver:

openssl s_client -ign_eof -connect > imap.cert

Use CTRL+C to disconnect

Use openssl to find the fingerprint:

openssl x509 -fingerprint -md5 -in imap.cert

The output of this command should contain a line starting with MD5 Fingerprint. Add the fingerprint to your ~/.fetchmailrc of /etc/fetchmailrc Mine looks similar like this:

poll with proto IMAP user “username”, with password “password”  is username here options ssl sslfingerprint “69:2E:80:56:C9:9A:9C:49:92:50:4D:8E:C2:01:0C:85”


One thought on “using fetchmail with imap and ssl

Leave a Reply

Your email address will not be published. Required fields are marked *