emailengine-app 2.84.2 → 2.86.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 +29 -9
- package/.prettierignore +5 -1
- package/.prettierrc.js +2 -0
- package/.release-please-manifest.json +1 -1
- package/CHANGELOG.md +107 -0
- package/Dockerfile +20 -1
- package/ENVIRONMENT.md +139 -0
- package/README.md +2 -2
- package/bin/emailengine.js +434 -408
- package/config/default.toml +2 -0
- package/copy-static-files.sh +41 -14
- package/data/google-crawlers.json +1 -1
- package/data/public_suffix_list.dat +16563 -0
- package/eslint.config.js +81 -99
- package/lib/account-assignment.js +19 -0
- package/lib/account.js +230 -170
- package/lib/api-error-codes.js +49 -0
- package/lib/api-reference/format.js +4 -3
- package/lib/api-reference/model.js +6 -1
- package/lib/api-routes/account-routes.js +255 -38
- package/lib/api-routes/blocklist-routes.js +91 -4
- package/lib/api-routes/delivery-test-routes.js +27 -4
- package/lib/api-routes/export-routes.js +28 -2
- package/lib/api-routes/gateway-routes.js +110 -12
- package/lib/api-routes/index.js +4 -0
- package/lib/api-routes/license-routes.js +2 -2
- package/lib/api-routes/mailbox-routes.js +44 -5
- package/lib/api-routes/message-routes.js +112 -10
- package/lib/api-routes/oauth2-app-routes.js +63 -23
- package/lib/api-routes/outbox-routes.js +97 -52
- package/lib/api-routes/permission-map.js +67 -7
- package/lib/api-routes/scoped-routes.js +74 -0
- package/lib/api-routes/settings-routes.js +34 -6
- package/lib/api-routes/stats-routes.js +5 -1
- package/lib/api-routes/submit-routes.js +337 -309
- package/lib/api-routes/template-routes.js +45 -8
- package/lib/api-routes/token-routes.js +152 -100
- package/lib/api-routes/webhook-delivery-routes.js +262 -0
- package/lib/api-routes/webhook-route-routes.js +132 -6
- package/lib/bounce-detect.js +397 -205
- package/lib/calendar-event.js +81 -1
- package/lib/consts.js +38 -45
- package/lib/db.js +14 -6
- package/lib/delivery-error.js +6 -0
- package/lib/deprecations.js +270 -0
- package/lib/email-client/base-client.js +137 -184
- package/lib/email-client/fallback-poll.js +62 -0
- package/lib/email-client/gmail-client.js +60 -22
- package/lib/email-client/imap/adaptive-idle-store.js +73 -0
- package/lib/email-client/imap/adaptive-idle.js +278 -0
- package/lib/email-client/imap/connection-errors.js +14 -1
- package/lib/email-client/imap/idle-settings.js +31 -5
- package/lib/email-client/imap/listing-diff.js +37 -0
- package/lib/email-client/imap/mailbox.js +372 -242
- package/lib/email-client/imap/subconnection.js +8 -30
- package/lib/email-client/imap/sync-operations.js +220 -127
- package/lib/email-client/imap-client.js +228 -164
- package/lib/email-client/message-builder.js +14 -79
- package/lib/email-client/notification-handler.js +1 -2
- package/lib/email-client/outlook-client.js +372 -338
- package/lib/email-client/smtp-pool-manager.js +16 -13
- package/lib/email-client/sync-state-fields.js +19 -0
- package/lib/encrypt.js +157 -41
- package/lib/enum-descriptions.js +3 -1
- package/lib/env-setting-overrides.js +288 -0
- package/lib/export-worker.js +751 -0
- package/lib/export.js +64 -15
- package/lib/gateway.js +19 -4
- package/lib/get-raw-email.js +25 -107
- package/lib/hapi-request-logger.js +107 -0
- package/lib/health.js +75 -0
- package/lib/imapproxy/imap-core/README.md +6 -5
- package/lib/lock-run.js +119 -0
- package/lib/logger-consts.js +48 -0
- package/lib/logger.js +1 -1
- package/lib/lua/z-head-scores.lua +28 -0
- package/lib/mcp/tools.js +37 -8
- package/lib/network-errors.js +1 -1
- package/lib/node-version.js +24 -0
- package/lib/notify-attachments.js +36 -0
- package/lib/oauth/outlook-mailbox.js +35 -0
- package/lib/oauth/state.js +24 -0
- package/lib/oauth2-apps.js +631 -656
- package/lib/outbox.js +184 -54
- package/lib/parse-message.js +3 -3
- package/lib/pbkdf2-phc.js +1 -1
- package/lib/privileged-settings.js +2 -2
- package/lib/queue-browser/definitions.js +11 -0
- package/lib/queue-browser/index.js +68 -19
- package/lib/queue-job-actions.js +18 -1
- package/lib/queue-retention.js +48 -12
- package/lib/queue-stats.js +11 -2
- package/lib/read-env-value.js +3 -0
- package/lib/redis-memory-warnings.js +99 -0
- package/lib/redis-reconnect.js +29 -0
- package/lib/request-timing.js +23 -0
- package/lib/respawn-backoff.js +35 -0
- package/lib/rewrite-text-nodes.js +19 -59
- package/lib/schemas.js +164 -40
- package/lib/settings.js +6 -2
- package/lib/smtp-auth.js +19 -1
- package/lib/sso.js +1 -1
- package/lib/swagger-options.js +1 -1
- package/lib/thread-diagnostics.js +63 -0
- package/lib/timezones.js +109 -0
- package/lib/tls/provision.js +6 -3
- package/lib/token-audit-log.js +19 -20
- package/lib/token-permission-view.js +7 -6
- package/lib/tools.js +48 -51
- package/lib/totp.js +2 -5
- package/lib/translations.js +1 -2
- package/lib/ui-routes/account-routes.js +475 -454
- package/lib/ui-routes/account-setup.js +99 -0
- package/lib/ui-routes/admin-config-routes.js +152 -100
- package/lib/ui-routes/admin-entities-routes.js +93 -21
- package/lib/ui-routes/auth-routes.js +90 -38
- package/lib/ui-routes/imap-idle-field.js +1 -1
- package/lib/ui-routes/internals-routes.js +5 -0
- package/lib/ui-routes/oauth-config-routes.js +124 -82
- package/lib/ui-routes/outlook-subscription-view.js +1 -1
- package/lib/ui-routes/overridable-fields.js +84 -0
- package/lib/ui-routes/queue-routes.js +8 -5
- package/lib/ui-routes/route-helpers.js +19 -3
- package/lib/ui-routes/settings-page.js +6 -0
- package/lib/ui-routes/tls-config-routes.js +58 -15
- package/lib/utils/back-off.js +82 -0
- package/lib/utils/decode-headers.js +3 -12
- package/lib/utils/filter-empty.js +20 -0
- package/lib/utils/int-setting.js +48 -0
- package/lib/utils/murmurhash3.js +66 -0
- package/lib/utils/public-suffix.js +122 -0
- package/lib/utils/random-id.js +26 -0
- package/lib/utils/tracking-settings.js +35 -0
- package/lib/utils/version.js +74 -0
- package/lib/web-safe-html.js +18 -105
- package/lib/webhook-delivery.js +461 -0
- package/lib/webhook-failures.js +132 -0
- package/lib/webhook-request.js +29 -1
- package/lib/webhook-routing.js +56 -0
- package/lib/webhook-test.js +88 -0
- package/lib/webhooks.js +93 -45
- package/lib/worker-rpc-error.js +2 -1
- package/package.json +37 -38
- package/sbom.json +7902 -1
- package/server.js +784 -518
- package/static/js/ace/ace.js +1 -1
- package/static/licenses.html +225 -1060
- package/translations/messages.pot +62 -63
- package/views/config/ai.hbs +1 -1
- package/views/config/security.hbs +24 -2
- package/views/config/service.hbs +47 -0
- package/views/config/webhooks.hbs +36 -0
- package/views/internals/index.hbs +8 -0
- package/views/partials/queue_retention_note.hbs +12 -8
- package/views/partials/ui/env-managed-alert.hbs +16 -7
- package/views/partials/webhook_form.hbs +1 -1
- package/views/suppression-lists/index.hbs +1 -1
- package/workers/api.js +840 -611
- package/workers/export.js +17 -632
- package/workers/imap.js +13 -0
- package/workers/smtp.js +9 -11
- package/workers/submit.js +1 -1
- package/workers/webhooks.js +18 -448
- package/lib/email-client/outlook-fallback-poll.js +0 -30
package/.ncurc.js
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
1
3
|
module.exports = {
|
|
2
4
|
upgrade: true,
|
|
3
|
-
// Node 20 is a hard runtime floor, not a preference.
|
|
5
|
+
// Node 20 is a hard runtime floor, not a preference (engines.node says >=20.19.0, the oldest 20.x the
|
|
6
|
+
// dependency tree itself accepts; server.js only warns below it). The DigitalOcean one-click images run
|
|
4
7
|
// EmailEngine on Node 20 and ship an upgrade script for EmailEngine but none for Node, so those
|
|
5
8
|
// installs keep self-updating on a runtime that never moves; raising the floor breaks them on
|
|
6
9
|
// their next upgrade. Node 20 being EOL upstream, and CI and the pkg targets being on Node 24,
|
|
@@ -10,14 +13,20 @@ module.exports = {
|
|
|
10
13
|
// CommonJS and is bundled into a binary with pkg), needs a Node newer than the floor above, or
|
|
11
14
|
// is a major we are deliberately soaking. Using 'minor' instead of a blanket reject so these
|
|
12
15
|
// still receive security/patch updates within the safe major instead of being frozen at one
|
|
13
|
-
// exact version.
|
|
16
|
+
// exact version. Last verified against Node 20 (Docker) 2026-06-17; re-check whenever an entry
|
|
17
|
+
// below is reconsidered.
|
|
18
|
+
//
|
|
19
|
+
// Two different constraints drive these caps, and they lift on different terms. "Needs a newer
|
|
20
|
+
// Node" is the floor above. "ESM-only" is pkg: the binary bundles a CommonJS module graph and cannot
|
|
21
|
+
// load ES modules whatever Node version runs it, so an ESM-only runtime dependency stays out even
|
|
22
|
+
// if the floor ever moves (see "Pure JavaScript only" in CLAUDE.md).
|
|
14
23
|
//
|
|
15
24
|
// `pino` is capped harder than the rest, at 'patch', because the break arrived in a MINOR and a
|
|
16
25
|
// major cap would not have stopped it. See its entry below.
|
|
17
26
|
target: name =>
|
|
18
27
|
['pino', '@playwright/test'].includes(name)
|
|
19
28
|
? 'patch'
|
|
20
|
-
: ['
|
|
29
|
+
: ['gettext-parser', 'xgettext-template', 'undici', 'marked', '@sentry/node-core', 'he', 'iconv-lite'].includes(name)
|
|
21
30
|
? 'minor'
|
|
22
31
|
: 'latest',
|
|
23
32
|
// pino - held on 10.3.x. 10.4.0 took PR #2294, which makes lib/caller.js prefer
|
|
@@ -38,21 +47,27 @@ module.exports = {
|
|
|
38
47
|
// times out with "Received: undefined" while the page snapshot shows the button).
|
|
39
48
|
// Same spec passes in 3.8 s on 1.63.0; nothing in the 1.64 release notes covers
|
|
40
49
|
// it. Lift once a 1.64.x or later passes that spec unchanged.
|
|
41
|
-
// nanoid - 4.x dropped the CommonJS require export (ESM-only)
|
|
42
50
|
// gettext-parser - 8.x is ESM-only
|
|
43
|
-
// xgettext-template - 6.x
|
|
44
|
-
//
|
|
51
|
+
// xgettext-template - 6.x and later are ESM-only and need Node >=22. It only runs as a CLI in the
|
|
52
|
+
// translation build, so ESM alone would not keep it out (build tools are exempt
|
|
53
|
+
// from the CommonJS rule); the Node requirement does, since the tooling has to
|
|
54
|
+
// run on the Node 20 floor too.
|
|
45
55
|
// undici - 8.x requires Node >=22.19 and crashes at require() on Node 20. Permanent while the
|
|
46
56
|
// Node 20 floor above stands.
|
|
47
57
|
// marked - 16.x dropped the CommonJS build (ESM-only, needs require(esm)/Node >=20.19); 15.x is the
|
|
48
58
|
// last require()-compatible line. 15.0.12 verified on Node 20-24 and in a yao/pkg node24 build.
|
|
49
|
-
// Permanent
|
|
59
|
+
// Permanent: an ESM-only release cannot be bundled by pkg, whatever the Node floor.
|
|
60
|
+
// iconv-lite - 1.0 (alpha since 2026-10) requires Node >=22 and moves to ES modules, relying on
|
|
61
|
+
// require(esm). Held on 0.x; libmime, imapflow and mailparser carry the same cap.
|
|
62
|
+
// The ES module move keeps it out of the pkg bundle even past the Node floor.
|
|
50
63
|
// he - 2.x is ESM-only (exports only src/he.mjs) and requires Node >=22; require('he') throws
|
|
51
64
|
// ERR_REQUIRE_ESM on Node 20 before 20.19. 1.2.0 is the last CommonJS release. mailparser,
|
|
52
65
|
// which reaches EmailEngine through the same require, rejects 2.x for the same reason.
|
|
66
|
+
// Permanent for the same pkg reason as marked, not because of the Node floor.
|
|
53
67
|
// @sentry/node-core - held on the 10.x line for the reasons @sentry/node (which it replaced, through its
|
|
54
|
-
// `light` entry) was held there: @sentry/node 11.x requires Node >=20.19 (the
|
|
55
|
-
//
|
|
68
|
+
// `light` entry) was held there: @sentry/node 11.x requires Node >=20.19 (engines now says the
|
|
69
|
+
// same, but the startup check only warns below it, so a DigitalOcean image on an older 20.x
|
|
70
|
+
// still runs; the error-reporting path must not be what fails there), and it depends on
|
|
56
71
|
// @sentry/bundler-plugins, which pulls the 16 MB Sentry CLI (package `sentry`, licensed
|
|
57
72
|
// FSL-1.1-Apache-2.0, not an OSI license) into the runtime tree and the pkg bundle. The
|
|
58
73
|
// node-core line is versioned in step with @sentry/node, so lift this only once an 11.x
|
|
@@ -79,5 +94,10 @@ module.exports = {
|
|
|
79
94
|
// @asamuzakjp/css-color >=4.1.2 pulls in @csstools/* v4 which are pure ESM and break pkg bundling
|
|
80
95
|
// (transitive via @postalsys/email-text-tools -> jsdom -> cssstyle; also pinned in package.json "overrides").
|
|
81
96
|
'@asamuzakjp/css-color'
|
|
97
|
+
// Not a direct dependency, so nothing here moves it: the "overrides" entry in package.json
|
|
98
|
+
// lifts cheerio from the 1.0.0 that juice 11 (via @postalsys/email-text-tools) pins exactly,
|
|
99
|
+
// which drags in a second copy of undici (6.x) next to ours. cheerio 1.2.0 shares our undici
|
|
100
|
+
// 7 and keeps a CommonJS build; juice 12 would fix this itself but is ESM-only and needs
|
|
101
|
+
// Node 22. Re-check the override when juice or email-text-tools changes its cheerio range.
|
|
82
102
|
]
|
|
83
103
|
};
|
package/.prettierignore
CHANGED
package/.prettierrc.js
CHANGED
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,112 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [2.86.0](https://github.com/postalsys/emailengine/compare/v2.85.0...v2.86.0) (2026-10-22)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* make the failed-job retention, token log and thread collapse limits settings ([6d297cf](https://github.com/postalsys/emailengine/commit/6d297cf18701827a32ce8ec80a717c289975f781))
|
|
9
|
+
* per-account outbox endpoints and account and state filters on GET /v1/outbox ([9536c3d](https://github.com/postalsys/emailengine/commit/9536c3dfba6bf81aed0ac0f01742684e275d594b))
|
|
10
|
+
* REST endpoints for failed webhook deliveries ([3dfd5cf](https://github.com/postalsys/emailengine/commit/3dfd5cfe2fa307ed54dd78c7f3f1a7661f8dae19))
|
|
11
|
+
* REST endpoints for the admin UI actions that had none ([7a0bc67](https://github.com/postalsys/emailengine/commit/7a0bc6749f683af2e804dc96500774352b2383f3))
|
|
12
|
+
* webhooksDeliveryAttempts and webhooksRetryDelay settings for the webhook retry policy ([4e54e99](https://github.com/postalsys/emailengine/commit/4e54e9911cad156ee24f16c77c7b0a2034baedc3))
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Bug Fixes
|
|
16
|
+
|
|
17
|
+
* accept a duration for EENGINE_GMAIL_FALLBACK_POLL_INTERVAL ([431be3a](https://github.com/postalsys/emailengine/commit/431be3a2e98299f3772727aa2b48cb856b17a524))
|
|
18
|
+
* announce that the pre-2.79 token endpoints and legacy SMTP options go after 2027-01-01 ([1a81df4](https://github.com/postalsys/emailengine/commit/1a81df4e67a89b537f12aaf41b66caa66eec1b88))
|
|
19
|
+
* announce the removal of the leftover deprecated request fields and the bull-board redirects ([531c411](https://github.com/postalsys/emailengine/commit/531c411d96a1fd2e5e6f6dfd5fca72b3df6a5068))
|
|
20
|
+
* answer every API 404 with code NotFound ([ff9c5c9](https://github.com/postalsys/emailengine/commit/ff9c5c9f399a9b55cd6c1f32569d8198e84cfd13))
|
|
21
|
+
* bump bullmq to 6.4.0 ([e687a87](https://github.com/postalsys/emailengine/commit/e687a877d644961a7a75447867412b76e59807f6))
|
|
22
|
+
* clean failed queue jobs by EENGINE_QUEUE_KEEP_FAILED_AGE instead of a fixed week ([3a404a5](https://github.com/postalsys/emailengine/commit/3a404a5fcd94fed1c1466a5fc69a7fa4fb8477df))
|
|
23
|
+
* clean failed queue jobs by the failed-job retention setting ([95fc040](https://github.com/postalsys/emailengine/commit/95fc04085e88a2c22b9a586eb849427847ad426f))
|
|
24
|
+
* close the IMAP command connection within the IDLE restart interval ([a659c26](https://github.com/postalsys/emailengine/commit/a659c266b9fb8d48004f1b3022e7dcb5d4229a54))
|
|
25
|
+
* count each queue's failed jobs in the same read and the three queues at once for /metrics ([7c47e8d](https://github.com/postalsys/emailengine/commit/7c47e8dcda6d86db626d0a01f8c566a5743304a1))
|
|
26
|
+
* cut per-account and per-message Redis round trips on the sync paths ([7e2cefe](https://github.com/postalsys/emailengine/commit/7e2cefed2470a49b2ca4e03466cacf8737c99081))
|
|
27
|
+
* declare Node 20.19.0 in engines and warn at startup on an older 20.x ([95b8d53](https://github.com/postalsys/emailengine/commit/95b8d53f7d131eb637cfc878858dad3f957a9d9e))
|
|
28
|
+
* decode outbound text parts with libmime and leave a part it can not decode untouched ([efa6406](https://github.com/postalsys/emailengine/commit/efa6406f8d44e8d01c5212e49fd213bb451e9859))
|
|
29
|
+
* derive account credential keys off the event loop when loading account data ([a530179](https://github.com/postalsys/emailengine/commit/a53017938e22bc26a8fda4d34664c253f7f0af2b))
|
|
30
|
+
* encode custom headers on the raw send path and use nodemailer's own delivery details ([d59b382](https://github.com/postalsys/emailengine/commit/d59b382427ae449907e364b92bef59bdb5691bf6))
|
|
31
|
+
* end an IMAP sync pass when ImapFlow finds no mailbox selected, and use its public client API ([8521aeb](https://github.com/postalsys/emailengine/commit/8521aebbd791115f08fbc47ec0f05197547effab))
|
|
32
|
+
* extend the export job lock per message, not per batch of 100 ([f22b1d1](https://github.com/postalsys/emailengine/commit/f22b1d1015830e4831f406b94f876a8e37db586f))
|
|
33
|
+
* filter a queue listing by account or route on the job data alone ([08300f9](https://github.com/postalsys/emailengine/commit/08300f9e44427fc1a82af267d42b5148548f7f2f))
|
|
34
|
+
* give the Docker image a health check and keep its application tree read-only ([0c0b70d](https://github.com/postalsys/emailengine/commit/0c0b70d014645f513ab8db261c0ad8c23265cb14))
|
|
35
|
+
* index a full sync's changed messages a chunk at a time and drop deleted ones in the same round trip ([8b49c09](https://github.com/postalsys/emailengine/commit/8b49c0996eb4c73ba9bf3eefd07db501e01166db))
|
|
36
|
+
* keep retrying account assignment after the quick retries at startup ([de1c8d6](https://github.com/postalsys/emailengine/commit/de1c8d6b38e436fe01e05def11315a0f713b60db))
|
|
37
|
+
* learn the IDLE restart interval of a server that drops idle sessions ([19c3844](https://github.com/postalsys/emailengine/commit/19c384493261881af18f58053191f1850257072c))
|
|
38
|
+
* let EENGINE_REDIS_PREFIX and the other lib/consts.js variables be read from a file ([de9ba70](https://github.com/postalsys/emailengine/commit/de9ba705dfa3653f84e3dccf8e91a93fb4579f36))
|
|
39
|
+
* let POST /v1/settings clear the overridable settings, and parse their values in one place ([7bcd190](https://github.com/postalsys/emailengine/commit/7bcd1902de9ea078dc947bf64e48304c466a46c4))
|
|
40
|
+
* list the GET /v1/settings include flags as chips again in the API reference ([7b5c122](https://github.com/postalsys/emailengine/commit/7b5c122d658eea0bbcaeeb217acc6bf26095e0c0))
|
|
41
|
+
* make account flush and delete complete on Gmail API and MS Graph accounts ([7484bdc](https://github.com/postalsys/emailengine/commit/7484bdc9b8976e6502cd628d496cf74f4ab493e8))
|
|
42
|
+
* MCP tools for the new endpoints, server signatures and raw message source ([aeb1ae5](https://github.com/postalsys/emailengine/commit/aeb1ae57aaf99ac84a6762316835971ef1bcb9d3))
|
|
43
|
+
* name every OpenAPI schema deliberately and describe the terse operations ([4e7bddc](https://github.com/postalsys/emailengine/commit/4e7bddc4f392196190788775b20dc116d1d5d7a9))
|
|
44
|
+
* parse envelope recipients and header addresses with mailparser ([378b003](https://github.com/postalsys/emailengine/commit/378b003800d5c9ba0e7b3bc7dec6639cd661f124))
|
|
45
|
+
* queue a message through outbox.enqueue() and read its queue settings in one round trip ([54c66d4](https://github.com/postalsys/emailengine/commit/54c66d4407a26fc53d9495feaf5ed88a419b8e61))
|
|
46
|
+
* queue export messages a page at a time and write export progress once per batch ([d22d9f0](https://github.com/postalsys/emailengine/commit/d22d9f0e052f0abfbf264051fe0d53b757d207e3))
|
|
47
|
+
* queue new messages of an IMAP fast sync in one transaction instead of two round trips each ([ed8cc3f](https://github.com/postalsys/emailengine/commit/ed8cc3f1966615871d4d551eced2c50f467e4a86))
|
|
48
|
+
* read only the jobs of the page shown when listing one account's outbox ([2ffbcfe](https://github.com/postalsys/emailengine/commit/2ffbcfe034d705b3e2128638b414ebf1a29e049a))
|
|
49
|
+
* read only what the category lookup, webhook clears and account teardown need ([6c3d081](https://github.com/postalsys/emailengine/commit/6c3d081d019a1790b6d14dd3b06efd1b375d180e))
|
|
50
|
+
* read the IMAP message index once per chunk in a full sync and stop deleting the wrong entries ([34ca00b](https://github.com/postalsys/emailengine/commit/34ca00bd5d444b9125130263590725747451c317))
|
|
51
|
+
* refresh an open IMAP folder before searching it and share waiting sync passes ([2e5c436](https://github.com/postalsys/emailengine/commit/2e5c43693ce7bd5588ddf6fcc8167e42ee3bc3dd))
|
|
52
|
+
* refresh the public suffix list ([c72b1e1](https://github.com/postalsys/emailengine/commit/c72b1e1603f9a983557225a147f0383f35e79184))
|
|
53
|
+
* refresh the public suffix list ([eed6753](https://github.com/postalsys/emailengine/commit/eed67531b5cbeef1d313fff4f5bbd5bec70051c1))
|
|
54
|
+
* report export queue depth, failed jobs, API latency and per-thread heap in /metrics ([269876c](https://github.com/postalsys/emailengine/commit/269876c37366bce9916d771471f97fa01accfb5c))
|
|
55
|
+
* report missing IMAP workers from /health and add liveness and readiness endpoints ([f30f561](https://github.com/postalsys/emailengine/commit/f30f5611497b7627c10843283394beb75cad5825))
|
|
56
|
+
* resolve a sent message's tracking flags in one place ([1873f3c](https://github.com/postalsys/emailengine/commit/1873f3cabdcf3b000c8fecd1a0b833a9abec2073))
|
|
57
|
+
* resolve Gmail categories over IMAP for a whole pass of new messages at once ([710fc6b](https://github.com/postalsys/emailengine/commit/710fc6b9f2e0bd84b58c11b2175a6bb68c9c631a))
|
|
58
|
+
* restore the newer public suffix list, and never replace it with an older download ([3f2399a](https://github.com/postalsys/emailengine/commit/3f2399a1f558bad11ed56e386f5b478dcde8ae44))
|
|
59
|
+
* resume IDLE after an upload only once the connection is free ([1276c48](https://github.com/postalsys/emailengine/commit/1276c48ca81c6453df7b30da0744711ac296298e))
|
|
60
|
+
* search webhook routes by their target URL without its credentials ([c155541](https://github.com/postalsys/emailengine/commit/c155541254209605f11b9b903ed36fb16aee2ce6))
|
|
61
|
+
* send an API call's latency with its counter instead of a second message per request ([2822fe2](https://github.com/postalsys/emailengine/commit/2822fe262bc5c4b9f256cf5ae871f5d9f8999d2a))
|
|
62
|
+
* show why a first TLS certificate order failed instead of a guessed reason ([43bbdf5](https://github.com/postalsys/emailengine/commit/43bbdf5c6a66dd636cd67a8e0c468f0e228c4a68))
|
|
63
|
+
* skip messages deleted mid-listing on Gmail and stop leaking outbox content and download streams ([048b7d6](https://github.com/postalsys/emailengine/commit/048b7d61a2472d955305c5ed91f86d8ce2cd0648))
|
|
64
|
+
* stop a full Redis from turning into a worker restart loop ([936b937](https://github.com/postalsys/emailengine/commit/936b9379e22e73668765d48ed97bf9461fcc31bc))
|
|
65
|
+
* switch SMTP server authentication per session instead of for every open connection ([2a7c9de](https://github.com/postalsys/emailengine/commit/2a7c9deab05cb0099d848e0a5df181fef0a29936))
|
|
66
|
+
* the Gmail watch check reads the stored field through the account's own decoding ([5cbb53d](https://github.com/postalsys/emailengine/commit/5cbb53dd7c009f3f545717e677c88d48956b5765))
|
|
67
|
+
* the learned IDLE interval holds on hosts with several accounts and no longer reads its own side effects as a session cap ([808dd58](https://github.com/postalsys/emailengine/commit/808dd58969d8a5497bc2747c2852d019479e0567))
|
|
68
|
+
* update dependencies ([e2adc4f](https://github.com/postalsys/emailengine/commit/e2adc4f911e7745ec56ecd9ddb1361f7b222ee64))
|
|
69
|
+
* update dotenv to 18.0.9 ([ba55217](https://github.com/postalsys/emailengine/commit/ba55217b67d8682aa1a904265c8e80c742edec87))
|
|
70
|
+
* update ImapFlow to 2.6.0, nodemailer to 10.2.0, mailparser to 3.11.0 and the other libraries we own ([a98b458](https://github.com/postalsys/emailengine/commit/a98b458764e25c377379d3d6455f8bc86e17130c))
|
|
71
|
+
* update ImapFlow to 2.7.0 and ioredfour to 2.2.0 ([6bed980](https://github.com/postalsys/emailengine/commit/6bed980c867e64707d23b124a4c416df5c68f6e5))
|
|
72
|
+
* update ImapFlow to 2.8.0 and mailparser to 3.12.0 ([18023a1](https://github.com/postalsys/emailengine/commit/18023a185024615bad5e28844c4b284bd689a6d1))
|
|
73
|
+
* update ImapFlow to 2.9.0 ([1ec9a62](https://github.com/postalsys/emailengine/commit/1ec9a621df418554bc7981d5727e2ffa9ace3f52))
|
|
74
|
+
* update mailparser to 3.12.2 ([55cc131](https://github.com/postalsys/emailengine/commit/55cc1310f962bdd99c1e9de2815de5be5978d761))
|
|
75
|
+
* write a full sync's new and deleted messages a chunk at a time, and share the new-message enrichment ([bd60313](https://github.com/postalsys/emailengine/commit/bd603135dd1bf81df61f04de9c3614bc2e30e1ba))
|
|
76
|
+
|
|
77
|
+
## [2.85.0](https://github.com/postalsys/emailengine/compare/v2.84.2...v2.85.0) (2026-10-20)
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
### Features
|
|
81
|
+
|
|
82
|
+
* add an API endpoint to resume an account switched off after authentication failures ([6914729](https://github.com/postalsys/emailengine/commit/69147294647ba61dda1554aa67a0f402fa1ab3d9))
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
### Bug Fixes
|
|
86
|
+
|
|
87
|
+
* accept cpus for the webhook, submit and export worker counts ([dc19eae](https://github.com/postalsys/emailengine/commit/dc19eaeaf8a6ee364d987b2683daa5e8a2ff4607))
|
|
88
|
+
* add resume_account to the MCP tools ([2c61fb2](https://github.com/postalsys/emailengine/commit/2c61fb2ffb180558b52eab13146f67abb92734c8))
|
|
89
|
+
* bump imapflow to 2.5.6 and bullmq to 6.3.17 ([5d9dccd](https://github.com/postalsys/emailengine/commit/5d9dccdba899d8e28929f47924feba91b8563cdb))
|
|
90
|
+
* bump imapflow to 2.5.8, gettext to 4.2.0, joi-messages to 1.4.0 and templates to 2.1.0 ([8891e9f](https://github.com/postalsys/emailengine/commit/8891e9f67ffa5fd87f1ad6e8954bdbab3314655d))
|
|
91
|
+
* bump imapflow to 2.5.9, bullmq to 6.3.19 and email-ai-tools to 2.3.1 ([a9ad209](https://github.com/postalsys/emailengine/commit/a9ad20985a0565d37999b8567298650e5c3ccf1a))
|
|
92
|
+
* bump ioredfour to 2.0.0, certs to 2.0.0 and pubface to 1.2.0 ([ec5ae18](https://github.com/postalsys/emailengine/commit/ec5ae18afb371a38f92b1c94c0f652b8a02feede))
|
|
93
|
+
* bump libmime to 5.5.2, gettext to 4.1.2, wild-config to 1.7.10 and bounce-classifier to 3.0.2 ([40482cd](https://github.com/postalsys/emailengine/commit/40482cd9558295f10512f29fcb2a7f28ac314f27))
|
|
94
|
+
* bump templates to 2.1.1, which formats dates without moment ([63bb897](https://github.com/postalsys/emailengine/commit/63bb89709b7130cd340113fc78000dca9ccb2b1c))
|
|
95
|
+
* cap the V8 young generation in the Docker image and the binaries ([7864aa5](https://github.com/postalsys/emailengine/commit/7864aa5a725b93edb60aa365b35a607605e51af0))
|
|
96
|
+
* complete the OAuth2 account setup the way the hosted form does ([1a33ecc](https://github.com/postalsys/emailengine/commit/1a33ecc987001e3205a251f8161c89acda76e045))
|
|
97
|
+
* decide webhook queueing before formatting the payload ([1b96844](https://github.com/postalsys/emailengine/commit/1b9684485a8c8541b80fc432bab7008a216c1985))
|
|
98
|
+
* drop psl and timezones-list for the source data and Intl ([55d9c7b](https://github.com/postalsys/emailengine/commit/55d9c7b8216c9afd2080bfe406165aa1cf8bb7e3))
|
|
99
|
+
* expose drafts, bulk message operations and more as MCP tools ([68ef849](https://github.com/postalsys/emailengine/commit/68ef8495b39858b14ada898e613218beaf34cae4))
|
|
100
|
+
* expose mailbox create, rename and delete as MCP tools ([faece57](https://github.com/postalsys/emailengine/commit/faece57b4525aa02ad5b799b629216252ec60077))
|
|
101
|
+
* log a resumed account once, with the reason it was re-enabled ([d752ed3](https://github.com/postalsys/emailengine/commit/d752ed3d9e1299eb13c3110afc9163ee1ef080a8))
|
|
102
|
+
* point the documentation links at the pages' current addresses ([7ce2ca8](https://github.com/postalsys/emailengine/commit/7ce2ca8bf6deb9f4c2df7b0f28ce24cc229eacb9))
|
|
103
|
+
* read .mo catalogs with @postalsys/gettext and bump owned packages ([5cf93a9](https://github.com/postalsys/emailengine/commit/5cf93a90f56c00f640a5c9340a83413bef398a6f))
|
|
104
|
+
* replace five small dependencies with in-house modules ([93da438](https://github.com/postalsys/emailengine/commit/93da43887c733fe09ea2d722eef4bfb40b3d4b21))
|
|
105
|
+
* report the event loop delay of every thread ([2b001fc](https://github.com/postalsys/emailengine/commit/2b001fcf5e1d352a0baeab3f9e2e7846d1db8382))
|
|
106
|
+
* stop downloading inline images for messageNew when nothing uses them ([7d63a88](https://github.com/postalsys/emailengine/commit/7d63a881259540c51fabd66fc05c43a49e542b9b))
|
|
107
|
+
* stop queueing webhook events that no delivery would send ([5a4921c](https://github.com/postalsys/emailengine/commit/5a4921c06a527ec5911eef78fed1019a07fedc5c))
|
|
108
|
+
* use a placeholder for the OAuth2 client secret example ([cd96134](https://github.com/postalsys/emailengine/commit/cd96134fdbd2a396d66f25f0261cf5dbe2166204))
|
|
109
|
+
|
|
3
110
|
## [2.84.2](https://github.com/postalsys/emailengine/compare/v2.84.1...v2.84.2) (2026-10-18)
|
|
4
111
|
|
|
5
112
|
|
package/Dockerfile
CHANGED
|
@@ -88,7 +88,10 @@ RUN addgroup -S emailenginegroup && adduser -S emailengineuser -G emailenginegro
|
|
|
88
88
|
|
|
89
89
|
WORKDIR /emailengine
|
|
90
90
|
|
|
91
|
-
|
|
91
|
+
# Owned by root and only readable by the runtime user, so a compromised process cannot rewrite the
|
|
92
|
+
# code it runs or plant a module the next start would load. Nothing at runtime writes under
|
|
93
|
+
# /emailengine: exports go to EENGINE_EXPORT_PATH, which defaults to the system temporary directory.
|
|
94
|
+
COPY --from=builder /emailengine /emailengine
|
|
92
95
|
|
|
93
96
|
RUN node -e "console.log('node arch: ' + os.arch())"
|
|
94
97
|
RUN node -e "console.log(process.versions)"
|
|
@@ -100,6 +103,22 @@ ENV EENGINE_HOST=0.0.0.0
|
|
|
100
103
|
ENV EENGINE_API_PROXY=true
|
|
101
104
|
# The pure JavaScript msgpackr decoder is what the pkg binary uses, so npm and Docker installs decode the same way and no native addon is loaded
|
|
102
105
|
ENV MSGPACKR_NATIVE_ACCELERATION_DISABLED=true
|
|
106
|
+
# Caps each thread's young generation at the size Node 22 used. Node 24 (V8 13.6) quadrupled the
|
|
107
|
+
# default, and every worker thread grows to it during startup, which raised the startup RSS of an
|
|
108
|
+
# empty instance by about half. The limit applies to each thread separately, not to the process. A
|
|
109
|
+
# NODE_OPTIONS given at run time replaces this one, so keep the flag in it to keep the cap. The pkg
|
|
110
|
+
# binary bakes the same value in package.json, and test/node-heap-options-test.js keeps the two equal.
|
|
111
|
+
ENV NODE_OPTIONS=--max-semi-space-size=16
|
|
112
|
+
|
|
113
|
+
EXPOSE 3000
|
|
114
|
+
|
|
115
|
+
# The liveness check: answers while the process can serve HTTP, without waiting on Redis or the
|
|
116
|
+
# workers, so an orchestrator restarts the container only when restarting can help. Readiness
|
|
117
|
+
# (workers and Redis) is /health/ready, for whatever routes traffic to it. 127.0.0.1 rather than
|
|
118
|
+
# localhost for the reason docker-compose.yml gives: BusyBox wget on musl tries ::1 only, and
|
|
119
|
+
# EmailEngine listens on IPv4. Shell form so a changed EENGINE_PORT (or PORT) is followed.
|
|
120
|
+
HEALTHCHECK --interval=30s --timeout=10s --start-period=40s --retries=3 \
|
|
121
|
+
CMD wget --no-verbose --tries=1 --spider "http://127.0.0.1:${EENGINE_PORT:-${PORT:-3000}}/health/live" || exit 1
|
|
103
122
|
|
|
104
123
|
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
|
|
105
124
|
CMD ["node", "/emailengine/server.js"]
|
package/ENVIRONMENT.md
ADDED
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
# Environment variables
|
|
2
|
+
|
|
3
|
+
Every `EENGINE_*` variable EmailEngine reads. Most have a matching command line option and
|
|
4
|
+
configuration file key (see `config/default.toml`); the environment variable wins over both.
|
|
5
|
+
|
|
6
|
+
Any variable can also be read from a file: set `<NAME>_FILE` to the path of a file holding the
|
|
7
|
+
value (the Docker and Kubernetes secrets convention). Surrounding whitespace in the file is
|
|
8
|
+
trimmed, and a variable set directly wins over its `_FILE` form.
|
|
9
|
+
|
|
10
|
+
Durations take a number with a unit (`30s`, `10m`, `1h`, `7d`) or plain milliseconds unless the
|
|
11
|
+
entry says otherwise. Sizes take a number with a unit (`5MB`, `1GB`) or plain bytes.
|
|
12
|
+
|
|
13
|
+
`test/env-docs-guardrail-test.js` fails when the code reads a variable this file does not list.
|
|
14
|
+
|
|
15
|
+
## Core
|
|
16
|
+
|
|
17
|
+
| Variable | Default | Description |
|
|
18
|
+
| --------------------------------- | -------------------------- | ---------------------------------------------------------------------------------------------------------------------------------- |
|
|
19
|
+
| `EENGINE_REDIS` | `redis://127.0.0.1:6379/8` | Redis connection URI. `REDIS_URL` is read when this is unset. |
|
|
20
|
+
| `EENGINE_REDIS_PREFIX` | none | Prefix for every Redis key, so several instances can share one database. |
|
|
21
|
+
| `EENGINE_SECRET` | none | Encryption secret for stored credentials. Changing it makes stored credentials unreadable; use `emailengine encrypt` to rotate. |
|
|
22
|
+
| `EENGINE_PORT` | `3000` | API and admin UI port. `PORT` is read when this is unset. |
|
|
23
|
+
| `EENGINE_HOST` | `127.0.0.1` | API and admin UI bind address. |
|
|
24
|
+
| `EENGINE_TIMEOUT` | `10s` | How long an API request waits for a worker to answer (duration). |
|
|
25
|
+
| `EENGINE_LOG_LEVEL` | `trace` | Logging level. |
|
|
26
|
+
| `EENGINE_LOG_RAW` | `false` | Log raw IMAP and SMTP protocol traffic. Credentials are masked either way. |
|
|
27
|
+
| `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. |
|
|
28
|
+
| `EENGINE_PREPARED_TOKEN` | none | A base64url msgpack-encoded API token to provision at start. |
|
|
29
|
+
| `EENGINE_PREPARED_PASSWORD` | none | A base64url PBKDF2 admin password hash to apply at start. Writing a different hash ends every admin session. |
|
|
30
|
+
| `EENGINE_PREPARED_LICENSE` | none | A license key to apply at start. |
|
|
31
|
+
| `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. |
|
|
32
|
+
| `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. |
|
|
33
|
+
| `EENGINE_CONNECTION_SETUP_DELAY` | `0` | Pause between two account assignments while accounts are handed to workers, to spread the connection load at start (duration). |
|
|
34
|
+
| `EENGINE_UPDATE_CHECK_DISABLED` | `false` | Stop checking for new EmailEngine releases. |
|
|
35
|
+
| `EENGINE_BEACON_DISABLED` | `false` | Opt out of the anonymized feature-usage diagnostics sent with license validation. License validation itself is unaffected. |
|
|
36
|
+
| `EENGINE_DISABLE_SETUP_WARNINGS` | `false` | Hide the setup warning banners in the admin UI. |
|
|
37
|
+
| `EENGINE_DOCEAN` | none | Set by the DigitalOcean one-click image; adjusts the dashboard and diagnostics. Not for manual use. |
|
|
38
|
+
| `EENGINE_INSTALL_SCRIPT` | none | Set by the install script; adjusts the dashboard and diagnostics. Not for manual use. |
|
|
39
|
+
|
|
40
|
+
## Workers and queues
|
|
41
|
+
|
|
42
|
+
| Variable | Default | Description |
|
|
43
|
+
| ---------------------------------------- | -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
44
|
+
| `EENGINE_WORKERS` | `4` | IMAP worker threads. |
|
|
45
|
+
| `EENGINE_WORKERS_API` | `1` | API worker threads. Values above 1 need `SO_REUSEPORT` (Linux) and fall back to 1 elsewhere. |
|
|
46
|
+
| `EENGINE_WORKERS_WEBHOOKS` | `1` | Webhook worker threads. |
|
|
47
|
+
| `EENGINE_WORKERS_SUBMIT` | `1` | Submit (outgoing mail) worker threads. |
|
|
48
|
+
| `EENGINE_WORKERS_EXPORT` | `1` | Export worker threads. |
|
|
49
|
+
| `EENGINE_NOTIFY_QC` | `1` | Webhook deliveries each webhook worker runs at once. |
|
|
50
|
+
| `EENGINE_SUBMIT_QC` | `1` | Messages each submit worker sends at once. |
|
|
51
|
+
| `EENGINE_SUBMIT_DELAY` | none | Minimum delay between two messages from one submit worker (duration). |
|
|
52
|
+
| `EENGINE_EXPORT_QC` | `1` | Exports each export worker runs at once. |
|
|
53
|
+
| `EENGINE_EXPORT_TIMEOUT` | `5m` | Timeout of a single export operation (duration). |
|
|
54
|
+
| `EENGINE_EXPORT_PATH` | system temporary directory | Where export files are written. |
|
|
55
|
+
| `EENGINE_EXPORT_MAX_AGE` | `86400000` | How long a finished export is kept, in milliseconds. The `exportMaxAge` setting wins when set. |
|
|
56
|
+
| `EENGINE_QUEUE_REMOVE_AFTER` | `0` | Initial value for the `queueKeep` setting: completed queue entries to retain. |
|
|
57
|
+
| `EENGINE_QUEUE_KEEP_FAILED` | `500` | Failed queue entries retained per queue, at least. Overrides the `queueKeepFailed` setting. |
|
|
58
|
+
| `EENGINE_QUEUE_KEEP_FAILED_AGE` | `604800` | How long failed queue entries are retained, in seconds. Overrides the `queueKeepFailedAge` setting. |
|
|
59
|
+
| `EENGINE_QUEUE_KEEP_FAILED_CONTENT` | `100` | How many of the most recent failed messages keep their content so they can be retried (`0` keeps none). Overrides the `queueKeepFailedContent` setting. |
|
|
60
|
+
| `EENGINE_QUEUE_KEEP_FAILED_CONTENT_SIZE` | `100MB` | Total size of the retained failed-message content (size). Overrides the `queueKeepFailedContentSize` setting. |
|
|
61
|
+
|
|
62
|
+
## Mail synchronization
|
|
63
|
+
|
|
64
|
+
| Variable | Default | Description |
|
|
65
|
+
| ---------------------------------------- | ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
66
|
+
| `EENGINE_FETCH_BATCH_SIZE` | `1000` | Messages fetched per IMAP FETCH command during a sync. |
|
|
67
|
+
| `EENGINE_CHUNK_SIZE` | `1000000` | Chunk size for streaming attachment and message downloads (size). |
|
|
68
|
+
| `EENGINE_IMAP_SOCKET_TIMEOUT` | ImapFlow default | Inactivity timeout of IMAP connections (duration). |
|
|
69
|
+
| `EENGINE_DISABLE_COMPRESSION` | `false` | Do not negotiate IMAP COMPRESS=DEFLATE. |
|
|
70
|
+
| `EENGINE_IMAP_STALE_CHECK_INTERVAL` | disabled | Quiet period after which a resync checks the main mailbox over the command connection and reconnects an account whose primary connection stopped seeing new messages (duration). |
|
|
71
|
+
| `EENGINE_MAX_IMAP_AUTH_FAILURE_TIME` | `3d` | How long authentication may keep failing before syncing is switched off for the account (duration). |
|
|
72
|
+
| `EENGINE_GMAIL_FALLBACK_POLL_INTERVAL` | `10m` | How often a Gmail API account polls for changes when no Pub/Sub notification arrives (duration, or plain milliseconds). |
|
|
73
|
+
| `EENGINE_OUTLOOK_FALLBACK_POLL_INTERVAL` | `10m` | How often each MS Graph account runs a missed-notification recovery pass (duration, `0` disables, never below 10 seconds). |
|
|
74
|
+
| `EENGINE_FETCH_TIMEOUT` | `90000` | Response timeout of outbound HTTP requests made through the shared dispatchers (provider APIs, OAuth2, attachments given by URL), in milliseconds. |
|
|
75
|
+
|
|
76
|
+
## API and admin UI
|
|
77
|
+
|
|
78
|
+
| Variable | Default | Description |
|
|
79
|
+
| --------------------------------- | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
80
|
+
| `EENGINE_API_PROXY` | `false` | Trust `X-Forwarded-For` from a reverse proxy. The Docker image sets it to `true`. |
|
|
81
|
+
| `EENGINE_API_PROXY_ADDRESSES` | none | IPs or CIDRs of the proxies allowed to set `X-Forwarded-For`. Set it whenever you rely on the admin address allowlist or per-token address restrictions. |
|
|
82
|
+
| `EENGINE_ADMIN_ACCESS_ADDRESSES` | none | IPs or CIDRs allowed to reach `/admin`. |
|
|
83
|
+
| `EENGINE_CORS_ORIGIN` | none | Allowed CORS origins, space separated (`*` for any). CORS is off while unset. |
|
|
84
|
+
| `EENGINE_CORS_MAX_AGE` | `60` | How long browsers may cache a CORS preflight answer, in seconds. |
|
|
85
|
+
| `EENGINE_MAX_SIZE` | `5MB` | Largest attachment accepted in an API request (size). |
|
|
86
|
+
| `EENGINE_MAX_BODY_SIZE` | `50MB` | Largest API request body (size). |
|
|
87
|
+
| `EENGINE_MAX_PAYLOAD_TIMEOUT` | `10s` | How long an API request body may take to arrive (duration). |
|
|
88
|
+
| `EENGINE_CSP_MODE` | `enforce` | How the Content-Security-Policy is delivered: `enforce`, `report-only` or `off`. |
|
|
89
|
+
| `EENGINE_DISABLE_MESSAGE_BROWSER` | `false` | Remove the message browser from the account pages. |
|
|
90
|
+
| `EENGINE_MCP_ENABLED` | `true` | Register the MCP endpoint routes. The `mcpEnabled` setting is the runtime switch. |
|
|
91
|
+
| `EENGINE_TOKEN_LOG_ENTRIES` | `1000` | Requests retained per access token in the audit log. Overrides the `tokenLogEntries` setting. |
|
|
92
|
+
| `EENGINE_TOKEN_LOG_AGE` | `604800` | How long a token's audit log survives its last use, in seconds. Overrides the `tokenLogAge` setting. |
|
|
93
|
+
| `EENGINE_DISABLE_THREAD_COLLAPSE` | `false` | Stop web-safe HTML from folding quoted thread history into a collapsed block. Overrides the `disableThreadCollapse` setting. |
|
|
94
|
+
|
|
95
|
+
## Webhooks and outbound HTTP
|
|
96
|
+
|
|
97
|
+
| Variable | Default | Description |
|
|
98
|
+
| ------------------------------- | -------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
99
|
+
| `EENGINE_WEBHOOK_TIMEOUT` | `30s` | Wall-clock cap on one webhook delivery attempt (duration). |
|
|
100
|
+
| `EENGINE_WEBHOOK_EGRESS_POLICY` | `link-local` | Where webhook deliveries and autodiscovery lookups may connect: `link-local`, `private` or `off`. |
|
|
101
|
+
| `EENGINE_HTTP_PROXY_ENABLED` | none | Overrides the `httpProxyEnabled` setting (the dedicated proxy for outbound HTTP). `false` keeps HTTP direct while IMAP and SMTP use the global proxy. |
|
|
102
|
+
| `EENGINE_HTTP_PROXY_URL` | none | Overrides the `httpProxyUrl` setting. |
|
|
103
|
+
| `EENGINE_GCP_METADATA_HOST` | `metadata.google.internal` | Where a Cloud Pub/Sub app using the attached service account reaches the metadata server (`host`, `host:port` or `http://host[:port]`). |
|
|
104
|
+
|
|
105
|
+
## Built-in SMTP server and IMAP proxy
|
|
106
|
+
|
|
107
|
+
The `EENGINE_SMTP_ENABLED`, `_SECRET`, `_PORT`, `_HOST` and `_PROXY` variables are deprecated and
|
|
108
|
+
will be removed after 2027-01-01; configure the SMTP server in the admin UI or through the settings
|
|
109
|
+
API instead. All of these only seed the setting while it has never been saved.
|
|
110
|
+
|
|
111
|
+
| Variable | Default | Description |
|
|
112
|
+
| ------------------------------- | ----------- | ----------------------------------------------------------------- |
|
|
113
|
+
| `EENGINE_SMTP_ENABLED` | `false` | Initial value for `smtpServerEnabled`. Deprecated. |
|
|
114
|
+
| `EENGINE_SMTP_SECRET` | none | Initial value for `smtpServerPassword`. Deprecated. |
|
|
115
|
+
| `EENGINE_SMTP_PORT` | `2525` | Initial value for `smtpServerPort`. Deprecated. |
|
|
116
|
+
| `EENGINE_SMTP_HOST` | `127.0.0.1` | Initial value for `smtpServerHost`. Deprecated. |
|
|
117
|
+
| `EENGINE_SMTP_PROXY` | `false` | Initial value for `smtpServerProxy` (PROXY protocol). Deprecated. |
|
|
118
|
+
| `EENGINE_SMTP_MAX_CLIENTS` | `100` | Maximum concurrent SMTP server connections. |
|
|
119
|
+
| `EENGINE_MAX_SMTP_MESSAGE_SIZE` | `25MB` | Largest message the SMTP server accepts (size). |
|
|
120
|
+
| `EENGINE_IMAP_PROXY_ENABLED` | `false` | Initial value for `imapProxyServerEnabled`. |
|
|
121
|
+
| `EENGINE_IMAP_PROXY_SECRET` | none | Initial value for `imapProxyServerPassword`. |
|
|
122
|
+
| `EENGINE_IMAP_PROXY_PORT` | `2993` | Initial value for `imapProxyServerPort`. |
|
|
123
|
+
| `EENGINE_IMAP_PROXY_HOST` | `127.0.0.1` | Initial value for `imapProxyServerHost`. |
|
|
124
|
+
| `EENGINE_IMAP_PROXY_PROXY` | `false` | Initial value for `imapProxyServerProxy` (PROXY protocol). |
|
|
125
|
+
| `EENGINE_IMAPPROXY_MAX_CLIENTS` | `1000` | Maximum concurrent IMAP proxy connections. |
|
|
126
|
+
|
|
127
|
+
## TLS
|
|
128
|
+
|
|
129
|
+
| Variable | Default | Description |
|
|
130
|
+
| ---------------------------- | ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
131
|
+
| `EENGINE_API_TLS` | `false` | Serve the API and admin UI over HTTPS. |
|
|
132
|
+
| `EENGINE_API_TLS_*` | none | TLS material and options for the API listener: `_CERT`, `_KEY`, `_CA`, `_DHPARAM`, `_PASSPHRASE`, `_CIPHERS`, `_ECDH_CURVE`, `_MIN_VERSION`, `_MAX_VERSION`, `_REJECT_UNAUTHORIZED`, `_REQUEST_CERT`. Material given here outranks every certificate EmailEngine manages. |
|
|
133
|
+
| `EENGINE_SMTP_TLS_*` | none | The same names for the SMTP server. |
|
|
134
|
+
| `EENGINE_IMAPPROXY_TLS_*` | none | The same names for the IMAP proxy. |
|
|
135
|
+
| `EENGINE_TLS_MIN_VERSION` | `TLSv1` | Oldest TLS version accepted when connecting to mail servers. |
|
|
136
|
+
| `EENGINE_TLS_MIN_DH_SIZE` | `1024` | Smallest Diffie-Hellman key accepted from mail servers. |
|
|
137
|
+
| `EENGINE_TLS_CIPHERS` | `DEFAULT@SECLEVEL=0` | Cipher list for connections to mail servers. |
|
|
138
|
+
| `EENGINE_ACME_DIRECTORY_URL` | Let's Encrypt production | ACME directory certificates are ordered from. Override together with `EENGINE_ACME_ENVIRONMENT`. |
|
|
139
|
+
| `EENGINE_ACME_ENVIRONMENT` | `emailengine` | Name of the stored ACME account record. Override together with `EENGINE_ACME_DIRECTORY_URL`. |
|
package/README.md
CHANGED
|
@@ -13,7 +13,7 @@ A headless email client application that provides access to IMAP, SMTP, Gmail AP
|
|
|
13
13
|
|
|
14
14
|
- Sync users' emails with your service and send emails on their behalf.
|
|
15
15
|
- Integrate your app with a dedicated email account, such as your support email.
|
|
16
|
-
- [Monitor INBOX and Junk folders](https://learn.emailengine.app/docs/
|
|
16
|
+
- [Monitor INBOX and Junk folders](https://learn.emailengine.app/docs/sending/deliverability/inbox-placement-testing) of a test email account to track where sent emails land.
|
|
17
17
|
- Ideal for lightweight webmail and mobile email apps that prefer to avoid direct IMAP and MIME processing.
|
|
18
18
|
|
|
19
19
|
## Features
|
|
@@ -62,7 +62,7 @@ A headless email client application that provides access to IMAP, SMTP, Gmail AP
|
|
|
62
62
|
|
|
63
63
|
## Configuring EmailEngine
|
|
64
64
|
|
|
65
|
-
Refer to the [configuration documentation](https://learn.emailengine.app/docs/configuration) for details on setting up EmailEngine.
|
|
65
|
+
Refer to the [configuration documentation](https://learn.emailengine.app/docs/configuration) for details on setting up EmailEngine. [ENVIRONMENT.md](ENVIRONMENT.md) lists every environment variable EmailEngine reads, with its default.
|
|
66
66
|
|
|
67
67
|
## App Access
|
|
68
68
|
|