emailengine-app 2.87.0 → 2.87.1
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 +2 -4
- package/.release-please-manifest.json +1 -1
- package/CHANGELOG.md +19 -0
- package/Dockerfile +3 -4
- package/bin/emailengine.js +2 -4
- package/bin/healthcheck.js +20 -0
- package/data/google-crawlers.json +1 -1
- package/data/public_suffix_list.dat +3 -7
- package/lib/account/auth-failure-backfill.js +3 -2
- package/lib/account/expected-identity.js +2 -2
- package/lib/account.js +9 -8
- package/lib/api-listener.js +40 -0
- package/lib/api-token-auth.js +406 -0
- package/lib/autodetect-imap-settings.js +36 -3
- package/lib/consts.js +5 -0
- package/lib/email-client/base-client.js +23 -107
- package/lib/email-client/gmail-client.js +7 -4
- package/lib/email-client/imap/mailbox.js +89 -96
- package/lib/email-client/imap/sync-operations.js +13 -6
- package/lib/email-client/imap-client.js +28 -7
- package/lib/email-client/new-message-steps.js +162 -0
- package/lib/email-client/outlook-client.js +4 -2
- package/lib/env-setting-overrides.js +6 -2
- package/lib/export-worker.js +3 -2
- package/lib/export.js +43 -4
- package/lib/get-boolean.js +38 -0
- package/lib/health-probe.js +71 -0
- package/lib/imapproxy/imap-server.js +4 -55
- package/lib/net-tos-guard.js +42 -0
- package/lib/oauth2-apps.js +2 -1
- package/lib/read-env-value.js +19 -7
- package/lib/redis-keys.js +19 -0
- package/lib/redis-operations.js +7 -3
- package/lib/security-headers.js +18 -0
- package/lib/session-default.js +50 -0
- package/lib/settings.js +2 -1
- package/lib/stream-encrypt.js +71 -20
- package/lib/sub-script.js +8 -2
- package/lib/submit-lock.js +84 -0
- package/lib/submit-processor.js +283 -0
- package/lib/templates.js +6 -3
- package/lib/tls/context.js +2 -16
- package/lib/tools.js +8 -30
- package/lib/utils/redis-errors.js +44 -0
- package/lib/webhook-delivery.js +3 -4
- package/lib/worker-rpc-error.js +10 -5
- package/lib/worker-rpc.js +138 -0
- package/package.json +17 -19
- package/sbom.json +370 -1446
- package/server.js +6 -5
- package/static/css/flyonui.css +2 -2
- package/static/licenses.html +253 -1366
- package/translations/messages.pot +16 -16
- package/workers/api.js +41 -465
- package/workers/export.js +14 -55
- package/workers/imap-proxy.js +5 -18
- package/workers/imap.js +27 -49
- package/workers/smtp.js +7 -69
- package/workers/submit.js +21 -279
- package/workers/webhooks.js +7 -72
package/server.js
CHANGED
|
@@ -54,6 +54,7 @@ if (Number(process.versions.node.split('.')[0]) < 20) {
|
|
|
54
54
|
// runtime, so it is named here. Only a warning: one-click DigitalOcean images upgrade EmailEngine on
|
|
55
55
|
// their own but not the Node they run on, and an instance that works today must not stop at its next
|
|
56
56
|
// self-upgrade over a minor version it may never exercise.
|
|
57
|
+
const { accountDataKey } = require('./lib/redis-keys');
|
|
57
58
|
const { MIN_SUPPORTED_NODE, isBelowSupportedNode } = require('./lib/node-version');
|
|
58
59
|
if (isBelowSupportedNode(process.versions.node)) {
|
|
59
60
|
console.error(
|
|
@@ -99,6 +100,7 @@ const {
|
|
|
99
100
|
maybeReloadHttpProxyAgent,
|
|
100
101
|
redactValidationError
|
|
101
102
|
} = require('./lib/tools');
|
|
103
|
+
const { apiPort, apiHost } = require('./lib/api-listener');
|
|
102
104
|
const MetricsCollector = require('./lib/metrics-collector');
|
|
103
105
|
|
|
104
106
|
// Import constants
|
|
@@ -250,9 +252,8 @@ config.workers.export = workerPoolSize(readEnvValue('EENGINE_WORKERS_EXPORT'), c
|
|
|
250
252
|
// API worker count. Values >1 require SO_REUSEPORT (Linux); on unsupported platforms it falls back to 1 at startup.
|
|
251
253
|
config.workers.api = workerPoolSize(readEnvValue('EENGINE_WORKERS_API'), config.workers.api);
|
|
252
254
|
|
|
253
|
-
config.api.port =
|
|
254
|
-
|
|
255
|
-
config.api.host = readEnvValue('EENGINE_HOST') || config.api.host;
|
|
255
|
+
config.api.port = apiPort(config.api);
|
|
256
|
+
config.api.host = apiHost(config.api);
|
|
256
257
|
|
|
257
258
|
config.log.level = readEnvValue('EENGINE_LOG_LEVEL') || config.log.level;
|
|
258
259
|
|
|
@@ -1611,14 +1612,14 @@ let spawnWorker = async (type, opts, slot) => {
|
|
|
1611
1612
|
|
|
1612
1613
|
if (account && accountUpdateKey) {
|
|
1613
1614
|
// Update account-specific counter
|
|
1614
|
-
let accountKey =
|
|
1615
|
+
let accountKey = accountDataKey(account);
|
|
1615
1616
|
update = update.hIncrbyExists(accountKey, `stats:count:${accountUpdateKey}`, 1);
|
|
1616
1617
|
}
|
|
1617
1618
|
|
|
1618
1619
|
update.exec().catch(() => false);
|
|
1619
1620
|
} else if (account && accountUpdateKey) {
|
|
1620
1621
|
// Update only account-specific counter
|
|
1621
|
-
let accountKey =
|
|
1622
|
+
let accountKey = accountDataKey(account);
|
|
1622
1623
|
redis.hIncrbyExists(accountKey, `stats:count:${accountUpdateKey}`, 1).catch(() => false);
|
|
1623
1624
|
}
|
|
1624
1625
|
|