Fix #503 if any tunnel (preauth_tunnel or transport_tunnel) the hostname should not be required

It's required to modify my change 1ce596d713 because a hostname shouldn't be needed if any tunnel is used. Both tunnels provide a regular IMAP interface which is used by offlineimap.

Signed-off-by: Thomas Merkel <tm@core.io>
This commit is contained in:
Thomas Merkel 2017-10-27 18:52:01 +02:00
parent e1a6feb2d5
commit 949bce071d
No known key found for this signature in database
GPG Key ID: 12AE4593D7A63833
1 changed files with 1 additions and 1 deletions

View File

@ -92,7 +92,7 @@ class IMAPServer(object):
self.af = socket.AF_INET
else:
self.af = socket.AF_UNSPEC
self.hostname = None if self.transport_tunnel else repos.gethost()
self.hostname = None if self.transport_tunnel or self.preauth_tunnel else repos.gethost()
self.port = repos.getport()
if self.port is None:
self.port = 993 if self.usessl else 143