Note: I have played with setting ssl_version and disabling starttls.
Logs, error
OfflineIMAP 7.3.4
Licensed under the GNU GPL v2 or any later version (with an OpenSSL exception)
imaplib2 v2.101 (bundled), Python v3.10.4, OpenSSL 3.0.2 15 Mar 2022
Now debugging for imap: IMAP protocol debugging
Now debugging for maildir: Maildir repository debugging
Now debugging for thread: Threading debugging
Now debugging for : Other offlineimap related sync messages
Account sync CERN:
[thread]: Register new thread 'Account sync CERN' (account 'CERN')
[imap]: Using authentication mechanisms ['GSSAPI', 'XOAUTH2', 'CRAM-MD5', 'PLAIN', 'LOGIN']
[maildir]: MaildirRepository initialized, sep is '.'
*** Processing account CERN
Establishing connection to imap.cern.ch:993 (CERNremote)
[imap]: CERNremote: level 'tls_compat', version 'None'
ERROR: While attempting to sync account 'CERN'
TLS/SSL connection has been closed (EOF) (_ssl.c:997)
[' File "~/.local/lib/python3.10/site-packages/offlineimap/accounts.py", line 293, in syncrunner\n self.__sync()\n', ' File "~/.local/lib/python3.10/site-packages/offlineimap/accounts.py", line 372, in __sync\n remoterepos.getfolders()\n', ' File "~/.local/lib/python3.10/site-packages/offlineimap/repository/IMAP.py", line 452, in getfolders\n imapobj = self.imapserver.acquireconnection()\n', ' File "~/.local/lib/python3.10/site-packages/offlineimap/imapserver.py", line 557, in acquireconnection\n imapobj = imaplibutil.WrappedIMAP4_SSL(\n', ' File "~/.local/lib/python3.10/site-packages/offlineimap/imaplibutil.py", line 202, in __init__\n super(WrappedIMAP4_SSL, self).__init__(*args, **kwargs)\n', ' File "~/.local/lib/python3.10/site-packages/offlineimap/bundled_imaplib2.py", line 2191, in __init__\n IMAP4.__init__(self, host, port, debug, debug_file, identifier, timeout, debug_buf_lvl)\n', ' File "~/.local/lib/python3.10/site-packages/offlineimap/bundled_imaplib2.py", line 360, in __init__\n self.open(host, port)\n', ' File "~/.local/lib/python3.10/site-packages/offlineimap/imaplibutil.py", line 210, in open\n super(WrappedIMAP4_SSL, self).open(host, port)\n', ' File "~/.local/lib/python3.10/site-packages/offlineimap/bundled_imaplib2.py", line 2204, in open\n self.ssl_wrap_socket()\n', ' File "~/.local/lib/python3.10/site-packages/offlineimap/bundled_imaplib2.py", line 554, in ssl_wrap_socket\n self.sock = ctx.wrap_socket(self.sock, server_hostname=self.host)\n', ' File "/usr/lib/python3.10/ssl.py", line 512, in wrap_socket\n return self.sslsocket_class._create(\n', ' File "/usr/lib/python3.10/ssl.py", line 1070, in _create\n self.do_handshake()\n', ' File "/usr/lib/python3.10/ssl.py", line 1341, in do_handshake\n self._sslobj.do_handshake()\n']
*** Finished account 'CERN' in 0:00
[thread]: Unregister thread 'Account sync CERN'
ERROR: Exceptions occurred during the run!
ERROR: While attempting to sync account 'CERN'
TLS/SSL connection has been closed (EOF) (_ssl.c:997)
Traceback:
File "~/.local/lib/python3.10/site-packages/offlineimap/accounts.py", line 293, in syncrunner
self.__sync()
File "~/.local/lib/python3.10/site-packages/offlineimap/accounts.py", line 372, in __sync
remoterepos.getfolders()
File "~/.local/lib/python3.10/site-packages/offlineimap/repository/IMAP.py", line 452, in getfolders
imapobj = self.imapserver.acquireconnection()
File "~/.local/lib/python3.10/site-packages/offlineimap/imapserver.py", line 557, in acquireconnection
imapobj = imaplibutil.WrappedIMAP4_SSL(
File "~/.local/lib/python3.10/site-packages/offlineimap/imaplibutil.py", line 202, in __init__
super(WrappedIMAP4_SSL, self).__init__(*args, **kwargs)
File "~/.local/lib/python3.10/site-packages/offlineimap/bundled_imaplib2.py", line 2191, in __init__
IMAP4.__init__(self, host, port, debug, debug_file, identifier, timeout, debug_buf_lvl)
File "~/.local/lib/python3.10/site-packages/offlineimap/bundled_imaplib2.py", line 360, in __init__
self.open(host, port)
File "~/.local/lib/python3.10/site-packages/offlineimap/imaplibutil.py", line 210, in open
super(WrappedIMAP4_SSL, self).open(host, port)
File "~/.local/lib/python3.10/site-packages/offlineimap/bundled_imaplib2.py", line 2204, in open
self.ssl_wrap_socket()
File "~/.local/lib/python3.10/site-packages/offlineimap/bundled_imaplib2.py", line 554, in ssl_wrap_socket
self.sock = ctx.wrap_socket(self.sock, server_hostname=self.host)
File "/usr/lib/python3.10/ssl.py", line 512, in wrap_socket
return self.sslsocket_class._create(
File "/usr/lib/python3.10/ssl.py", line 1070, in _create
self.do_handshake()
File "/usr/lib/python3.10/ssl.py", line 1341, in do_handshake
self._sslobj.do_handshake()
Steps to reproduce the error
copy config
run offlineimap
SSL notes
The server uses TLS version 1. The standard OpenSSL configuration in Ubuntu 22.04 does not allow the protocol. To get something useful, I use this openssl config (grabbed from stackoverflow):
General information
offlineimap -V
): offlineimap v7.3.4, imaplib2 v2.101 (bundled)Configuration file offlineimaprc
Note: I have played with setting
ssl_version
and disabling starttls.Logs, error
Steps to reproduce the error
offlineimap
SSL notes
The server uses TLS version 1. The standard OpenSSL configuration in Ubuntu 22.04 does not allow the protocol. To get something useful, I use this openssl config (grabbed from stackoverflow):
Looking up the SSL information on the host (
OPENSSL_CONF=openssl_tls1.cnf openssl s_client -connect imap.cern.ch:993
):Input that openssl config blurb into the
/etc/ssl/openssl.cnf
, but that did not change the error when running offlineimap.What am I doing wrong?