diff --git a/offlineimap.conf b/offlineimap.conf index 11b3a21..e866f09 100644 --- a/offlineimap.conf +++ b/offlineimap.conf @@ -844,8 +844,8 @@ remotehost = examplehost # - ssl3 (less desirable than tls1) # - ssl23 (can fallback up to ssl3) # -# When tls_level is not set to tls_compat, the ssl_version configuration option -# must be explicitly set. +# When tls_level is not set to tls_compat and ssl is still enabled, +# the ssl_version configuration option must be explicitly set. # #tls_level = tls_compat diff --git a/offlineimap/imapserver.py b/offlineimap/imapserver.py index 879e352..a412b7d 100644 --- a/offlineimap/imapserver.py +++ b/offlineimap/imapserver.py @@ -100,7 +100,9 @@ class IMAPServer(object): self.sslversion = repos.getsslversion() self.starttls = repos.getstarttls() - if self.tlslevel is not "tls_compat" and self.sslversion is None: + if self.usessl \ + and self.tlslevel is not "tls_compat" \ + and self.sslversion is None: raise Exception("When 'tls_level' is not 'tls_compat' " "the 'ssl_version' must be set explicitly.")