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.
Files changed (120) hide show
  1. package/.ncurc.js +19 -8
  2. package/.release-please-manifest.json +1 -1
  3. package/CHANGELOG.md +73 -0
  4. package/Dockerfile +7 -3
  5. package/ENVIRONMENT.md +24 -23
  6. package/README.md +1 -1
  7. package/bin/healthcheck.js +1 -1
  8. package/copy-static-files.sh +0 -8
  9. package/data/google-crawlers.json +1 -1
  10. package/encrypt.js +1 -4
  11. package/lib/account/field-codec.js +396 -0
  12. package/lib/account-assignment.js +26 -9
  13. package/lib/account.js +196 -462
  14. package/lib/api-routes/account-routes.js +49 -6
  15. package/lib/api-routes/route-metadata.js +5 -2
  16. package/lib/api-routes/submit-routes.js +15 -2
  17. package/lib/api-token-auth.js +342 -274
  18. package/lib/arf-detect.js +174 -149
  19. package/lib/attachment-size.js +29 -0
  20. package/lib/autodetect-imap-settings.js +482 -296
  21. package/lib/consts.js +5 -5
  22. package/lib/db.js +1 -4
  23. package/lib/email-client/base-client.js +907 -780
  24. package/lib/email-client/gmail-client.js +557 -450
  25. package/lib/email-client/imap/cid-parts.js +61 -0
  26. package/lib/email-client/imap/mailbox.js +376 -422
  27. package/lib/email-client/imap/sync-operations.js +239 -178
  28. package/lib/email-client/imap-client.js +5 -5
  29. package/lib/email-client/message-builder.js +4 -5
  30. package/lib/email-client/new-message-steps.js +168 -2
  31. package/lib/email-client/outlook/graph-message.js +266 -0
  32. package/lib/email-client/outlook/subscription-expiry.js +30 -0
  33. package/lib/email-client/outlook-client.js +652 -808
  34. package/lib/get-raw-email.js +338 -232
  35. package/lib/get-secret.js +1 -4
  36. package/lib/imapproxy/imap-server.js +5 -5
  37. package/lib/license-subscription.js +60 -0
  38. package/lib/load-env.js +48 -0
  39. package/lib/logger-consts.js +37 -1
  40. package/lib/logger.js +1 -4
  41. package/lib/mail-probe.js +157 -0
  42. package/lib/mcp/tools.js +244 -207
  43. package/lib/metric-values.js +76 -0
  44. package/lib/metrics.js +320 -0
  45. package/lib/oauth/gmail.js +39 -120
  46. package/lib/oauth/http-request.js +195 -0
  47. package/lib/oauth/mail-ru.js +33 -60
  48. package/lib/oauth/outlook.js +37 -137
  49. package/lib/oauth/pubsub/google.js +176 -117
  50. package/lib/oauth2-apps.js +440 -463
  51. package/lib/openapi/build-document.js +10 -10
  52. package/lib/read-env-value.js +31 -7
  53. package/lib/redis-backend-warnings.js +70 -0
  54. package/lib/route-descriptors.js +78 -0
  55. package/lib/schemas.js +10 -1
  56. package/lib/sentry-integrations.js +299 -0
  57. package/lib/sentry.js +75 -27
  58. package/lib/sso-routes.js +249 -0
  59. package/lib/sso.js +29 -6
  60. package/lib/tools.js +17 -28
  61. package/lib/ui-routes/account-edit-form.js +198 -0
  62. package/lib/ui-routes/account-page.js +241 -0
  63. package/lib/ui-routes/account-routes.js +46 -349
  64. package/lib/ui-routes/account-setup.js +1 -1
  65. package/lib/ui-routes/auth-routes.js +10 -10
  66. package/lib/ui-routes/provider-signin.js +187 -0
  67. package/lib/ui-routes/route-helpers.js +1 -1
  68. package/lib/ui-routes/unsubscribe-routes.js +2 -2
  69. package/lib/ui-view-context.js +328 -0
  70. package/lib/utils/public-suffix.js +22 -101
  71. package/lib/web-safe-html.js +20 -7
  72. package/lib/worker-metrics.js +82 -0
  73. package/list-generate.js +2 -5
  74. package/package.json +28 -24
  75. package/sbom.json +360 -1030
  76. package/scripts/refresh-test-tokens.js +1 -1
  77. package/server.js +400 -677
  78. package/static/css/flyonui.css +1 -1
  79. package/static/css/public.css +55 -1
  80. package/static/css/src/app.tailwind.css +18 -0
  81. package/static/js/ee-client.js +2619 -645
  82. package/static/js/ui.js +12 -2
  83. package/static/licenses.html +224 -764
  84. package/translations/de.mo +0 -0
  85. package/translations/de.po +429 -390
  86. package/translations/en.mo +0 -0
  87. package/translations/en.po +342 -257
  88. package/translations/es.mo +0 -0
  89. package/translations/es.po +440 -395
  90. package/translations/et.mo +0 -0
  91. package/translations/et.po +425 -375
  92. package/translations/fr.mo +0 -0
  93. package/translations/fr.po +425 -383
  94. package/translations/it.mo +0 -0
  95. package/translations/it.po +441 -394
  96. package/translations/ja.mo +0 -0
  97. package/translations/ja.po +408 -335
  98. package/translations/messages.pot +188 -130
  99. package/translations/nl.mo +0 -0
  100. package/translations/nl.po +419 -382
  101. package/translations/pl.mo +0 -0
  102. package/translations/pl.po +425 -379
  103. package/translations/sv.mo +0 -0
  104. package/translations/sv.po +440 -388
  105. package/translations/tr.mo +0 -0
  106. package/translations/tr.po +441 -387
  107. package/views/account-identity-error.hbs +1 -1
  108. package/views/account-workspace-error.hbs +2 -2
  109. package/views/accounts/browse.hbs +19 -1
  110. package/views/accounts/register/imap-server.hbs +22 -7
  111. package/views/accounts/register/imap.hbs +3 -0
  112. package/views/accounts/register/index.hbs +1 -27
  113. package/views/accounts/register/provider-signin.hbs +58 -0
  114. package/views/oauth-scope-error.hbs +1 -1
  115. package/views/partials/provider_signin_button.hbs +30 -0
  116. package/views/queues/index.hbs +1 -1
  117. package/views/redirect.hbs +1 -1
  118. package/views/unsubscribe.hbs +6 -6
  119. package/workers/api.js +20 -451
  120. package/data/public_suffix_list.dat +0 -16698
