From 9918f08bc0bf5e3b0ed0e154fe98b3396e108606 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Lach=C3=A8se?= Date: Sun, 16 Sep 2018 19:48:48 +0200 Subject: [PATCH] Connection: default TLS servername to hostname Fixes: https://github.com/mscdex/node-imap/issues/724 Fixes: https://github.com/mscdex/node-imap/issues/866 --- lib/Connection.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/Connection.js b/lib/Connection.js index d0fac1fd..bd31e98b 100644 --- a/lib/Connection.js +++ b/lib/Connection.js @@ -117,6 +117,8 @@ Connection.prototype.connect = function() { if (config.tls) { tlsOptions = {}; + // servername must be set to prevent issues with some imap server and openssl 1.1.1 + tlsOptions.servername = config.host; tlsOptions.host = config.host; // Host name may be overridden the tlsOptions for (var k in config.tlsOptions)