Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

node-red-node-email: IMAP with XOAuth2 fails against Exchange Online – "Logging in is disabled on this server"

未关闭
#1,152 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
半天
新手友好度
42/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
javascript, nodejs

调研方向

The failing check is the LOGINDISABLED test in lib/Connection.js of the bundled imap dependency, which runs before the AUTH=XOAUTH2 path. Start by confirming whether the email node passes its xoauth2 settings through to that library, then decide whether the fix belongs in the node or upstream. Done means IMAP XOAUTH2 authenticates against a server that advertises LOGINDISABLED, with the existing PLAIN and LOGIN paths unchanged.

由索引模型根据 Issue 内容生成。

描述

Which node are you reporting and issue on?

node-red-node-email (email in node, IMAP) – v5.2.5

What are the steps to reproduce?

Configure the email in node for Exchange Online:
Protocol: IMAP
SSL: enabled, STARTTLS: never
Server: outlook.office365.com, Port: 993
Auth type: XOAuth2, Format to SASL: enabled
Token: valid access token from msg.oauth2Response.access_token (client credentials flow, scope https://outlook.office365.com/.default)
Trigger the node.

This setup worked without changes until recently.

What happens?

The node fails with:

Logging in is disabled on this server

No authentication attempt is sent to the server.

Exchange Online now advertises LOGINDISABLED on port 993 (TLS) and no longer offers AUTH=PLAIN:

  • OK Microsoft Exchange IMAP4 service ready. ...
    a1 CAPABILITY
  • CAPABILITY IMAP4 IMAP4rev1 AUTH=XOAUTH2 LOGINDISABLED SASL-IR UIDPLUS MOVE ID UNSELECT CHILDREN IDLE NAMESPACE LITERAL+
    a1 OK CAPABILITY completed.

The bundled imap library (mscdex/node-imap) checks for LOGINDISABLED in lib/Connection.js before checking for AUTH=XOAUTH2, and aborts:

js
if (this.serverSupports('LOGINDISABLED')) {
err = new Error('Logging in is disabled on this server');
...
}

LOGINDISABLED (RFC 3501) only forbids the plaintext LOGIN command. It should not prevent SASL AUTHENTICATE XOAUTH2.

What did you expect to happen?

When XOAuth2 is configured and the server advertises AUTH=XOAUTH2, the node should authenticate via AUTHENTICATE XOAUTH2 regardless of LOGINDISABLED.

Example flow

No response

Environment

Workaround:

Patching lib/Connection.js of the imap dependency resolves the issue:

Connection.js

if (this.serverSupports('LOGINDISABLED') && !this._config.xoauth2 && !this._config.xoauth) {

主要语言
JavaScript
星标
1.1k
派生
610
平均合并
1 天 4 小时
30 天内合并 PR
2

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

node-red/node-red-nodes 的其他 Issue

查看 node-red/node-red-nodes 的全部 Issue

相似的 Issue

更多 JavaScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。