I installed isync[1] on my personal Macbook, which runs OSX 10.11. I used the exact same .mbsyncrc file I wrote for my Macbook at work.

The setup works fine on my work machine. However when using the mbsync command on the personal machine, I get the following output:

SSL error connecting imap.gmail.com ( error:00000014:lib(0):func(0):SSL lib

The work macbook runs a fresh install of OSX 10.11 and Homebrew. The personal one also runs OSX 10.11 and Homebrew, but has known several upgrades since 2013 (it was mountain lion at the time).

Are you aware of any difference between fresh installs and upgrades, that could lead to this kind of error?


  1. http://isync.sourceforge.net/

1 Answer 1


This is a certificate issue. In my .mbsyncrc, I included as CertificateFile the entire certificate chain (Gmail -> Google, Google -> GeoTrust, GeoTrust -> Equifax). This started intermittently throwing the error you're describing around the time I fixed the curl SSL issue.

To fix it, use only the Gmail certificate in your .mbsyncrc. If you're unsure which of the certificates is the Gmail one, run:

openssl s_client -connect imap.gmail.com:993 -showcerts 2>&1 < /dev/null | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' | head -n 27 > gmail.crt

and use the resulting gmail.crt file.

  • This solved "Error, certificate owner does not match hostname example.com" for me on Ubuntu use mbsync, except the openssl command returned 2 certificates, so it was necessary not to use the head command. Then to link the file in the ~/.mbsyncrc file using CertificateFile /path/to/arbitrary.crt.
    – pbhj
    Jan 11, 2019 at 23:16

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .