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.example.com:993 > 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 imap.example.com 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”

Source: http://mbrisby.blogspot.nl/2007/12/fetchmail-in-ubuntu.html

One thought on “using fetchmail with imap and ssl

Leave a Reply

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

*