Update/fix fetchmail unix connection to outlook 365

Fix unix fetchmail for Outlook365.

  1. Remove current pem file outlook.office365.com.pem certificate
    ( in ~/.sslcerts )
  2. Run: openssl s_client -connect outlook.office365.com:993
    Copy info from [CONNECTED line to to * OK The Microsoft Exchange IMAP4 service is ready.
  3. Make that the new outlook.office365.com.pem certificate
  4. Get the fingerprint
    openssl s_client -connect outlook.office365.com:993 -showcerts | openssl x509 -fingerprint -noout -md5
    Copy the MD5 Fingerprint and put into .fetchmailrc (next step)
  5. Modify .fetchmailrc:
    poll outlook.office365.com protocol imap username emailaddress@yourdomain.com password yourpasswd
    sslcertpath ~/.sslcerts
    sslfingerprint FF:FF:FF:FF:FF:FF:FF:FF:FF:FF:FF:FF:FF:FF:FF:FF
    (replace above fingerprint with fingerprint from #4)
  6. Launch fetchmail!

Leave a Reply

Your email address will not be published.