RocketChat / RocketChat/Rocket.Chat

Direct Reply broken

Open
#27,268 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
46.1k
Forks
13.9k
Avg merge
3d 3h
Merged PRs (30d)
130

Description

Description:

Hello Devs.

Direct reply via email was working at least until version 5.1.x. Now with 5.3.1 running I noticed it's broken again. Configuration is the same as with the working rocketchat version. It seems login to the IMAP Server (Dovecot) only works partially.

Nov 15 11:37:01 imap-login: Info: Login: user=<rocketchat>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, mpid=2536, TLS, session=<hDKw73/tHux/AAAB>
Nov 15 11:37:06 imap-login: Info: Disconnected: Connection closed (no auth attempts in 5 secs): user=<>, rip=127.0.0.1, lip=127.0.0.1, TLS: Connection closed, session=<e1D873/tHOx/AAAB>
Nov 15 11:37:06 imap(rocketchat)<2536><hDKw73/tHux/AAAB>: Info: Disconnected: Logged out in=117 out=1417 deleted=0 expunged=0 trashed=0 hdr_count=0 hdr_bytes=0 body_count=0 body_bytes=0

As you can see, the second login attempt has the username missing.

Rocketchat Log looks like this:

{"level":50,"time":"2022-11-15T17:52:50.902Z","pid":4759,"hostname":"pages","name":"EmailInbox","err":{"type":"Error","message":"Timed out while authenticating with server","stack":"Error: Timed out while authenticating with server\n    at Timeout._onTimeout (/opt/rocketchat-5.3.1/programs/server/npm/node_modules/imap/lib/Connection.js:139:17)\n    at listOnTimeout (internal/timers.js:557:17)\n    at processTimers (internal/timers.js:500:7)","source":"timeout-auth"},"msg":"Timed out while authenticating with server"}
{"level":50,"time":"2022-11-15T17:52:50.907Z","pid":4759,"hostname":"pages","name":"EmailInbox","msg":"IMAP error: Timed out while authenticating with server"}

I'm here if you need any more infos.

Steps to reproduce:
  1. Enable Direct Reply
  2. Answer to an notifiaction email via email
  3. Email is not processed by rocketchat
Expected behavior:

Email content goes to the rocketchat channel.

Actual behavior:

It doesn't.

Server Setup Information:
  • Version of Rocket.Chat Server: 5.3.1
  • Operating System: Linux
  • Deployment Method: tar
  • Number of Running Instances: 1
  • DB Replicaset Oplog: yes
  • NodeJS Version: 14.21.1
  • MongoDB Version: 5.05

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the failure with Direct Reply enabled and inspect the EmailInbox error alongside programs/server/npm/node_modules/imap/lib/Connection.js around line 139. Compare the two Dovecot login attempts and verify that replying to a notification email is processed into the Rocket.Chat channel without an authentication timeout.

Written by the indexing model from the issue text.

Assessment

Tech stack
node.js
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.