emailengine-app 2.80.0 → 2.81.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 (178) hide show
  1. package/.dockerignore +44 -0
  2. package/.github/docker-smoke-test.sh +16 -0
  3. package/.github/workflows/deploy.yml +4 -0
  4. package/.github/workflows/release.yaml +4 -0
  5. package/.github/workflows/test.yml +2 -0
  6. package/.release-please-manifest.json +1 -1
  7. package/CHANGELOG.md +56 -0
  8. package/Dockerfile +17 -9
  9. package/README.md +6 -0
  10. package/data/google-crawlers.json +1 -1
  11. package/docker-compose.yml +7 -1
  12. package/lib/api-routes/account-routes.js +239 -73
  13. package/lib/api-routes/blocklist-routes.js +24 -0
  14. package/lib/api-routes/delivery-test-routes.js +6 -0
  15. package/lib/api-routes/gateway-routes.js +30 -0
  16. package/lib/api-routes/license-routes.js +10 -0
  17. package/lib/api-routes/mcp-oauth-routes.js +3 -3
  18. package/lib/api-routes/mcp-routes.js +39 -21
  19. package/lib/api-routes/oauth2-app-routes.js +38 -1
  20. package/lib/api-routes/outbox-routes.js +6 -0
  21. package/lib/api-routes/permission-map.js +212 -42
  22. package/lib/api-routes/pubsub-routes.js +8 -0
  23. package/lib/api-routes/route-helpers.js +58 -11
  24. package/lib/api-routes/settings-routes.js +50 -4
  25. package/lib/api-routes/stats-routes.js +6 -0
  26. package/lib/api-routes/template-routes.js +21 -0
  27. package/lib/api-routes/token-routes.js +34 -2
  28. package/lib/api-routes/webhook-route-routes.js +13 -0
  29. package/lib/autodetect-imap-settings.js +4 -4
  30. package/lib/email-client/base-client.js +6 -3
  31. package/lib/email-client/credential-errors.js +4 -0
  32. package/lib/email-client/imap/login-failure.js +52 -0
  33. package/lib/email-client/imap/subconnection.js +2 -1
  34. package/lib/email-client/imap-client.js +3 -6
  35. package/lib/enum-descriptions.js +12 -2
  36. package/lib/imapproxy/imap-server.js +1 -1
  37. package/lib/mcp/oauth.js +46 -8
  38. package/lib/mcp/protocol.js +78 -35
  39. package/lib/mcp/tools.js +53 -17
  40. package/lib/privileged-settings.js +147 -0
  41. package/lib/schemas.js +60 -16
  42. package/lib/sentry.js +13 -2
  43. package/lib/settings.js +13 -0
  44. package/lib/tls/catalog.js +428 -0
  45. package/lib/tls/context.js +87 -161
  46. package/lib/tls/listeners.js +62 -0
  47. package/lib/tls/provision.js +1 -1
  48. package/lib/tls/status.js +128 -79
  49. package/lib/tls/store.js +3 -2
  50. package/lib/token-permission-view.js +253 -102
  51. package/lib/token-permissions.js +176 -26
  52. package/lib/tokens.js +7 -6
  53. package/lib/tools.js +5 -3
  54. package/lib/ui-routes/account-routes.js +195 -61
  55. package/lib/ui-routes/admin-config-routes.js +41 -21
  56. package/lib/ui-routes/admin-entities-routes.js +32 -22
  57. package/lib/ui-routes/mcp-consent-routes.js +72 -31
  58. package/lib/ui-routes/tls-config-routes.js +121 -74
  59. package/package.json +16 -16
  60. package/sbom.json +1 -1
  61. package/server.js +7 -1
  62. package/static/css/flyonui.css +1 -1
  63. package/static/css/public.css +41 -0
  64. package/static/css/src/app.tailwind.css +135 -4
  65. package/static/js/public.js +218 -0
  66. package/static/js/ui.js +89 -36
  67. package/static/licenses.html +55 -37
  68. package/translations/README.md +4 -3
  69. package/translations/de.mo +0 -0
  70. package/translations/de.po +296 -185
  71. package/translations/en.po +220 -128
  72. package/translations/es.mo +0 -0
  73. package/translations/es.po +558 -0
  74. package/translations/et.mo +0 -0
  75. package/translations/et.po +288 -181
  76. package/translations/fr.mo +0 -0
  77. package/translations/fr.po +295 -183
  78. package/translations/it.mo +0 -0
  79. package/translations/it.po +558 -0
  80. package/translations/ja.mo +0 -0
  81. package/translations/ja.po +268 -192
  82. package/translations/locales.json +24 -0
  83. package/translations/messages.pot +179 -127
  84. package/translations/nl.mo +0 -0
  85. package/translations/nl.po +288 -175
  86. package/translations/pl.mo +0 -0
  87. package/translations/pl.po +294 -181
  88. package/translations/sv.mo +0 -0
  89. package/translations/sv.po +555 -0
  90. package/translations/tr.mo +0 -0
  91. package/translations/tr.po +555 -0
  92. package/update-info.sh +12 -6
  93. package/views/account/login-redirect.hbs +6 -5
  94. package/views/account/passkeys.hbs +8 -8
  95. package/views/account/security.hbs +2 -2
  96. package/views/accounts/account.hbs +19 -21
  97. package/views/accounts/browse.hbs +1 -1
  98. package/views/accounts/edit.hbs +15 -15
  99. package/views/accounts/index.hbs +3 -3
  100. package/views/accounts/register/imap-server.hbs +27 -173
  101. package/views/accounts/register/validating.hbs +139 -0
  102. package/views/config/ai.hbs +15 -17
  103. package/views/config/branding.hbs +7 -7
  104. package/views/config/document-store/chat.hbs +9 -8
  105. package/views/config/document-store/index.hbs +14 -15
  106. package/views/config/document-store/mappings/index.hbs +5 -6
  107. package/views/config/document-store/mappings/new.hbs +1 -2
  108. package/views/config/document-store/pre-processing/index.hbs +4 -4
  109. package/views/config/email-processing.hbs +6 -6
  110. package/views/config/imap-proxy.hbs +7 -8
  111. package/views/config/license.hbs +9 -9
  112. package/views/config/logging.hbs +5 -7
  113. package/views/config/mcp.hbs +90 -58
  114. package/views/config/network.hbs +4 -4
  115. package/views/config/oauth/app.hbs +12 -12
  116. package/views/config/oauth/index.hbs +6 -6
  117. package/views/config/oauth/subscriptions.hbs +9 -9
  118. package/views/config/security.hbs +5 -7
  119. package/views/config/service.hbs +11 -10
  120. package/views/config/smtp.hbs +9 -12
  121. package/views/config/tls-upload.hbs +3 -3
  122. package/views/config/tls.hbs +281 -182
  123. package/views/config/webhooks.hbs +12 -15
  124. package/views/dashboard.hbs +9 -8
  125. package/views/gateways/edit.hbs +3 -3
  126. package/views/gateways/gateway.hbs +3 -3
  127. package/views/gateways/index.hbs +6 -6
  128. package/views/gateways/new.hbs +3 -3
  129. package/views/internals/index.hbs +15 -13
  130. package/views/layout/app.hbs +6 -6
  131. package/views/layout/login.hbs +32 -19
  132. package/views/layout/main.hbs +2 -2
  133. package/views/layout/prompt.hbs +15 -18
  134. package/views/layout/public.hbs +1 -1
  135. package/views/mcp/authorize.hbs +47 -45
  136. package/views/partials/accounts_table.hbs +5 -5
  137. package/views/partials/ace_assets.hbs +1 -1
  138. package/views/partials/add_account_modal.hbs +4 -4
  139. package/views/partials/address_list.hbs +4 -4
  140. package/views/partials/filter_editor_js.hbs +2 -2
  141. package/views/partials/gateway_form.hbs +5 -5
  142. package/views/partials/gateway_js.hbs +1 -1
  143. package/views/partials/mcp_access_levels.hbs +16 -9
  144. package/views/partials/mcp_account_limit.hbs +2 -2
  145. package/views/partials/mcp_tool_count.hbs +15 -14
  146. package/views/partials/oauth_config_header.hbs +2 -2
  147. package/views/partials/oauth_form.hbs +37 -42
  148. package/views/partials/public_alerts.hbs +1 -1
  149. package/views/partials/public_test_labels.hbs +15 -0
  150. package/views/partials/public_theme_init.hbs +1 -1
  151. package/views/partials/security_header.hbs +2 -2
  152. package/views/partials/template_form.hbs +4 -4
  153. package/views/partials/theme_init.hbs +1 -1
  154. package/views/partials/tls_security_card.hbs +4 -1
  155. package/views/partials/ui/form-field.hbs +6 -1
  156. package/views/partials/ui/setting-ref.hbs +12 -7
  157. package/views/partials/ui/stat-card.hbs +4 -1
  158. package/views/partials/ui/tabs.hbs +3 -7
  159. package/views/partials/webhook_form.hbs +9 -12
  160. package/views/partials/webhooks_editor_functions.hbs +1 -1
  161. package/views/reference/index.hbs +3 -3
  162. package/views/reference/redirect.hbs +1 -1
  163. package/views/reference/tag.hbs +1 -1
  164. package/views/reference/token.hbs +4 -4
  165. package/views/suppression-lists/index.hbs +8 -6
  166. package/views/suppression-lists/list.hbs +13 -8
  167. package/views/templates/edit.hbs +1 -1
  168. package/views/templates/index.hbs +10 -11
  169. package/views/templates/template.hbs +5 -5
  170. package/views/tokens/index.hbs +17 -17
  171. package/views/tokens/new.hbs +190 -93
  172. package/views/unsubscribe.hbs +1 -1
  173. package/views/webhooks/edit.hbs +1 -1
  174. package/views/webhooks/index.hbs +10 -11
  175. package/views/webhooks/new.hbs +1 -1
  176. package/views/webhooks/webhook.hbs +5 -6
  177. package/workers/api.js +9 -8
  178. package/workers/smtp.js +1 -1
