This commit is contained in:
Benedikt Heine 2018-07-02 16:22:51 +00:00 committed by GitHub
commit 99c2e0be0a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 4 deletions

View File

@ -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

View File

@ -100,8 +100,10 @@ class IMAPServer(object):
self.sslversion = repos.getsslversion()
self.starttls = repos.getstarttls()
if self.tlslevel is not "tls_compat" and self.sslversion is None:
raise Exception("When 'tls_version' is not 'tls_compat' "
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.")
self.oauth2_refresh_token = repos.getoauth2_refresh_token()