emailengine-app 2.89.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/.ncurc.js +19 -8
- package/.release-please-manifest.json +1 -1
- package/CHANGELOG.md +73 -0
- package/Dockerfile +7 -3
- package/ENVIRONMENT.md +24 -23
- package/README.md +1 -1
- package/bin/healthcheck.js +1 -1
- package/copy-static-files.sh +0 -8
- package/data/google-crawlers.json +1 -1
- package/encrypt.js +1 -4
- package/lib/account/field-codec.js +396 -0
- package/lib/account-assignment.js +26 -9
- package/lib/account.js +196 -462
- package/lib/api-routes/account-routes.js +49 -6
- package/lib/api-routes/route-metadata.js +5 -2
- package/lib/api-routes/submit-routes.js +15 -2
- package/lib/api-token-auth.js +342 -274
- package/lib/arf-detect.js +174 -149
- package/lib/attachment-size.js +29 -0
- package/lib/autodetect-imap-settings.js +482 -296
- package/lib/consts.js +5 -5
- package/lib/db.js +1 -4
- package/lib/email-client/base-client.js +907 -780
- package/lib/email-client/gmail-client.js +557 -450
- package/lib/email-client/imap/cid-parts.js +61 -0
- package/lib/email-client/imap/mailbox.js +376 -422
- package/lib/email-client/imap/sync-operations.js +239 -178
- package/lib/email-client/imap-client.js +5 -5
- package/lib/email-client/message-builder.js +4 -5
- package/lib/email-client/new-message-steps.js +168 -2
- package/lib/email-client/outlook/graph-message.js +266 -0
- package/lib/email-client/outlook/subscription-expiry.js +30 -0
- package/lib/email-client/outlook-client.js +652 -808
- package/lib/get-raw-email.js +338 -232
- package/lib/get-secret.js +1 -4
- package/lib/imapproxy/imap-server.js +5 -5
- package/lib/license-subscription.js +60 -0
- package/lib/load-env.js +48 -0
- package/lib/logger-consts.js +37 -1
- package/lib/logger.js +1 -4
- package/lib/mail-probe.js +157 -0
- package/lib/mcp/tools.js +244 -207
- package/lib/metric-values.js +76 -0
- package/lib/metrics.js +320 -0
- package/lib/oauth/gmail.js +39 -120
- package/lib/oauth/http-request.js +195 -0
- package/lib/oauth/mail-ru.js +33 -60
- package/lib/oauth/outlook.js +37 -137
- package/lib/oauth/pubsub/google.js +176 -117
- package/lib/oauth2-apps.js +440 -463
- package/lib/openapi/build-document.js +10 -10
- package/lib/read-env-value.js +31 -7
- package/lib/redis-backend-warnings.js +70 -0
- package/lib/route-descriptors.js +78 -0
- package/lib/schemas.js +10 -1
- package/lib/sentry-integrations.js +299 -0
- package/lib/sentry.js +75 -27
- package/lib/sso-routes.js +249 -0
- package/lib/sso.js +29 -6
- package/lib/tools.js +17 -28
- package/lib/ui-routes/account-edit-form.js +198 -0
- package/lib/ui-routes/account-page.js +241 -0
- package/lib/ui-routes/account-routes.js +46 -349
- package/lib/ui-routes/account-setup.js +1 -1
- package/lib/ui-routes/auth-routes.js +10 -10
- 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/lib/ui-view-context.js +328 -0
- package/lib/utils/public-suffix.js +22 -101
- package/lib/web-safe-html.js +20 -7
- package/lib/worker-metrics.js +82 -0
- package/list-generate.js +2 -5
- package/package.json +28 -24
- package/sbom.json +360 -1030
- package/scripts/refresh-test-tokens.js +1 -1
- package/server.js +400 -677
- package/static/css/flyonui.css +1 -1
- package/static/css/public.css +55 -1
- package/static/css/src/app.tailwind.css +18 -0
- package/static/js/ee-client.js +2619 -645
- package/static/js/ui.js +12 -2
- package/static/licenses.html +224 -764
- 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 +188 -130
- 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/browse.hbs +19 -1
- 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/workers/api.js +20 -451
- package/data/public_suffix_list.dat +0 -16698
|
@@ -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
|
|
|
@@ -349,8 +356,20 @@ function registerCreateAccount(server, args) {
|
|
|
349
356
|
|
|
350
357
|
webhooksCustomHeaders: settingsSchema.webhooksCustomHeaders.label('AccountWebhooksCustomHeaders'),
|
|
351
358
|
|
|
352
|
-
locale: Joi.string()
|
|
353
|
-
|
|
359
|
+
locale: Joi.string()
|
|
360
|
+
.empty('')
|
|
361
|
+
.max(100)
|
|
362
|
+
.example('fr')
|
|
363
|
+
.description(
|
|
364
|
+
'Language of the text EmailEngine adds to messages sent from this account, such as the "On ... wrote:" line of an inline reply. A language tag like "sv"; a submit request can override it with its own `locale`'
|
|
365
|
+
),
|
|
366
|
+
tz: Joi.string()
|
|
367
|
+
.empty('')
|
|
368
|
+
.max(100)
|
|
369
|
+
.example('Europe/Tallinn')
|
|
370
|
+
.description(
|
|
371
|
+
'Time zone of the dates EmailEngine writes into messages sent from this account. A submit request can override it with its own `tz`'
|
|
372
|
+
)
|
|
354
373
|
})
|
|
355
374
|
.label('CreateAccount')
|
|
356
375
|
.example({
|
|
@@ -534,8 +553,20 @@ function registerUpdateAccount(server, args) {
|
|
|
534
553
|
|
|
535
554
|
webhooksCustomHeaders: settingsSchema.webhooksCustomHeaders.label('AccountWebhooksCustomHeaders'),
|
|
536
555
|
|
|
537
|
-
locale: Joi.string()
|
|
538
|
-
|
|
556
|
+
locale: Joi.string()
|
|
557
|
+
.empty('')
|
|
558
|
+
.max(100)
|
|
559
|
+
.example('fr')
|
|
560
|
+
.description(
|
|
561
|
+
'Language of the text EmailEngine adds to messages sent from this account, such as the "On ... wrote:" line of an inline reply. A language tag like "sv"; a submit request can override it with its own `locale`'
|
|
562
|
+
),
|
|
563
|
+
tz: Joi.string()
|
|
564
|
+
.empty('')
|
|
565
|
+
.max(100)
|
|
566
|
+
.example('Europe/Tallinn')
|
|
567
|
+
.description(
|
|
568
|
+
'Time zone of the dates EmailEngine writes into messages sent from this account. A submit request can override it with its own `tz`'
|
|
569
|
+
)
|
|
539
570
|
})
|
|
540
571
|
.label('UpdateAccount')
|
|
541
572
|
.example({
|
|
@@ -1499,8 +1530,20 @@ function registerGetAccount(server, args) {
|
|
|
1499
1530
|
|
|
1500
1531
|
webhooksCustomHeaders: settingsSchema.webhooksCustomHeaders.label('AccountWebhooksCustomHeaders'),
|
|
1501
1532
|
|
|
1502
|
-
locale: Joi.string()
|
|
1503
|
-
|
|
1533
|
+
locale: Joi.string()
|
|
1534
|
+
.empty('')
|
|
1535
|
+
.max(100)
|
|
1536
|
+
.example('fr')
|
|
1537
|
+
.description(
|
|
1538
|
+
'Language of the text EmailEngine adds to messages sent from this account, such as the "On ... wrote:" line of an inline reply. A language tag like "sv"; a submit request can override it with its own `locale`'
|
|
1539
|
+
),
|
|
1540
|
+
tz: Joi.string()
|
|
1541
|
+
.empty('')
|
|
1542
|
+
.max(100)
|
|
1543
|
+
.example('Europe/Tallinn')
|
|
1544
|
+
.description(
|
|
1545
|
+
'Time zone of the dates EmailEngine writes into messages sent from this account. A submit request can override it with its own `tz`'
|
|
1546
|
+
),
|
|
1504
1547
|
|
|
1505
1548
|
type: AccountTypeSchema,
|
|
1506
1549
|
app: Joi.string().max(256).example('AAABhaBPHscAAAAH').description('OAuth2 application ID'),
|
|
@@ -13,6 +13,8 @@
|
|
|
13
13
|
// It sits under lib/api-routes/ rather than lib/openapi/ so the dependency runs one way. The
|
|
14
14
|
// generator reads route metadata; route modules do not read the generator.
|
|
15
15
|
|
|
16
|
+
const { routePlugins } = require('../route-descriptors');
|
|
17
|
+
|
|
16
18
|
const PLUGIN_OPTIONS_KEY = 'openapi';
|
|
17
19
|
|
|
18
20
|
// The shared no-metadata answer. This accessor runs in the api-token strategy on every API
|
|
@@ -24,12 +26,13 @@ const NO_OPTIONS = Object.freeze({});
|
|
|
24
26
|
/**
|
|
25
27
|
* The documentation and permission metadata a route declares.
|
|
26
28
|
*
|
|
27
|
-
* @param {Object} route - a
|
|
29
|
+
* @param {Object} route - a route descriptor (lib/route-descriptors.js), or a live `request.route`
|
|
28
30
|
* @param {String} [namespace] - which plugins block to read; defaults to `plugins.openapi`
|
|
29
31
|
* @returns {Object} the route's plugins block, or an empty object when it declares none
|
|
30
32
|
*/
|
|
31
33
|
function pluginOptions(route, namespace) {
|
|
32
|
-
|
|
34
|
+
const plugins = routePlugins(route);
|
|
35
|
+
return (plugins && plugins[namespace || PLUGIN_OPTIONS_KEY]) || NO_OPTIONS;
|
|
33
36
|
}
|
|
34
37
|
|
|
35
38
|
/**
|
|
@@ -286,8 +286,21 @@ function buildSubmitMessagePayloadSchema(MAX_ATTACHMENT_SIZE) {
|
|
|
286
286
|
.example('Sent Mail')
|
|
287
287
|
.description("Upload sent message to this folder. By default the account's Sent Mail folder is used."),
|
|
288
288
|
|
|
289
|
-
locale: Joi.string()
|
|
290
|
-
|
|
289
|
+
locale: Joi.string()
|
|
290
|
+
.empty('')
|
|
291
|
+
.max(100)
|
|
292
|
+
.example('fr')
|
|
293
|
+
.description(
|
|
294
|
+
'Language of the text EmailEngine adds to the message, such as the "On ... wrote:" line and the forwarded message headers of `reference.inline`. A language tag like "sv" or "pt-BR"; only the language part is used, and a language without a translation is written in English. Defaults to the locale of the account, then to the locale setting of the instance'
|
|
295
|
+
)
|
|
296
|
+
.label('MessageLocale'),
|
|
297
|
+
tz: Joi.string()
|
|
298
|
+
.empty('')
|
|
299
|
+
.max(100)
|
|
300
|
+
.example('Europe/Tallinn')
|
|
301
|
+
.description(
|
|
302
|
+
'Time zone of the dates EmailEngine writes into the message, such as the date of the quoted message with `reference.inline`. Defaults to the time zone of the account, then to the timezone setting of the instance'
|
|
303
|
+
),
|
|
291
304
|
|
|
292
305
|
sendAt: sendAtSchema,
|
|
293
306
|
deliveryAttempts: deliveryAttemptsSchema,
|