package/.dockerignore ADDED
@@ -0,0 +1,44 @@
1
+ # The Dockerfile copies an explicit allowlist of paths, so this mostly just keeps the build context
2
+ # from being sent to the daemon - locally that is node_modules and the several hundred megabytes of
3
+ # built binaries in ee-dist. The `**` rules below are the exception: those paths sit inside directories
4
+ # the Dockerfile does copy, so they change what ends up in the image as well.
5
+ #
6
+ # Deliberately a denylist rather than "ignore everything, then un-ignore what is copied": a new COPY
7
+ # in the Dockerfile should just work, not fail on a file this list forgot to let through.
8
+
9
+ .git
10
+ .github
11
+ node_modules
12
+
13
+ # Build outputs and test artifacts
14
+ ee-dist
15
+ dist
16
+ test-results
17
+ blob-report
18
+ playwright-report
19
+ coverage
20
+
21
+ # Not part of the runtime image
22
+ test
23
+ examples
24
+ screenshots
25
+ scripts
26
+ systemd
27
+ manual-test
28
+
29
+ # Local environment, secrets and editor state. keylog.txt is a TLS key log (npm run dev writes one);
30
+ # it is gitignored, but nothing else would keep it out of the context and the layer cache.
31
+ .env*
32
+ keylog.txt
33
+ *.heapsnapshot
34
+ *.cpuprofile
35
+ *.heapprofile
36
+ core.*
37
+ .claude
38
+ .vscode
39
+ .idea
40
+
41
+ # Anchored at every level, not just the root: these turn up inside directories that ARE copied
42
+ # (static/.DS_Store was shipping in the image).
43
+ **/.DS_Store
44
+ **/*.log
@@ -42,4 +42,20 @@ for cmd in scan encrypt; do
42
42
  fi
43
43
  done
44
44
 
45
+ # The image has to be able to say which commit it was built from. update-info.sh writes an empty
46
+ # commit rather than failing when EE_COMMIT_HASH is missing, and the Dockerfile requires the arg
47
+ # precisely so that cannot happen - but the Dockerfile's check is a source-level one, and this is the
48
+ # only place the built artifact is asked the question directly. Also catches the commit being right in
49
+ # the Dockerfile and wrong in the image, e.g. a stale layer replayed from the build cache.
50
+ commit=$(docker run --rm --entrypoint node "$image" -p "require('/emailengine/version-info.json').commit" 2>&1) && rc=0 || rc=$?
51
+
52
+ if [ "$rc" -ne 0 ]; then
53
+ echo "::error::could not read version-info.json from the image"
54
+ printf '%s\n' "$commit"
55
+ status=1
56
+ elif [ -z "${commit//[[:space:]]/}" ] || [ "$commit" = "undefined" ]; then
57
+ echo "::error::the image reports no commit hash - it was built without a usable EE_COMMIT_HASH build arg"
58
+ status=1
59
+ fi
60
+
45
61
  exit $status
@@ -115,6 +115,8 @@ jobs:
115
115
  platforms: ${{ matrix.platform }}
116
116
  load: true
117
117
  tags: emailengine:smoke-test
118
+ build-args: |
119
+ EE_COMMIT_HASH=${{ github.sha }}
118
120
  # Without a cache backend BuildKit starts cold on every run: setup-buildx-action
119
121
  # creates a fresh builder on an ephemeral runner. The scope is per-architecture so
120
122
  # the two legs cannot evict each other's entries.
@@ -136,6 +138,8 @@ jobs:
136
138
  outputs: type=image,"name=docker.io/${{ github.repository }},ghcr.io/${{ github.repository }}",push-by-digest=true,name-canonical=true,push=true
137
139
  cache-from: type=gha,scope=${{ matrix.arch }}
138
140
  cache-to: type=gha,mode=max,scope=${{ matrix.arch }}
141
+ build-args: |
142
+ EE_COMMIT_HASH=${{ github.sha }}
139
143
 
140
144
  - name: Export digest
141
145
  run: |
@@ -116,6 +116,8 @@ jobs:
116
116
  load: true
117
117
  tags: emailengine:smoke-test
118
118
  cache-from: type=gha,scope=${{ matrix.arch }}
119
+ build-args: |
120
+ EE_COMMIT_HASH=${{ github.sha }}
119
121
 
120
122
  - name: Smoke test the CLI inside the image
121
123
  run: bash .github/docker-smoke-test.sh emailengine:smoke-test
@@ -133,6 +135,8 @@ jobs:
133
135
  outputs: type=image,"name=docker.io/${{ github.repository }},ghcr.io/${{ github.repository }}",push-by-digest=true,name-canonical=true,push=true
134
136
  cache-from: type=gha,scope=${{ matrix.arch }}
135
137
  cache-to: type=gha,mode=max,scope=${{ matrix.arch }}
138
+ build-args: |
139
+ EE_COMMIT_HASH=${{ github.sha }}
136
140
 
137
141
  - name: Export digest
138
142
  run: |
@@ -159,6 +159,8 @@ jobs:
159
159
  platforms: linux/amd64
160
160
  load: true
161
161
  tags: emailengine:scan
162
+ build-args: |
163
+ EE_COMMIT_HASH=${{ github.sha }}
162
164
 
163
165
  - name: Scan for known vulnerabilities
164
166
  uses: aquasecurity/trivy-action@v0.36.0
@@ -1,3 +1,3 @@
1
1
  {
2
- ".": "2.80.0"
2
+ ".": "2.81.0"
3
3
  }
package/CHANGELOG.md CHANGED
@@ -1,5 +1,61 @@
1
1
  # Changelog
2
2
 
3
+ ## [2.81.0](https://github.com/postalsys/emailengine/compare/v2.80.1...v2.81.0) (2026-09-13)
4
+
5
+
6
+ ### Features
7
+
8
+ * **autodiscovery:** let the API carry credentials and the hosted form skip the settings step ([f78b62e](https://github.com/postalsys/emailengine/commit/f78b62ec910899f7de83fbc972a44858f024b6ac))
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * **api:** skip the server settings step by default for minted setup links ([2c43c60](https://github.com/postalsys/emailengine/commit/2c43c6075614e9765160628a49d1e97f0f94f1c6))
14
+ * **deps:** move the packages that pin nodemailer onto 10.0.9 and dedupe the tree ([db2abd8](https://github.com/postalsys/emailengine/commit/db2abd80319f9ab61406b1d222e357ffbd9ec8b0))
15
+ * **deps:** update bull-board and simplewebauthn ([66ab196](https://github.com/postalsys/emailengine/commit/66ab196f623041a048b32817ad28352e97b3b336))
16
+ * **deps:** update joi-messages to 1.1.3 for the Joi 18 validation messages ([c62b34c](https://github.com/postalsys/emailengine/commit/c62b34cc56fd9ca221cdf1e990ac6145c7536236))
17
+ * **deps:** update nodemailer to 10.0.8 across the packages that pin it ([6dc08f7](https://github.com/postalsys/emailengine/commit/6dc08f7ae47db4a7f537d8a13c3004aa9983a690))
18
+ * **docker:** bump the node:24-alpine base image digest ([7e6808b](https://github.com/postalsys/emailengine/commit/7e6808be64cc099611746492c71fad2b701bdfcf))
19
+ * **docker:** health-check the container over 127.0.0.1, not localhost ([31ab205](https://github.com/postalsys/emailengine/commit/31ab2051ca22d2da45c2079f6581babbdebb0659))
20
+ * **docker:** pass the commit hash as a build arg instead of reading a branch ref ([c2c03c8](https://github.com/postalsys/emailengine/commit/c2c03c884ce061ad215ae612eaaafef00bf513ba))
21
+ * **i18n:** fill the empty plural forms in the certificate count ([d51803d](https://github.com/postalsys/emailengine/commit/d51803d89125f962235d05cac5c2f5a1e80900e2))
22
+ * **i18n:** improve translation wording and consistency ([576e692](https://github.com/postalsys/emailengine/commit/576e6924432beef0d0261a578494d703cf04d397))
23
+ * **i18n:** translate the remaining hosted form labels and refresh the catalogs ([b04784c](https://github.com/postalsys/emailengine/commit/b04784ce7eed212b324b4e4dd39a9afcafd47da3))
24
+ * **sentry:** report the release with its package prefix so Sentry can order versions ([7bda29f](https://github.com/postalsys/emailengine/commit/7bda29fdeb6b59bade892570971c0ca12f892a44))
25
+ * **sso:** stop the forced-SSO hand-off flashing the login page before it leaves ([9e64618](https://github.com/postalsys/emailengine/commit/9e646188feaced2ea77342abd4e6de49ad6ed169))
26
+ * **test:** fail a stalled test run instead of waiting for the CI job to be killed ([9631512](https://github.com/postalsys/emailengine/commit/9631512af363dd0b33b28f4c2ce4e2f996042b9d))
27
+ * **test:** follow the admin copy pass into the two specs it broke ([1524368](https://github.com/postalsys/emailengine/commit/1524368de4b49a176b4338e810503bdca08fac3d))
28
+ * **test:** force the test runner to exit so one leaked handle cannot hang a tier ([bbdccdb](https://github.com/postalsys/emailengine/commit/bbdccdb6af747ff96ee70ce688c275886d528d8c))
29
+ * **translations:** add Spanish, Italian and Turkish for the public UI ([d2089c3](https://github.com/postalsys/emailengine/commit/d2089c3c6ab0a4b0c49e2d76a4fa62dc642bdd58))
30
+ * **translations:** add Swedish for the public UI ([048c086](https://github.com/postalsys/emailengine/commit/048c0869b1645548be61cb77c0149963a8ac21af))
31
+ * **ui:** make the admin copy consistent and say what each screen actually does ([d7bb57d](https://github.com/postalsys/emailengine/commit/d7bb57d949c8836c6946d3a9f53d3147e3e89ccb))
32
+ * **ui:** make the admin pages read on a phone and stop badges printing over their neighbours ([46e6d49](https://github.com/postalsys/emailengine/commit/46e6d49424a55bb31bbcfe01e759e29484965642))
33
+ * **ui:** refine admin form labels and guidance ([eaa7d00](https://github.com/postalsys/emailengine/commit/eaa7d0060f771136c0f248b8e906a628ce98795b))
34
+
35
+ ## [2.80.1](https://github.com/postalsys/emailengine/compare/v2.80.0...v2.80.1) (2026-09-10)
36
+
37
+
38
+ ### Bug Fixes
39
+
40
+ * **accounts:** stop a delete in the startup window from reporting a failure ([b41896b](https://github.com/postalsys/emailengine/commit/b41896b6706a8165b5481db39abff2f4e3299a13))
41
+ * **admin:** keep the admin UI working behind an HTML-rewriting CDN ([c2e6596](https://github.com/postalsys/emailengine/commit/c2e659687f909e8eaa416407b0fb0b4e5c19ba09))
42
+ * **deps:** update imapflow to 2.0.1 for the Exchange Online IMAP4rev2 advertisement ([a6b1b8f](https://github.com/postalsys/emailengine/commit/a6b1b8f0408a404aca76c8d89e894538eb97f00f))
43
+ * **deps:** update imapflow to 2.0.2, bull-board to 9.10.0 and @postalsys/certs to 1.4.1 ([2817f41](https://github.com/postalsys/emailengine/commit/2817f4134437f75e8c1a27049c850d28adc6351c))
44
+ * **deps:** update nodemailer to 10.0.3 across the packages that pin it ([a791216](https://github.com/postalsys/emailengine/commit/a7912162425c8d7e5bcd3ae020ca875b9d950c91))
45
+ * **imap:** report a login the server could not serve as a connection failure, and announce a repeated failure once ([832d6ab](https://github.com/postalsys/emailengine/commit/832d6ab966e0ad0f490aa3137f8130520d12de13))
46
+ * **mcp:** add the mcp-manage surface scope ([4f5043c](https://github.com/postalsys/emailengine/commit/4f5043c0dc118e73fe90cc0851cb110856d6239e))
47
+ * **mcp:** expose the instance management tools ([08f35a8](https://github.com/postalsys/emailengine/commit/08f35a8a1433bfbf1c14d4f03051876bd7bd2571))
48
+ * **mcp:** keep the connection check out of the Observe level and the service URL out of a settings grant ([e85de25](https://github.com/postalsys/emailengine/commit/e85de254950f6d65e8c342f4f7b371fb96428704))
49
+ * **mcp:** keep the TLS mode and mail certificate checking out of a settings grant ([ad6428f](https://github.com/postalsys/emailengine/commit/ad6428ff5c4bdee1421fc1568a6b1810a9598894))
50
+ * **mcp:** offer instance management first on the consent prompt, the generator and the token form ([6022a5c](https://github.com/postalsys/emailengine/commit/6022a5cfa3d792d8b3fe0e08bfa3bfa324d7a500))
51
+ * **mcp:** read every MCP access decision off one section table ([136c860](https://github.com/postalsys/emailengine/commit/136c860f7586a23c644899526c995ff2533034cd))
52
+ * **tls:** let each listener choose the certificate it presents by default ([056ff8f](https://github.com/postalsys/emailengine/commit/056ff8feb4b9cc990b08c8c0484bac0c044a1e28))
53
+ * **tokens:** accept a per-section grant list on token permissions ([ca6ff34](https://github.com/postalsys/emailengine/commit/ca6ff34f8a13cab3f65c614ab5df4644b3bdfa09))
54
+ * **tokens:** keep a record that names no groups out of the sections the admin split created ([d817416](https://github.com/postalsys/emailengine/commit/d81741690a32c26329f0e993bb1f0ce16414f2dc))
55
+ * **tokens:** keep the built-in listeners and the AI endpoint out of a settings grant ([d069dd7](https://github.com/postalsys/emailengine/commit/d069dd7e706f39791e0591e134286cb17e699f66))
56
+ * **tokens:** make the management endpoints grantable in their own sections ([4f975bf](https://github.com/postalsys/emailengine/commit/4f975bf72aeb818bcb3b64c98473f7eef92d040b))
57
+ * **ui:** rebuild the stylesheet so the MCP configuration page gets its section spacing ([e99bd30](https://github.com/postalsys/emailengine/commit/e99bd30644442ced19bfa82f4139076352db7c17))
58
+
3
59
  ## [2.80.0](https://github.com/postalsys/emailengine/compare/v2.79.9...v2.80.0) (2026-09-09)
4
60
 
5
61
 
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:e67514e5d0f6c46656005e1b693b2ec9d52e80b641307de684d4a015ba7a4eaf AS builder
14
+ FROM node:24-alpine@sha256:50c8e8ca1d27439048670df5883f32d57cf81cff6233222c893fd0d9884cbd81 AS builder
15
15
 
16
16
  ARG BUILDPLATFORM
17
17
  ARG TARGETPLATFORM
@@ -55,18 +55,26 @@ COPY sbom.json sbom.json
55
55
  COPY scan.js scan.js
56
56
  COPY server.js server.js
57
57
 
58
- RUN mkdir -p .git/refs/heads
59
- COPY .git/refs/heads/master .git/refs/heads/master
60
-
61
- # version-info.json is generated here and the inputs are dropped again, so neither the git ref nor
62
- # the script itself ends up in the runtime image.
58
+ # The commit hash is passed in rather than read out of the build context, which used to be
59
+ # `COPY .git/refs/heads/master` and tied the build to one branch name. See
60
+ # test/docker-commit-hash-guardrail-test.js for the full account.
61
+ #
62
+ # Declared HERE and not up with the other ARGs: an ARG's value is part of the cache key of every RUN
63
+ # below it, so moving this above `npm ci` makes the install layer miss on every single commit.
64
+ ARG EE_COMMIT_HASH
65
+
66
+ # version-info.json is generated here and the script is dropped again, so it does not end up in the
67
+ # runtime image. The `:?` check is the whole enforcement that a commit was supplied: update-info.sh
68
+ # deliberately falls through to an empty commit rather than failing, because its non-Docker callers
69
+ # (render.yaml, the deploy workflow) do not all have one to give. Here it is required, so a build that
70
+ # forgets the arg fails loudly instead of shipping an image that cannot say what it is built from.
63
71
  COPY update-info.sh update-info.sh
64
- RUN chmod +x ./update-info.sh \
72
+ RUN : "${EE_COMMIT_HASH:?EE_COMMIT_HASH build arg is required, e.g. --build-arg EE_COMMIT_HASH=\$(git rev-parse HEAD)}" \
65
73
  && ./update-info.sh \
66
- && rm -rf .git update-info.sh
74
+ && rm -f update-info.sh
67
75
 
68
76
  # Runtime stage.
69
- FROM node:24-alpine@sha256:e67514e5d0f6c46656005e1b693b2ec9d52e80b641307de684d4a015ba7a4eaf
77
+ FROM node:24-alpine@sha256:50c8e8ca1d27439048670df5883f32d57cf81cff6233222c893fd0d9884cbd81
70
78
 
71
79
  # `apk upgrade` patches the Alpine packages that the base image itself lags on - at the time of
72
80
  # writing node:24-alpine still carries an openssl below 3.5.8-r0. dumb-init reaps zombies as PID 1.
package/README.md CHANGED
@@ -68,6 +68,12 @@ Refer to the [configuration documentation](https://learn.emailengine.app/docs/co
68
68
 
69
69
  By default, EmailEngine only allows connections from localhost. To enable external access, either edit the config file or use the CLI option `--api.host="0.0.0.0"`. Ensure to secure external access with a firewall or proxy to allow only trusted sources.
70
70
 
71
+ ### Content-Security-Policy
72
+
73
+ Since v2.79.9 the admin interface is served with a nonce-based Content-Security-Policy, so only the scripts EmailEngine rendered will run. A CDN or proxy that rewrites the HTML on its way to the browser breaks that, because the scripts it re-creates do not carry the nonce. Cloudflare's Rocket Loader is the common case: the admin pages still render, but nothing on them works, and the browser console reports blocked inline scripts. Turn such an optimizer off for the hostname EmailEngine is served from.
74
+
75
+ Set `EENGINE_CSP_MODE=report-only` to keep the policy out of the way while still logging violations to the browser console, or `EENGINE_CSP_MODE=off` to send only the framing protection. See the [configuration documentation](https://learn.emailengine.app/docs/configuration/environment-variables).
76
+
71
77
  ## Deployment
72
78
 
73
79
  ### Ubuntu or Debian
@@ -1,5 +1,5 @@
1
1
  {
2
- "creationTime": "2026-09-08T14:45:48.000000",
2
+ "creationTime": "2026-09-11T14:46:08.000000",
3
3
  "prefixes": [
4
4
  {
5
5
  "ipv6Prefix": "2001:4860:4801:2008::/64"
@@ -48,7 +48,13 @@ services:
48
48
  EENGINE_WORKERS: ${EENGINE_WORKERS:-4}
49
49
 
50
50
  healthcheck:
51
- test: ['CMD', 'wget', '--no-verbose', '--tries=1', '--spider', 'http://localhost:3000/health']
51
+ # 127.0.0.1 and not localhost: the image is Alpine, so this is BusyBox wget on musl.
52
+ # musl returns ::1 first for localhost (both are in the container's /etc/hosts) and
53
+ # BusyBox wget connects to that one address without falling back to the next, while
54
+ # EmailEngine listens on 0.0.0.0, which is IPv4 only. Through localhost the check can
55
+ # only ever report "connection refused", so the container stays unhealthy for good and
56
+ # anything chained behind `depends_on: service_healthy` waits forever.
57
+ test: ['CMD', 'wget', '--no-verbose', '--tries=1', '--spider', 'http://127.0.0.1:3000/health']
52
58
  interval: ${HEALTHCHECK_INTERVAL:-30s}
53
59
  timeout: ${HEALTHCHECK_TIMEOUT:-10s}
54
60
  retries: ${HEALTHCHECK_RETRIES:-3}