emailengine-app 2.90.0 → 2.91.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.release-please-manifest.json +1 -1
- package/CHANGELOG.md +29 -0
- package/Dockerfile +2 -2
- package/ENVIRONMENT.md +24 -23
- package/README.md +1 -1
- package/data/google-crawlers.json +1 -1
- package/lib/account-assignment.js +26 -9
- package/lib/account.js +38 -9
- package/lib/api-routes/account-routes.js +7 -0
- package/lib/autodetect-imap-settings.js +401 -64
- package/lib/consts.js +4 -0
- package/lib/email-client/imap-client.js +5 -5
- package/lib/email-client/message-builder.js +4 -5
- package/lib/imapproxy/imap-server.js +5 -5
- package/lib/logger-consts.js +37 -1
- package/lib/mail-probe.js +157 -0
- package/lib/oauth/mail-ru.js +9 -2
- package/lib/read-env-value.js +30 -6
- package/lib/redis-backend-warnings.js +70 -0
- package/lib/tools.js +17 -28
- package/lib/ui-routes/account-routes.js +34 -31
- package/lib/ui-routes/account-setup.js +1 -1
- package/lib/ui-routes/provider-signin.js +187 -0
- package/lib/ui-routes/route-helpers.js +1 -1
- package/lib/ui-routes/unsubscribe-routes.js +2 -2
- package/package.json +13 -13
- package/sbom.json +231 -260
- package/server.js +80 -1
- package/static/css/public.css +55 -1
- package/static/licenses.html +126 -148
- package/translations/de.mo +0 -0
- package/translations/de.po +429 -390
- package/translations/en.mo +0 -0
- package/translations/en.po +342 -257
- package/translations/es.mo +0 -0
- package/translations/es.po +440 -395
- package/translations/et.mo +0 -0
- package/translations/et.po +425 -375
- package/translations/fr.mo +0 -0
- package/translations/fr.po +425 -383
- package/translations/it.mo +0 -0
- package/translations/it.po +441 -394
- package/translations/ja.mo +0 -0
- package/translations/ja.po +408 -335
- package/translations/messages.pot +136 -89
- package/translations/nl.mo +0 -0
- package/translations/nl.po +419 -382
- package/translations/pl.mo +0 -0
- package/translations/pl.po +425 -379
- package/translations/sv.mo +0 -0
- package/translations/sv.po +440 -388
- package/translations/tr.mo +0 -0
- package/translations/tr.po +441 -387
- package/views/account-identity-error.hbs +1 -1
- package/views/account-workspace-error.hbs +2 -2
- package/views/accounts/register/imap-server.hbs +22 -7
- package/views/accounts/register/imap.hbs +3 -0
- package/views/accounts/register/index.hbs +1 -27
- package/views/accounts/register/provider-signin.hbs +58 -0
- package/views/oauth-scope-error.hbs +1 -1
- package/views/partials/provider_signin_button.hbs +30 -0
- package/views/queues/index.hbs +1 -1
- package/views/redirect.hbs +1 -1
- package/views/unsubscribe.hbs +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,34 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [2.91.0](https://github.com/postalsys/emailengine/compare/v2.90.0...v2.91.0) (2026-11-26)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* name the OAuth2 provider in autodiscovery results ([a3c2151](https://github.com/postalsys/emailengine/commit/a3c21513217218a10dad8b7194e19d6cb49145bb))
|
|
9
|
+
* offer OAuth2 sign-in when autodiscovery recognizes Gmail or Microsoft 365 ([ff3189c](https://github.com/postalsys/emailengine/commit/ff3189c5de184cbf420085c9e6de6dfac7d6710f))
|
|
10
|
+
* offer OAuth2 sign-in when the hosted form detects Gmail or Microsoft 365 ([bba7313](https://github.com/postalsys/emailengine/commit/bba731370e9f083f62df6bf0f5eb19269a9723a8))
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Bug Fixes
|
|
14
|
+
|
|
15
|
+
* balance line breaks in the hosted form's headings and sign-in copy ([878bf4c](https://github.com/postalsys/emailengine/commit/878bf4c469ba3b0de6f128b5224186c6424d43b4))
|
|
16
|
+
* balance line breaks in the hosted form's headings and sign-in copy ([2e829fb](https://github.com/postalsys/emailengine/commit/2e829fb61e30ebdae89e28983a20f0b4e5014b70))
|
|
17
|
+
* bump node from `8a32c8c` to `116b800` ([517616b](https://github.com/postalsys/emailengine/commit/517616b6127095c763851ce1abe6155a5c5dead1))
|
|
18
|
+
* bump node from `8a32c8c` to `116b800` ([fd78f06](https://github.com/postalsys/emailengine/commit/fd78f062fa86b1a6e1299f41e30e3cabae5c92da))
|
|
19
|
+
* flag a rejected Mail.ru OAuth client on the app ([7490e6b](https://github.com/postalsys/emailengine/commit/7490e6b3ecc98b468df0b72468d9334eb5ccd7fc))
|
|
20
|
+
* honor a file-backed log level in the main process, add EENGINE_LOG_REDACT_HEADERS ([d2fea14](https://github.com/postalsys/emailengine/commit/d2fea14670afa53617c3da7e8ce7d959a198f55a))
|
|
21
|
+
* polish public UI copy and translations ([96a1f01](https://github.com/postalsys/emailengine/commit/96a1f01f36e6fb061f3768888c9270a577d1c43c))
|
|
22
|
+
* recognize smtp.google.com as a Google Workspace MX ([c4bb501](https://github.com/postalsys/emailengine/commit/c4bb5010a7deb48a33582ea5f562525493a02ed8))
|
|
23
|
+
* recover accounts whose assignment or worker dispatch was lost ([92cfab9](https://github.com/postalsys/emailengine/commit/92cfab95de7e985d4fee67d1074c34c0df339314))
|
|
24
|
+
* resolve mail settings for domains that publish none ([90ed041](https://github.com/postalsys/emailengine/commit/90ed0412e9193575e958b4a36467faa0eb7f538e))
|
|
25
|
+
* resolve mail settings for domains that publish none ([5cb4bd4](https://github.com/postalsys/emailengine/commit/5cb4bd4c047424e293dd4cf4d896aa8000542666))
|
|
26
|
+
* update dependencies ([740e988](https://github.com/postalsys/emailengine/commit/740e9886ffdb37b11d2161632dab55a03adb62bd))
|
|
27
|
+
* update dependencies ([d066d88](https://github.com/postalsys/emailengine/commit/d066d8822490772e0c24c606d01ed0f13bbfafd3))
|
|
28
|
+
* update dependencies ([e6f506b](https://github.com/postalsys/emailengine/commit/e6f506b82757d66a871da857d3fa6071b4288829))
|
|
29
|
+
* update dependencies ([9c73807](https://github.com/postalsys/emailengine/commit/9c73807861a97018fcdbd444fab0789a170ab28c))
|
|
30
|
+
* warn about Amazon ElastiCache only when the primary has no replica ([2a97862](https://github.com/postalsys/emailengine/commit/2a97862e8398627c6f1147978ac51caa4e4628c4))
|
|
31
|
+
|
|
3
32
|
## [2.90.0](https://github.com/postalsys/emailengine/compare/v2.89.0...v2.90.0) (2026-11-20)
|
|
4
33
|
|
|
5
34
|
|
package/Dockerfile
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
# here; the runtime stage below copies out only the finished tree, so npm and its dependencies never
|
|
12
12
|
# reach the published image. npm accounted for 38 of the 59 HIGH/CRITICAL findings in the old image
|
|
13
13
|
# (a vendored tar, pacote, sigstore, minimatch) and nothing at runtime ever invokes it.
|
|
14
|
-
FROM node:24-alpine@sha256:
|
|
14
|
+
FROM node:24-alpine@sha256:116b800c3754b440ee0aa3ed2f20f5bf3d99a554bfd9adeea09ea8017f6e85f5 AS builder
|
|
15
15
|
|
|
16
16
|
ARG BUILDPLATFORM
|
|
17
17
|
ARG TARGETPLATFORM
|
|
@@ -78,7 +78,7 @@ RUN : "${EE_COMMIT_HASH:?EE_COMMIT_HASH build arg is required, e.g. --build-arg
|
|
|
78
78
|
&& rm -f update-info.sh
|
|
79
79
|
|
|
80
80
|
# Runtime stage.
|
|
81
|
-
FROM node:24-alpine@sha256:
|
|
81
|
+
FROM node:24-alpine@sha256:116b800c3754b440ee0aa3ed2f20f5bf3d99a554bfd9adeea09ea8017f6e85f5
|
|
82
82
|
|
|
83
83
|
# `apk upgrade` patches the Alpine packages that the base image itself lags on - at the time of
|
|
84
84
|
# writing node:24-alpine still carries an openssl below 3.5.8-r0. dumb-init reaps zombies as PID 1.
|
package/ENVIRONMENT.md
CHANGED
|
@@ -16,29 +16,30 @@ entry says otherwise. Sizes take a number with a unit (`5MB`, `1GB`) or plain by
|
|
|
16
16
|
|
|
17
17
|
## Core
|
|
18
18
|
|
|
19
|
-
| Variable | Default | Description
|
|
20
|
-
| --------------------------------------- | -------------------------- |
|
|
21
|
-
| `EENGINE_REDIS` | `redis://127.0.0.1:6379/8` | Redis connection URI. `REDIS_URL` is read when this is unset.
|
|
22
|
-
| `EENGINE_REDIS_TLS_REJECT_UNAUTHORIZED` | `true` | Set to `false` to accept a Redis server certificate no CA signed, for managed services such as the Heroku Redis add-on. Applies to a `rediss://` connection only; every other connection is still verified.
|
|
23
|
-
| `EENGINE_REDIS_PREFIX` | none | Prefix for every Redis key, so several instances can share one database.
|
|
24
|
-
| `EENGINE_SECRET` | none | Encryption secret for stored credentials. Changing it makes stored credentials unreadable; use `emailengine encrypt` to rotate.
|
|
25
|
-
| `EENGINE_PORT` | `3000` | API and admin UI port. `PORT` is read when this is unset.
|
|
26
|
-
| `EENGINE_HOST` | `127.0.0.1` | API and admin UI bind address.
|
|
27
|
-
| `EENGINE_TIMEOUT` | `10s` | How long an API request waits for a worker to answer (duration).
|
|
28
|
-
| `EENGINE_LOG_LEVEL` | `trace` | Logging level.
|
|
29
|
-
| `EENGINE_LOG_RAW` | `false` | Log raw IMAP and SMTP protocol traffic. Credentials are masked either way.
|
|
30
|
-
| `
|
|
31
|
-
| `
|
|
32
|
-
| `
|
|
33
|
-
| `
|
|
34
|
-
| `
|
|
35
|
-
| `
|
|
36
|
-
| `
|
|
37
|
-
| `
|
|
38
|
-
| `
|
|
39
|
-
| `
|
|
40
|
-
| `
|
|
41
|
-
| `
|
|
19
|
+
| Variable | Default | Description |
|
|
20
|
+
| --------------------------------------- | -------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
21
|
+
| `EENGINE_REDIS` | `redis://127.0.0.1:6379/8` | Redis connection URI. `REDIS_URL` is read when this is unset. |
|
|
22
|
+
| `EENGINE_REDIS_TLS_REJECT_UNAUTHORIZED` | `true` | Set to `false` to accept a Redis server certificate no CA signed, for managed services such as the Heroku Redis add-on. Applies to a `rediss://` connection only; every other connection is still verified. |
|
|
23
|
+
| `EENGINE_REDIS_PREFIX` | none | Prefix for every Redis key, so several instances can share one database. |
|
|
24
|
+
| `EENGINE_SECRET` | none | Encryption secret for stored credentials. Changing it makes stored credentials unreadable; use `emailengine encrypt` to rotate. |
|
|
25
|
+
| `EENGINE_PORT` | `3000` | API and admin UI port. `PORT` is read when this is unset. |
|
|
26
|
+
| `EENGINE_HOST` | `127.0.0.1` | API and admin UI bind address. |
|
|
27
|
+
| `EENGINE_TIMEOUT` | `10s` | How long an API request waits for a worker to answer (duration). |
|
|
28
|
+
| `EENGINE_LOG_LEVEL` | `trace` | Logging level. |
|
|
29
|
+
| `EENGINE_LOG_RAW` | `false` | Log raw IMAP and SMTP protocol traffic. Credentials are masked either way. |
|
|
30
|
+
| `EENGINE_LOG_REDACT_HEADERS` | none | Comma-separated request header names whose values are replaced with `[Redacted]` in the logs, in addition to `Authorization` and `Cookie`. For example a shared-secret header that a WAF or proxy in front of EmailEngine requires. |
|
|
31
|
+
| `EENGINE_SETTINGS` | none | JSON object of settings, re-applied on every start. A value saved in the admin UI for one of its keys reverts at the next restart. |
|
|
32
|
+
| `EENGINE_PREPARED_TOKEN` | none | A base64url msgpack-encoded API token to provision at start. |
|
|
33
|
+
| `EENGINE_PREPARED_PASSWORD` | none | A base64url PBKDF2 admin password hash to apply at start. Writing a different hash ends every admin session. |
|
|
34
|
+
| `EENGINE_PREPARED_LICENSE` | none | A license key to apply at start. |
|
|
35
|
+
| `EENGINE_REQUIRE_API_AUTH` | none | Initial value for whether API requests need an access token (`true`/`false`), used when the setting has never been saved. |
|
|
36
|
+
| `EENGINE_ENABLE_OAUTH_TOKENS_API` | none | Initial value for the setting that allows the OAuth2 access token API, used when it has never been saved. |
|
|
37
|
+
| `EENGINE_CONNECTION_SETUP_DELAY` | `0` | Pause between two account assignments while accounts are handed to workers, to spread the connection load at start (duration). |
|
|
38
|
+
| `EENGINE_UPDATE_CHECK_DISABLED` | `false` | Stop checking for new EmailEngine releases. |
|
|
39
|
+
| `EENGINE_BEACON_DISABLED` | `false` | Opt out of the anonymized feature-usage diagnostics sent with license validation. License validation itself is unaffected. |
|
|
40
|
+
| `EENGINE_DISABLE_SETUP_WARNINGS` | `false` | Hide the setup warning banners in the admin UI. |
|
|
41
|
+
| `EENGINE_DOCEAN` | none | Set by the DigitalOcean one-click image; adjusts the dashboard and diagnostics. Not for manual use. |
|
|
42
|
+
| `EENGINE_INSTALL_SCRIPT` | none | Set by the install script; adjusts the dashboard and diagnostics. Not for manual use. |
|
|
42
43
|
|
|
43
44
|
## Workers and queues
|
|
44
45
|
|
package/README.md
CHANGED
|
@@ -46,7 +46,7 @@ A headless email client application that provides access to IMAP, SMTP, Gmail AP
|
|
|
46
46
|
> [!IMPORTANT]
|
|
47
47
|
> EmailEngine uses Redis as its primary database, not as a cache. Set `maxmemory-policy` to `noeviction` and give Redis enough memory for your workload - with any other policy Redis can drop sync state, which makes already-synced messages look new and generates duplicate webhooks.
|
|
48
48
|
>
|
|
49
|
-
> Redis Cluster and Amazon ElastiCache
|
|
49
|
+
> Redis Cluster is **not** supported, and neither is anything that always runs as one: Amazon MemoryDB, and Amazon ElastiCache with cluster mode or the durability option enabled. Use a standard Redis primary instance. Amazon ElastiCache with cluster mode disabled works only with at least one replica and Multi-AZ automatic failover: a single ElastiCache node starts empty when AWS replaces it, and does not reload its snapshot. EmailEngine warns about all of the above on the dashboard when it detects them.
|
|
50
50
|
|
|
51
51
|
> [!NOTE]
|
|
52
52
|
> While Redis does not officially support Windows, alternatives like [Memurai](https://www.memurai.com/) are available.
|
|
@@ -96,19 +96,17 @@ function forgetAccount({ workerAssigned, assigned, unassigned }, account) {
|
|
|
96
96
|
}
|
|
97
97
|
|
|
98
98
|
/**
|
|
99
|
-
* Whether an account whose `assign` call failed goes back to unassigned
|
|
100
|
-
* exists fails deterministically on every pass, so it is
|
|
101
|
-
*
|
|
102
|
-
*
|
|
103
|
-
*
|
|
99
|
+
* Whether an account whose `assign` call failed goes back to unassigned: only while it is still
|
|
100
|
+
* registered. An account that no longer exists fails deterministically on every pass, so it is
|
|
101
|
+
* dropped, which also covers a delete that raced the pass. A 404 from the worker is not proof of
|
|
102
|
+
* that on its own: a delegated account answers 404 when the account it delegates to is missing, and
|
|
103
|
+
* dropping it on that left the account unsynced until a restart even after the other one was
|
|
104
|
+
* added. A failed membership check keeps the account, a lost retry costs more than a wasted one
|
|
104
105
|
* @param {string} account
|
|
105
106
|
* @param {Function} isRegistered - async account -> boolean
|
|
106
107
|
* @returns {Promise<boolean>}
|
|
107
108
|
*/
|
|
108
|
-
async function shouldRequeueFailedAssignment(
|
|
109
|
-
if (err && err.statusCode === 404) {
|
|
110
|
-
return false;
|
|
111
|
-
}
|
|
109
|
+
async function shouldRequeueFailedAssignment(account, isRegistered) {
|
|
112
110
|
try {
|
|
113
111
|
return !!(await isRegistered(account));
|
|
114
112
|
} catch {
|
|
@@ -116,6 +114,24 @@ async function shouldRequeueFailedAssignment(err, account, isRegistered) {
|
|
|
116
114
|
}
|
|
117
115
|
}
|
|
118
116
|
|
|
117
|
+
/**
|
|
118
|
+
* Registered accounts the assignment state does not know about: neither assigned to a worker nor
|
|
119
|
+
* waiting for one. A `new` dispatch that never reached the main thread leaves an account like that,
|
|
120
|
+
* and nothing else would pick it up before a restart
|
|
121
|
+
* @param {Iterable<string>} registered - Members of the registered account set
|
|
122
|
+
* @param {Object} state - `assigned` and `unassigned`
|
|
123
|
+
* @returns {string[]}
|
|
124
|
+
*/
|
|
125
|
+
function findUntrackedAccounts(registered, { assigned, unassigned }) {
|
|
126
|
+
const untracked = new Set();
|
|
127
|
+
for (const account of registered) {
|
|
128
|
+
if (!assigned.has(account) && !unassigned.has(account)) {
|
|
129
|
+
untracked.add(account);
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
return Array.from(untracked);
|
|
133
|
+
}
|
|
134
|
+
|
|
119
135
|
/**
|
|
120
136
|
* Picks accounts to move onto a worker that joined after the fleet was already serving them (a
|
|
121
137
|
* worker that restarted after the failsafe reassignment gave its accounts to the survivors).
|
|
@@ -190,5 +206,6 @@ module.exports = {
|
|
|
190
206
|
requeueFailedAccounts,
|
|
191
207
|
forgetAccount,
|
|
192
208
|
shouldRequeueFailedAssignment,
|
|
209
|
+
findUntrackedAccounts,
|
|
193
210
|
planRebalance
|
|
194
211
|
};
|
package/lib/account.js
CHANGED
|
@@ -29,7 +29,16 @@ const tokens = require('./tokens');
|
|
|
29
29
|
const { Export } = require('./export');
|
|
30
30
|
const { publishRevocation } = require('./revocation-events');
|
|
31
31
|
const { randomId } = require('./utils/random-id');
|
|
32
|
-
const {
|
|
32
|
+
const {
|
|
33
|
+
REDIS_PREFIX,
|
|
34
|
+
AUTH_FAILURE_DISABLED_FIELD,
|
|
35
|
+
AUTH_FAILURE_DISABLED_LEGACY_DESCRIPTION,
|
|
36
|
+
OAUTH_TOKEN_MIN_VALIDITY,
|
|
37
|
+
DISPATCH_RETRY_DELAY
|
|
38
|
+
} = require('./consts');
|
|
39
|
+
|
|
40
|
+
// Worker commands notifyWorker() sends a second time when the first dispatch fails
|
|
41
|
+
const RETRIED_WORKER_COMMANDS = new Set(['update', 'reconnect']);
|
|
33
42
|
const { webSafeTextResponse, applyWebSafeHtmlOptions } = require('./web-safe-html');
|
|
34
43
|
const { checkAccountScopes: checkScopes } = require('./oauth/scope-checker');
|
|
35
44
|
const { ACCOUNT_STATES, ERROR_STATES, calculateEffectiveState, validateAccountState, getDisplayState, formatLastError } = require('./account/account-state');
|
|
@@ -236,6 +245,7 @@ class Account {
|
|
|
236
245
|
this.timeout = options.timeout ? Number(options.timeout) : 0;
|
|
237
246
|
|
|
238
247
|
this.call = options.call; // async method to request data from parent
|
|
248
|
+
this.dispatchRetryDelay = options.dispatchRetryDelay ?? DISPATCH_RETRY_DELAY;
|
|
239
249
|
|
|
240
250
|
this.logger = options.logger || logger;
|
|
241
251
|
}
|
|
@@ -904,8 +914,14 @@ class Account {
|
|
|
904
914
|
* Sends a command to the worker that owns the account after a change was already written.
|
|
905
915
|
* The write stands either way, so a dispatch that fails (an RPC timeout, no worker yet) is
|
|
906
916
|
* logged rather than thrown: an error response for a saved change made a retried create report
|
|
907
|
-
* the account as existing and a retried delete answer 404.
|
|
908
|
-
*
|
|
917
|
+
* the account as existing and a retried delete answer 404.
|
|
918
|
+
*
|
|
919
|
+
* A failed `update` or `reconnect` is sent once more after DISPATCH_RETRY_DELAY, in the
|
|
920
|
+
* background, since a short main-thread stall would otherwise leave the worker on the old
|
|
921
|
+
* settings until its next reconnect; both are safe to repeat. `new` and `delete` are not
|
|
922
|
+
* retried: a lost `new` is picked up by the main thread's orphaned-account sweep, which also
|
|
923
|
+
* announces it, while a repeated one could announce the account twice, and a `delete` sent late
|
|
924
|
+
* could tear down an account re-created under the same id in the meantime.
|
|
909
925
|
*
|
|
910
926
|
* @returns {Promise<Boolean>} Whether the worker acknowledged the command
|
|
911
927
|
*/
|
|
@@ -916,18 +932,31 @@ class Account {
|
|
|
916
932
|
return false;
|
|
917
933
|
}
|
|
918
934
|
try {
|
|
919
|
-
await this.
|
|
920
|
-
cmd,
|
|
921
|
-
account: this.account,
|
|
922
|
-
timeout: this.timeout
|
|
923
|
-
});
|
|
935
|
+
await this.dispatchToWorker(cmd);
|
|
924
936
|
return true;
|
|
925
937
|
} catch (err) {
|
|
926
|
-
|
|
938
|
+
const retry = RETRIED_WORKER_COMMANDS.has(cmd);
|
|
939
|
+
this.logger.error({ msg: 'Failed to notify the worker after a saved account change', account: this.account, cmd, retry, err });
|
|
940
|
+
if (retry) {
|
|
941
|
+
setTimeout(() => {
|
|
942
|
+
this.dispatchToWorker(cmd).then(
|
|
943
|
+
() => this.logger.info({ msg: 'Notified the worker on retry', account: this.account, cmd }),
|
|
944
|
+
err => this.logger.error({ msg: 'Failed to notify the worker on retry', account: this.account, cmd, err })
|
|
945
|
+
);
|
|
946
|
+
}, this.dispatchRetryDelay).unref();
|
|
947
|
+
}
|
|
927
948
|
return false;
|
|
928
949
|
}
|
|
929
950
|
}
|
|
930
951
|
|
|
952
|
+
async dispatchToWorker(cmd) {
|
|
953
|
+
await this.call({
|
|
954
|
+
cmd,
|
|
955
|
+
account: this.account,
|
|
956
|
+
timeout: this.timeout
|
|
957
|
+
});
|
|
958
|
+
}
|
|
959
|
+
|
|
931
960
|
/**
|
|
932
961
|
* The read-modify-write half of update(): loads the stored account, merges partial credential
|
|
933
962
|
* objects into it and writes the result back. Runs under the update lock.
|
|
@@ -97,6 +97,13 @@ const discoveredEmailSettingsSchema = Joi.object({
|
|
|
97
97
|
.unknown()
|
|
98
98
|
.description('App password requirements for the provider, if known')
|
|
99
99
|
.label('DiscoveredAppPasswordInfo'),
|
|
100
|
+
provider: Joi.string()
|
|
101
|
+
.valid('gmail', 'outlook')
|
|
102
|
+
.example('outlook')
|
|
103
|
+
.description(
|
|
104
|
+
'OAuth2 provider the mailbox signs in with, when the address or its domain identifies one: `gmail` for Gmail and Google Workspace, `outlook` for Outlook.com and Microsoft 365. Matches the `provider` of an OAuth2 application (see `GET /v1/oauth2`), so a setup flow can offer that sign-in instead of asking for a password. Absent when unknown.'
|
|
105
|
+
)
|
|
106
|
+
.label('DiscoveredOAuth2Provider'),
|
|
100
107
|
_source: Joi.string().example('srv').description('Source for the detected info')
|
|
101
108
|
}).label('DiscoveredEmailSettings');
|
|
102
109
|
|