[PATCH] Fix standard port for SSL/TLS

Sebastian Spaeth Sebastian at SSpaeth.de
Mon Aug 22 09:33:55 BST 2011


443 is of course the https and not the IMAPS standard port. Fix.

Thanks to Daniel Shahaf <d.s at daniel.shahaf.name> for the heads up.

Signed-off-by: Sebastian Spaeth <Sebastian at SSpaeth.de>
---
 offlineimap/imapserver.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/offlineimap/imapserver.py b/offlineimap/imapserver.py
index 707464d..3ce751c 100644
--- a/offlineimap/imapserver.py
+++ b/offlineimap/imapserver.py
@@ -311,7 +311,7 @@ class IMAPServer:
             elif SSLError and isinstance(e, SSLError) and e.errno == 1:
                 # SSL unknown protocol error
                 # happens e.g. when connecting via SSL to a non-SSL service
-                if self.port != 443:
+                if self.port != 993:
                     reason = "Could not connect via SSL to host '%s' and non-s"\
                         "tandard ssl port %d configured. Make sure you connect"\
                         " to the correct port." % (self.hostname, self.port)
-- 
1.7.4.1





More information about the OfflineIMAP-project mailing list