package/.ncurc.js CHANGED
@@ -23,7 +23,7 @@ module.exports = {
23
23
  target: name =>
24
24
  ['pino', '@playwright/test'].includes(name)
25
25
  ? 'patch'
26
- : ['gettext-parser', 'marked', '@sentry/node-core', 'he', 'iconv-lite'].includes(name)
26
+ : ['gettext-parser', 'marked', 'he', 'iconv-lite', '@hapi/boom'].includes(name)
27
27
  ? 'minor'
28
28
  : 'latest'
29
29
  // pino - held on 10.3.x. 10.4.0 took PR #2294, which makes lib/caller.js prefer
@@ -44,22 +44,33 @@ module.exports = {
44
44
  // times out with "Received: undefined" while the page snapshot shows the button).
45
45
  // Same spec passes in 3.8 s on 1.63.0; nothing in the 1.64 release notes covers
46
46
  // it. Lift once a 1.64.x or later passes that spec unchanged.
47
- // gettext-parser - 8.x is ESM-only
47
+ // gettext-parser - 8.x and later are ESM-only (10.0.0 is type:module with no require condition). It is a
48
+ // devDependency only (gettext-extract.js and test/gettext-pot-order-test.js), so pkg is not
49
+ // the constraint: the unit tier runs under `npm run test:cjs` (require(esm) disabled), where
50
+ // an ESM-only gettext-parser fails to load.
48
51
  // marked - 16.x dropped the CommonJS build (ESM-only, needs require(esm)); 15.x is the last
49
52
  // require()-compatible line, verified in a yao/pkg node24 build.
50
53
  // Permanent: an ESM-only release cannot be bundled by pkg, whatever the Node floor.
51
54
  // iconv-lite - 1.0 (alpha since 2026-10) moves to ES modules, relying on require(esm). Held on 0.x;
52
55
  // libmime, imapflow and mailparser carry the same cap. The ES module move keeps it out of
53
56
  // the pkg bundle.
57
+ // @hapi/boom - 11.0.0-rc.0 (dist-tag next, 2026-08) is type:module with only an ESM export (boom PR #309,
58
+ // "convert module to ESM") and engines node>=22. Without this cap `npm run update` would move
59
+ // to it the day 11.0.0 reaches latest, and the pkg binary would fail while dev and tests pass on
60
+ // require(esm). The hapi org did the same to bourne, formula, pinpoint and tlds in 2026 and has
61
+ // ESM-only rcs of hoek 12 and topo 7, so a hapi 22 will likely follow: add every direct
62
+ // @hapi/* dependency here the day it publishes an ESM-only major. hapi 21 itself still depends
63
+ // on boom ^10, hoek ^11 and topo ^6.
54
64
  // he - 2.x is ESM-only (exports only src/he.mjs). 1.2.0 is the last CommonJS release. mailparser,
55
65
  // which reaches EmailEngine through the same require, rejects 2.x for the same reason.
56
66
  // Permanent for the same pkg reason as marked.
57
- // @sentry/node-core - held on the 10.x line for the reason @sentry/node (which it replaced, through its
58
- // `light` entry) was held there: @sentry/node 11.x depends on @sentry/bundler-plugins,
59
- // which pulls the 16 MB Sentry CLI (package `sentry`, licensed FSL-1.1-Apache-2.0, not an
60
- // OSI license) into the runtime tree and the pkg bundle. The node-core line is versioned in
61
- // step with @sentry/node, so lift this only once an 11.x of node-core exists and has been
62
- // checked against that.
67
+ //
68
+ // Sentry: EmailEngine builds its client from @sentry/core (lib/sentry.js, with its own context-lines, context and
69
+ // modules integrations in lib/sentry-integrations.js) and must not depend on @sentry/node or @sentry/node-core.
70
+ // @sentry/node 11.x depends on @sentry/bundler-plugins, which pulls the 16 MB Sentry CLI (package `sentry`,
71
+ // licensed FSL-1.1-Apache-2.0, not an OSI license) and the native oxc-parser into the runtime tree and the pkg
72
+ // bundle, and @sentry/node-core, the light SDK used until 2026-11, ended at 10.x. @sentry/core depends only on
73
+ // @sentry/conventions; check that it still does on every major.
63
74
  //
64
75
  // ical.js was capped at 1.x here as "2.x is ESM-only", which was never true: every 2.x ships a CommonJS
65
76
  // build behind exports.require. Moved to 2.x on 2026-09-28; it is also what resolves a DTSTART against
@@ -1,3 +1,3 @@
1
1
  {
2
- ".": "2.89.0"
2
+ ".": "2.91.0"
3
3
  }
package/CHANGELOG.md CHANGED
@@ -1,5 +1,78 @@
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
+
32
+ ## [2.90.0](https://github.com/postalsys/emailengine/compare/v2.89.0...v2.90.0) (2026-11-20)
33
+
34
+
35
+ ### Features
36
+
37
+ * write inline reply and forward headers in the language of the locale ([454a6dd](https://github.com/postalsys/emailengine/commit/454a6ddc23f9de95f326e8ba55e3e8e0cb67b9a0))
38
+
39
+
40
+ ### Bug Fixes
41
+
42
+ * anchor the AWS WorkMail MX pattern ([1cc357e](https://github.com/postalsys/emailengine/commit/1cc357e58f8678a60a4aeff5a9b5c773126646df))
43
+ * connect a Gmail account whose profile carries no history ID ([c7cb645](https://github.com/postalsys/emailengine/commit/c7cb64595c8f868a9c2ea4c6196a501a13f5803b))
44
+ * fetch listed Gmail messages ten at a time, not eleven ([ac2e0d3](https://github.com/postalsys/emailengine/commit/ac2e0d31447bf73b1c7a7ed0425bb7b9706b1f9c))
45
+ * give a reply or forward a text part when it has no text of its own ([86522b7](https://github.com/postalsys/emailengine/commit/86522b7a3c4547ad72fc8accc5f6266f6353e9d3))
46
+ * keep account counter names off Object.prototype ([35d62b0](https://github.com/postalsys/emailengine/commit/35d62b0ee10a3206ee128d941cb0b719f68cf8d0))
47
+ * keep an unsaved message in the message browser when its save question is dismissed ([aace267](https://github.com/postalsys/emailengine/commit/aace267ddd763b7647ce92b72b48b4a8bd7e285a))
48
+ * keep complaint recipients collected before the feedback report ([09b5e84](https://github.com/postalsys/emailengine/commit/09b5e848b51a8ebb24f2ca584f0466ddcfa0110c))
49
+ * leave an account field holding undefined out of the stored hash ([9e96857](https://github.com/postalsys/emailengine/commit/9e968579b165c7462f0c3fb547ed1fd0e011f03f))
50
+ * leave optional packages out of the Docker image ([6d00ea1](https://github.com/postalsys/emailengine/commit/6d00ea121364872da597bf07bda2f064ca83c1e1))
51
+ * link straight to a message in the admin message browser ([9d881a6](https://github.com/postalsys/emailengine/commit/9d881a6706aae3bc002eeb6295bfa932cd20f7ea))
52
+ * load .env with Node's own parser instead of dotenv ([23fd4ad](https://github.com/postalsys/emailengine/commit/23fd4adf0396690557de837b8a2e609f0285de1e))
53
+ * load the passkey library on the first passkey request ([2f4280b](https://github.com/postalsys/emailengine/commit/2f4280b4f09eb084ca1d81f6e6519b55a1a543a3))
54
+ * look up registrable domains through tldts ([942bd43](https://github.com/postalsys/emailengine/commit/942bd4368dc5c59ea99d8a880f518403df014e05))
55
+ * mark a forwarded message $Forwarded only, and even when it was answered ([c52084a](https://github.com/postalsys/emailengine/commit/c52084a86966661bca74f48a5c9cf447d8b7ca99))
56
+ * move the Prometheus metrics to @prometheus-io/client ([a2c6f63](https://github.com/postalsys/emailengine/commit/a2c6f63c75c2c3a12bcca62e29fbe932990b74d1))
57
+ * plain-text quotes, web-safe font and attachment file size ([779082e](https://github.com/postalsys/emailengine/commit/779082ee6735b475f26fdfcacc52af7a5028ef2a))
58
+ * quote a plain-text original in the HTML part of a reply or forward ([2f6a02a](https://github.com/postalsys/emailengine/commit/2f6a02a9f8074ac2070025f03cd2715da48bcd7f))
59
+ * raise the Outlook client secret flag when no secret is configured ([6667e8d](https://github.com/postalsys/emailengine/commit/6667e8dea9b42a836b32929606f1e5da29f4479a))
60
+ * refuse a missing API token with a 401 instead of a TypeError ([140d88d](https://github.com/postalsys/emailengine/commit/140d88de63c5e7243a46c535c9035072f4561088))
61
+ * register the OIDC sign-in route at boot, before discovery succeeds ([a81ee0b](https://github.com/postalsys/emailengine/commit/a81ee0bed1419941ae824718fd316104f5dcc637))
62
+ * report the file size of attachments ([79386b3](https://github.com/postalsys/emailengine/commit/79386b39355f3cb023dc5f591460fabb97e68f89))
63
+ * resolve @hapi/bell to the root joi 18 ([0b77d15](https://github.com/postalsys/emailengine/commit/0b77d154ee8471f8d665f917b9eec65634a861db))
64
+ * return the usual shape from the IMAP attachment list without a body structure ([caaaba9](https://github.com/postalsys/emailengine/commit/caaaba9f7d8c4f588239bc76a5e84f71b6175611))
65
+ * send error reports through @sentry/core 11 ([b6531e5](https://github.com/postalsys/emailengine/commit/b6531e52445a059a6f70b44b83887b28015f960d))
66
+ * stop an untouched account edit save from reconnecting IMAP ([65ee163](https://github.com/postalsys/emailengine/commit/65ee1639a91ed4ad7a4e57059b0227ddba4f70fa))
67
+ * stop re-downloading an API message that came back without content ([ba5e272](https://github.com/postalsys/emailengine/commit/ba5e2721db068abe5345ce3a49b7d67d3f3b99e7))
68
+ * stop storing account objects as '[object Object]' ([324c803](https://github.com/postalsys/emailengine/commit/324c8035c1343c0cf904b8feb40efd7dbd451643))
69
+ * treat an uppercase GET as a GET when placing an Outlook request payload ([7a55420](https://github.com/postalsys/emailengine/commit/7a55420c93c075048b061b8a98550fce8a32a4ac))
70
+ * update dependencies ([d116dbc](https://github.com/postalsys/emailengine/commit/d116dbc09112f170133c22608fd8b880eb78247d))
71
+ * update dependencies ([aa47701](https://github.com/postalsys/emailengine/commit/aa47701d5cd9dbe3a0b78effaf4499cab93d0548))
72
+ * update dependencies ([2bf0f1b](https://github.com/postalsys/emailengine/commit/2bf0f1b6542dac24e291db973de6f663159de52d))
73
+ * update dependencies ([a61a043](https://github.com/postalsys/emailengine/commit/a61a043b8d6b36c21abeebe3cc304b188fba6cd4))
74
+ * web-safe HTML of plain-text mail no longer fixes the font ([484c601](https://github.com/postalsys/emailengine/commit/484c6016c6ac10094dde44af3989fef4a4a8ef22))
75
+
3
76
  ## [2.89.0](https://github.com/postalsys/emailengine/compare/v2.88.0...v2.89.0) (2026-11-15)
4
77
 
5
78
 
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:8a32c8cf649a49915a66e81e7a609223c708d0adabf288ee3f4077d765542f85 AS builder
14
+ FROM node:24-alpine@sha256:116b800c3754b440ee0aa3ed2f20f5bf3d99a554bfd9adeea09ea8017f6e85f5 AS builder
15
15
 
16
16
  ARG BUILDPLATFORM
17
17
  ARG TARGETPLATFORM
@@ -33,7 +33,11 @@ WORKDIR /emailengine
33
33
  # the lockfile actually changes.
34
34
  COPY package.json package.json
35
35
  COPY package-lock.json package-lock.json
36
- RUN npm ci --omit=dev
36
+ # --omit=optional, as the binary build does: the only optional runtime packages are msgpackr-extract
37
+ # (a native addon with an install script that MSGPACKR_NATIVE_ACCELERATION_DISABLED below keeps
38
+ # unused anyway, plus its six platform prebuilds), handlebars' precompiler (uglify-js) and a
39
+ # types package. None of them is loaded at runtime.
40
+ RUN npm ci --omit=dev --omit=optional
37
41
 
38
42
  # Copy app folders
39
43
  COPY bin bin
@@ -74,7 +78,7 @@ RUN : "${EE_COMMIT_HASH:?EE_COMMIT_HASH build arg is required, e.g. --build-arg
74
78
  && rm -f update-info.sh
75
79
 
76
80
  # Runtime stage.
77
- FROM node:24-alpine@sha256:8a32c8cf649a49915a66e81e7a609223c708d0adabf288ee3f4077d765542f85
81
+ FROM node:24-alpine@sha256:116b800c3754b440ee0aa3ed2f20f5bf3d99a554bfd9adeea09ea8017f6e85f5
78
82
 
79
83
  # `apk upgrade` patches the Alpine packages that the base image itself lags on - at the time of
80
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
- | `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. |
31
- | `EENGINE_PREPARED_TOKEN` | none | A base64url msgpack-encoded API token to provision at start. |
32
- | `EENGINE_PREPARED_PASSWORD` | none | A base64url PBKDF2 admin password hash to apply at start. Writing a different hash ends every admin session. |
33
- | `EENGINE_PREPARED_LICENSE` | none | A license key to apply at start. |
34
- | `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. |
35
- | `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. |
36
- | `EENGINE_CONNECTION_SETUP_DELAY` | `0` | Pause between two account assignments while accounts are handed to workers, to spread the connection load at start (duration). |
37
- | `EENGINE_UPDATE_CHECK_DISABLED` | `false` | Stop checking for new EmailEngine releases. |
38
- | `EENGINE_BEACON_DISABLED` | `false` | Opt out of the anonymized feature-usage diagnostics sent with license validation. License validation itself is unaffected. |
39
- | `EENGINE_DISABLE_SETUP_WARNINGS` | `false` | Hide the setup warning banners in the admin UI. |
40
- | `EENGINE_DOCEAN` | none | Set by the DigitalOcean one-click image; adjusts the dashboard and diagnostics. Not for manual use. |
41
- | `EENGINE_INSTALL_SCRIPT` | none | Set by the install script; adjusts the dashboard and diagnostics. Not for manual use. |
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 are **not** supported. Use a standard Redis primary instance. EmailEngine warns about all of the above on the dashboard when it detects them.
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.
@@ -6,7 +6,7 @@
6
6
 
7
7
  // Resolve `.env` and `config/` against the application root, in the same order as server.js
8
8
  process.chdir(require('path').join(__dirname, '..'));
9
- require('dotenv').config({ quiet: true });
9
+ require('../lib/load-env').loadEnvFile();
10
10
 
11
11
  const config = require('@zone-eu/wild-config');
12
12
  const { probeTarget, probe } = require('../lib/health-probe');
@@ -93,14 +93,6 @@ fetch_json() {
93
93
  fetch_json data/google-crawlers.json wget -q -O - https://developers.google.com/static/crawling/ipranges/special-crawlers.json
94
94
  node -e 'console.log("Google crawlers updated: "+require("./data/google-crawlers.json").creationTime);'
95
95
 
96
- # The Public Suffix List, read by lib/utils/public-suffix.js. Kept verbatim (it is MPL-2.0 and carries
97
- # its own licence header), and only accepted when both sections arrived whole: a truncated list would
98
- # not fail to parse, it would just quietly know fewer suffixes. Nor is a list older than the one
99
- # already here: the site's CDN has served a copy two days behind the one committed the same morning,
100
- # and the refresh replaced the newer list with it. Exit code 3 keeps the current copy without a warning
101
- fetch_checked data/public_suffix_list.dat 'const fs=require("fs");const t=fs.readFileSync(process.argv[1],"utf8");for(const m of ["===BEGIN ICANN DOMAINS===","===END ICANN DOMAINS===","===BEGIN PRIVATE DOMAINS===","===END PRIVATE DOMAINS==="])if(!t.includes(m))throw new Error("missing "+m);const v=x=>((x.match(/^\/\/ VERSION: (\S+)/m)||[])[1]||"");let old="";try{old=v(fs.readFileSync(process.argv[2],"utf8"))}catch(e){}if(old&&v(t)<old){console.error("Public Suffix List: the download ("+(v(t)||"no version")+") is older than the copy here ("+old+"), keeping it");process.exit(3)}' wget -q -O - https://publicsuffix.org/list/public_suffix_list.dat
102
- grep -m1 '^// VERSION:' data/public_suffix_list.dat || true
103
-
104
96
  # The SBOM shipped in the binary and served at /sbom.json, generated from the installed tree by npm
105
97
  # (SPDX 2.3). Runtime dependencies only: dev tooling never reaches an instance. It used to come
106
98
  # from GitHub's dependency graph (gh sbom), which only knows a lockfile once it has been pushed, so
@@ -1,5 +1,5 @@
1
1
  {
2
- "creationTime": "2026-11-13T15:46:09.000000",
2
+ "creationTime": "2026-11-24T15:46:00.000000",
3
3
  "prefixes": [
4
4
  {
5
5
  "ipv6Prefix": "2001:4860:4801:2008::/64"
package/encrypt.js CHANGED
@@ -1,9 +1,6 @@
1
1
  'use strict';
2
2
 
3
- if (!process.env.EE_ENV_LOADED) {
4
- require('dotenv').config({ quiet: true });
5
- process.env.EE_ENV_LOADED = 'true';
6
- }
3
+ require('./lib/load-env').loadEnvOnce();
7
4
 
8
5
  try {
9
6
  process.chdir(__dirname);