Fix: 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.
Github-ref: https://github.com/OfflineIMAP/offlineimap/issues/503
Reported-by: Ilias Tsitsimpis <i.tsitsimpis@gmail.com>
Signed-off-by: Thomas Merkel <tm@core.io>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
This commit is contained in:
parent
8c9cd5b7e3
commit
ee17e3dc3c
@ -92,7 +92,7 @@ class IMAPServer(object):
|
|||||||
self.af = socket.AF_INET
|
self.af = socket.AF_INET
|
||||||
else:
|
else:
|
||||||
self.af = socket.AF_UNSPEC
|
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()
|
self.port = repos.getport()
|
||||||
if self.port is None:
|
if self.port is None:
|
||||||
self.port = 993 if self.usessl else 143
|
self.port = 993 if self.usessl else 143
|
||||||
|
Loading…
Reference in New Issue
Block a user