When enabling directly reply for imap.gmail.com & GSuite email address, Rocket.Chat can't get a connection to the IMAP server working:
I20200804-16:15:09.779(0) [connection] Error: Error: self signed certificate I20200804-16:15:09.782(0) Error occurred ... I20200804-16:15:09.783(0) Exception in callback of async function: Error: self signed certificate at TLSSocket.onConnectSecure (_tls_wrap.js:1473:34) at TLSSocket.emit (events.js:311:20) at TLSSocket.EventEmitter.emit (domain.js:482:12) at TLSSocket._finishInit (_tls_wrap.js:916:8) at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:686:12) at Socket.ondata (internal/js_stream_socket.js:72:22) at Socket.emit (events.js:311:20) at Socket.EventEmitter.emit (domain.js:482:12) at addChunk (_stream_readable.js:294:12) at readableAddChunk (_stream_readable.js:275:11) at Socket.Readable.push (_stream_readable.js:209:10) at TCP.onStreamRead (internal/stream_base_commons.js:186:23) { code: 'DEPTH_ZERO_SELF_SIGNED_CERT', source: 'socket' } I20200804-16:15:09.784(0) [connection] Closed
In Administration panel, enable Email > Direct Reply with the following config:
Host: imap.gmail.com
Port: 993
Separator: +
Username: Your GSuite Email address
Password: Your GSuite Password
Save changes
See the logs mentioned above in Administration > Logs, "Error: self signed certificate"
Expected behavior:
Expected Rocket.Chat to be able to connect to imap.gmail.com. Alternatively: be able to pass custom tlsOptions to the IMAP config to workaround the issue as mentioned above.
Desktop App or Browser Version: Firefox 79.0 (64-bit)
Operating System: macOS 10.15.6
Additional context
Relevant logs:
As mentioned above:
I20200804-16:15:09.779(0) [connection] Error: Error: self signed certificate I20200804-16:15:09.782(0) Error occurred ... I20200804-16:15:09.783(0) Exception in callback of async function: Error: self signed certificate at TLSSocket.onConnectSecure (_tls_wrap.js:1473:34) at TLSSocket.emit (events.js:311:20) at TLSSocket.EventEmitter.emit (domain.js:482:12) at TLSSocket._finishInit (_tls_wrap.js:916:8) at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:686:12) at Socket.ondata (internal/js_stream_socket.js:72:22) at Socket.emit (events.js:311:20) at Socket.EventEmitter.emit (domain.js:482:12) at addChunk (_stream_readable.js:294:12) at readableAddChunk (_stream_readable.js:275:11) at Socket.Readable.push (_stream_readable.js:209:10) at TCP.onStreamRead (internal/stream_base_commons.js:186:23) { code: 'DEPTH_ZERO_SELF_SIGNED_CERT', source: 'socket' } I20200804-16:15:09.784(0) [connection] Closed
Description:
When enabling directly reply for imap.gmail.com & GSuite email address, Rocket.Chat can't get a connection to the IMAP server working:
Seems like an upstream bug in
node-imap
that also suggest a workaround (namely settingserverName
intlsOptions
). This can't be set via Rocket.Chat, though: https://github.com/RocketChat/Rocket.Chat/blob/f71f0d14b4d3ed5ce180adf52a0adbf02988e65e/app/lib/server/lib/interceptDirectReplyEmails.js#L18.Steps to reproduce:
Expected behavior:
Expected Rocket.Chat to be able to connect to imap.gmail.com. Alternatively: be able to pass custom
tlsOptions
to the IMAP config to workaround the issue as mentioned above.Actual behavior:
Rocket.Chat fails to connect to imap.gmail.com.
Server Setup Information:
Client Setup Information
Shouldn't be relevant, but:
Additional context
Relevant logs:
As mentioned above: