RocketChat / RocketChat/Rocket.Chat

Email inbox with Office 365 IMAP

Open
#30,939 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Description:

Hi,
recently Microsoft permanently disabled Basic Auth for Office365 IMAP clients.
Since I wanted to enable a mail inbox of a Office365 account, is there a way to bypass the mandatory Microsoft OAuth flow?

I am using rocket chat self hosted on Docker.

Many thanks in advance!

Steps to reproduce:
  1. Enabled SMTP and IMAP for the user from Office365 Admin Center.
  2. Created app password to bypass the 2MFA.
  3. Configured the inbox in the rocketchat email inbox section, disabling the SSL for the smtp and keeping it enabled for the IMAP.
Expected behavior:

The account is added.

Actual behavior:

2023-11-13T16:15:29.399Z 50 pid=1 hostname=63c8458cb511 name=EmailInbox msg=IMAP error err={"type":"Error","message":"LOGIN failed.","stack":"Error: LOGIN failed.\n at Connection._resTagged (/app/bundle/programs/server/npm/node_modules/imap/lib/Connection.js:1502:11)\n at Parser. (/app/bundle/programs/server/npm/node_modules/imap/lib/Connection.js:194:10)\n at Parser.emit (events.js:400:28)\n at Parser.emit (domain.js:475:12)\n at Parser._resTagged (/app/bundle/programs/server/npm/node_modules/imap/lib/Parser.js:175:10)\n at Parser._parse (/app/bundle/programs/server/npm/node_modules/imap/lib/Parser.js:139:16)\n at Parser._tryread (/app/bundle/programs/server/npm/node_modules/imap/lib/Parser.js:82:15)\n at TLSSocket.Parser.cbReadable (/app/bundle/programs/server/npm/node_modules/imap/lib/Parser.js:53:12)\n at TLSSocket.emit (events.js:400:28)\n at TLSSocket.emit (domain.js:475:12)\n at emitReadable (internal/streams/readable.js:555:12)\n at processTicksAndRejections (internal/process/task_queues.js:81:21)","source":"authentication"}

Server Setup Information:
  • Rocketchat version 6.4.5
  • Operating System: Ubuntu with Docker last version
  • Deployment Method: Docker
  • Number of Running Instances: 1
  • MongoDB Version: 4.4.15
Relevant logs:

2023-11-13T16:15:37.805Z 50 pid=1 hostname=63c8458cb511 name=EmailInbox msg=IMAP error err={"type":"Error","message":"LOGIN failed.","stack":"Error: LOGIN failed.\n at Connection._resTagged (/app/bundle/programs/server/npm/node_modules/imap/lib/Connection.js:1502:11)\n at Parser. (/app/bundle/programs/server/npm/node_modules/imap/lib/Connection.js:194:10)\n at Parser.emit (events.js:400:28)\n at Parser.emit (domain.js:475:12)\n at Parser._resTagged (/app/bundle/programs/server/npm/node_modules/imap/lib/Parser.js:175:10)\n at Parser._parse (/app/bundle/programs/server/npm/node_modules/imap/lib/Parser.js:139:16)\n at Parser._tryread (/app/bundle/programs/server/npm/node_modules/imap/lib/Parser.js:82:15)\n at TLSSocket.Parser.cbReadable (/app/bundle/programs/server/npm/node_modules/imap/lib/Parser.js:53:12)\n at TLSSocket.emit (events.js:400:28)\n at TLSSocket.emit (domain.js:475:12)\n at emitReadable (internal/streams/readable.js:555:12)\n at processTicksAndRejections (internal/process/task_queues.js:81:21)","source":"authentication"}
2023-11-13T16:15:38.060Z 50 pid=1 hostname=63c8458cb511 name=EmailInbox msg=IMAP error err={"type":"Error","message":"Timed out while connecting to server","stack":"Error: Timed out while connecting to server\n at Timeout._onTimeout (/app/bundle/programs/server/npm/node_modules/imap/lib/Connection.js:280:15)\n at listOnTimeout (internal/timers.js:557:17)\n at processTimers (internal/timers.js:500:7)","source":"timeout"}

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

The report identifies Rocket.Chat's email inbox configuration and the bundled imap library's Connection.js authentication error path, but names no project file or test. Start by tracing the email inbox authentication flow from its configuration entry point and determine the expected OAuth support for Office 365 IMAP. Done means the supported authentication behavior and required change are clearly defined and verified.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker
Domain
authentication, backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.