Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

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

Offen
#1,152 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
3/5
Geschätzter Aufwand
Ein halber Tag
Anfängerfreundlichkeit
42/100
Issue-Typ
Bug
Klarheit
Größtenteils klar
Aktivitätsstatus
Aktiv
Tech-Stack
javascript, nodejs

Rechercherichtung

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.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

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) {

Vorherrschende Sprache
JavaScript
Sterne
1.1k
Forks
610
Ø Merge
1 T. 4 Std.
Gemergte PRs (30 T.)
2

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus node-red/node-red-nodes

Alle Issues in node-red/node-red-nodes

Ähnliche Issues

Weitere Issues zu JavaScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.