Under an Arch Linux, I want to use offlineimap to synchronize to GMail like this.
[general]
accounts = Gmail
maxsyncaccounts = 3
[Account Gmail]
localrepository = LocalGmail
remoterepository = RepositoryGmail
autorefresh = 30
quick = 10
postsynchook = mu index --maildir ~/.offlineimap/Gmail
[Repository LocalGmail]
type = GmailMaildir
localfolders = ~/.offlineimap/Gmail
[Repository RepositoryGmail]
type = Gmail
maxconnections = 2
remoteuser = my.gmail.accountname
remotepass = gmailapppassword
folderfilter = lambda foldername: foldername not in ['[Gmail]/All Mail', '[Gmail]/Important']
sslcacertfile = /etc/ssl/certs/ca-certificates.crt
which fails due to some issue with SSL.
$ offlineimap -o -a Gmail
OfflineIMAP 7.2.1
Licensed under the GNU GPL v2 or any later version (with an OpenSSL exception)
imaplib2 v2.57 (bundled), Python v2.7.15, OpenSSL 1.1.1a 20 Nov 2018
Account sync Gmail:
*** Processing account Gmail
Establishing connection to imap.gmail.com:993 (RepositoryGmail)
ERROR: Unknown SSL protocol connecting to host 'imap.gmail.com' for repository 'RepositoryGmail'. OpenSSL responded:
[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:726)
I read elsewhere that I can check the SSL connection by running
$ openssl s_client -showcerts -connect imap.gmail.com:993
[...]
* OK Gimap ready for requests from 217.63.244.188 s26mb317463625edc
which to me suggests that the error is not actually in the SSL connection, but in how offlineimap handles it. The certificate file `` exists and contains a GlobalSign Root CA - R2 certificate.
Just to be sure I have installed six and then offlineimap into both a clean python2.7 and a clean python3.7 virtualenv using their respective pips, and the CERTIFICATE_VERIFY_FAILED persists.
How do I get offlineimap to talk to GMail?
offlineimapapplication to use instead of your username and password.sslcacertfile=option. .... Reference here and here