emailengine-app 2.79.9 → 2.80.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (146) hide show
  1. package/.release-please-manifest.json +1 -1
  2. package/CHANGELOG.md +73 -0
  3. package/README.md +6 -0
  4. package/config/default.toml +5 -1
  5. package/data/google-crawlers.json +1 -1
  6. package/encrypt.js +43 -0
  7. package/lib/account/account-state.js +62 -0
  8. package/lib/account.js +34 -2
  9. package/lib/api-routes/account-routes.js +101 -1
  10. package/lib/api-routes/blocklist-routes.js +24 -0
  11. package/lib/api-routes/delivery-test-routes.js +6 -0
  12. package/lib/api-routes/gateway-routes.js +30 -0
  13. package/lib/api-routes/index.js +1 -1
  14. package/lib/api-routes/license-routes.js +10 -0
  15. package/lib/api-routes/mcp-oauth-routes.js +3 -3
  16. package/lib/api-routes/mcp-routes.js +39 -21
  17. package/lib/api-routes/oauth2-app-routes.js +38 -1
  18. package/lib/api-routes/outbox-routes.js +6 -0
  19. package/lib/api-routes/permission-map.js +208 -43
  20. package/lib/api-routes/pubsub-routes.js +8 -0
  21. package/lib/api-routes/route-helpers.js +58 -11
  22. package/lib/api-routes/settings-routes.js +67 -6
  23. package/lib/api-routes/stats-routes.js +6 -0
  24. package/lib/api-routes/template-routes.js +21 -0
  25. package/lib/api-routes/token-routes.js +34 -2
  26. package/lib/api-routes/webhook-route-routes.js +13 -0
  27. package/lib/autodetect-imap-settings.js +349 -47
  28. package/lib/cert-handler.js +62 -0
  29. package/lib/consts.js +50 -6
  30. package/lib/db.js +12 -0
  31. package/lib/egress-fetch.js +21 -9
  32. package/lib/email-client/base-client.js +238 -67
  33. package/lib/email-client/credential-errors.js +122 -0
  34. package/lib/email-client/gmail/gmail-api.js +2 -1
  35. package/lib/email-client/gmail-client.js +70 -64
  36. package/lib/email-client/imap/connection-errors.js +52 -0
  37. package/lib/email-client/imap/listing-diff.js +47 -6
  38. package/lib/email-client/imap/login-failure.js +52 -0
  39. package/lib/email-client/imap/mailbox.js +457 -379
  40. package/lib/email-client/imap/subconnection.js +17 -12
  41. package/lib/email-client/imap/sync-operations.js +46 -59
  42. package/lib/email-client/imap-client.js +139 -101
  43. package/lib/email-client/message-builder.js +11 -11
  44. package/lib/email-client/outlook/graph-api.js +2 -1
  45. package/lib/email-client/outlook-client.js +219 -106
  46. package/lib/enum-descriptions.js +12 -2
  47. package/lib/imap-proxy-auth.js +58 -3
  48. package/lib/imapproxy/imap-server.js +53 -62
  49. package/lib/lua/h-del-if-equals.lua +39 -0
  50. package/lib/lua/h-set-if-equals.lua +39 -0
  51. package/lib/mcp/oauth.js +46 -8
  52. package/lib/mcp/protocol.js +78 -35
  53. package/lib/mcp/tools.js +53 -17
  54. package/lib/privileged-settings.js +147 -0
  55. package/lib/routes-ui.js +4 -34
  56. package/lib/schemas.js +92 -16
  57. package/lib/security-headers.js +15 -0
  58. package/lib/settings.js +13 -0
  59. package/lib/tls/catalog.js +428 -0
  60. package/lib/tls/context.js +302 -0
  61. package/lib/tls/der.js +223 -0
  62. package/lib/tls/listeners.js +62 -0
  63. package/lib/tls/provision.js +555 -0
  64. package/lib/tls/self-signed.js +282 -0
  65. package/lib/tls/status.js +480 -0
  66. package/lib/tls/store.js +667 -0
  67. package/lib/token-permission-view.js +252 -102
  68. package/lib/token-permissions.js +176 -26
  69. package/lib/tokens.js +7 -6
  70. package/lib/tools.js +73 -27
  71. package/lib/ui-routes/account-routes.js +43 -30
  72. package/lib/ui-routes/admin-config-routes.js +63 -22
  73. package/lib/ui-routes/admin-entities-routes.js +23 -13
  74. package/lib/ui-routes/auth-routes.js +16 -1
  75. package/lib/ui-routes/internals-routes.js +3 -5
  76. package/lib/ui-routes/mcp-consent-routes.js +72 -31
  77. package/lib/ui-routes/network-config-routes.js +54 -45
  78. package/lib/ui-routes/tls-config-routes.js +628 -0
  79. package/lib/utils/mailbox-path.js +51 -0
  80. package/lib/utils/severity.js +31 -0
  81. package/package.json +12 -12
  82. package/sbom.json +1 -1
  83. package/server.js +23 -1
  84. package/static/css/flyonui.css +1 -1
  85. package/static/css/src/app.tailwind.css +11 -0
  86. package/static/js/app.js +34 -0
  87. package/static/js/public.js +6 -2
  88. package/static/js/ui.js +97 -61
  89. package/static/licenses.html +341 -1252
  90. package/translations/messages.pot +62 -56
  91. package/views/account/login-redirect.hbs +22 -0
  92. package/views/account/passkeys.hbs +2 -2
  93. package/views/accounts/account.hbs +2 -2
  94. package/views/accounts/browse.hbs +1 -1
  95. package/views/accounts/edit.hbs +1 -1
  96. package/views/accounts/register/imap-server.hbs +1 -1
  97. package/views/config/ai.hbs +1 -1
  98. package/views/config/branding.hbs +2 -2
  99. package/views/config/document-store/chat.hbs +1 -1
  100. package/views/config/document-store/index.hbs +1 -1
  101. package/views/config/imap-proxy.hbs +1 -4
  102. package/views/config/license.hbs +1 -1
  103. package/views/config/mcp.hbs +88 -52
  104. package/views/config/network.hbs +1 -1
  105. package/views/config/oauth/app.hbs +2 -2
  106. package/views/config/service.hbs +1 -1
  107. package/views/config/smtp.hbs +1 -4
  108. package/views/config/tls-upload.hbs +81 -0
  109. package/views/config/tls.hbs +593 -0
  110. package/views/config/webhooks.hbs +2 -2
  111. package/views/internals/index.hbs +1 -1
  112. package/views/layout/app.hbs +6 -6
  113. package/views/layout/login.hbs +5 -5
  114. package/views/layout/main.hbs +2 -2
  115. package/views/layout/prompt.hbs +3 -3
  116. package/views/layout/public.hbs +1 -1
  117. package/views/mcp/authorize.hbs +47 -45
  118. package/views/partials/ace_assets.hbs +1 -1
  119. package/views/partials/add_account_modal.hbs +1 -1
  120. package/views/partials/filter_editor_js.hbs +2 -2
  121. package/views/partials/gateway_js.hbs +1 -1
  122. package/views/partials/mcp_access_levels.hbs +16 -9
  123. package/views/partials/mcp_tool_count.hbs +15 -14
  124. package/views/partials/oauth_form.hbs +1 -1
  125. package/views/partials/public_theme_init.hbs +1 -1
  126. package/views/partials/side_menu.hbs +1 -0
  127. package/views/partials/template_form.hbs +1 -1
  128. package/views/partials/theme_init.hbs +1 -1
  129. package/views/partials/tls_security_card.hbs +25 -53
  130. package/views/partials/ui/alert-banner.hbs +3 -2
  131. package/views/partials/ui/badge.hbs +6 -2
  132. package/views/partials/ui/btn.hbs +5 -2
  133. package/views/partials/webhooks_editor_functions.hbs +1 -1
  134. package/views/reference/index.hbs +1 -1
  135. package/views/reference/redirect.hbs +1 -1
  136. package/views/reference/tag.hbs +1 -1
  137. package/views/reference/token.hbs +1 -1
  138. package/views/templates/template.hbs +1 -1
  139. package/views/tokens/new.hbs +175 -74
  140. package/views/unsubscribe.hbs +1 -1
  141. package/views/webhooks/webhook.hbs +1 -1
  142. package/workers/api.js +102 -142
  143. package/workers/imap-proxy.js +4 -1
  144. package/workers/smtp.js +51 -44
  145. package/views/partials/tls_security_js.hbs +0 -64
  146. package/views/partials/tls_security_modal.hbs +0 -22
@@ -0,0 +1,31 @@
1
+ 'use strict';
2
+
3
+ // One severity order for every "worst of" roll-up in the admin UI: a group of workers, the
4
+ // listeners on the TLS page. Kept in one place so two badges cannot rank the same states
5
+ // differently. Neutral sits above success on purpose - an unknown member is worth showing over
6
+ // a healthy one - and informational sits below anything that asks for attention.
7
+ const SEVERITY_ORDER = ['success', 'neutral', 'info', 'warning', 'error'];
8
+
9
+ /**
10
+ * Where a badge type sits in the order; an unknown type ranks with success.
11
+ *
12
+ * @param {string} type Badge variant: success|neutral|info|warning|error
13
+ * @returns {number} Higher means worse
14
+ */
15
+ function severityRank(type) {
16
+ const rank = SEVERITY_ORDER.indexOf(type);
17
+ return rank < 0 ? 0 : rank;
18
+ }
19
+
20
+ /**
21
+ * The worst item by badge type.
22
+ *
23
+ * @param {Array} items Non-empty list
24
+ * @param {Function} typeOf Reads the badge type off an item
25
+ * @returns {*} The item that ranks worst; the first of equals
26
+ */
27
+ function worstBy(items, typeOf) {
28
+ return items.reduce((worst, item) => (severityRank(typeOf(item)) > severityRank(typeOf(worst)) ? item : worst));
29
+ }
30
+
31
+ module.exports = { SEVERITY_ORDER, severityRank, worstBy };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "emailengine-app",
3
- "version": "2.79.9",
3
+ "version": "2.80.1",
4
4
  "private": false,
5
5
  "productTitle": "EmailEngine",
6
6
  "description": "Email Sync Engine",
@@ -51,11 +51,11 @@
51
51
  },
52
52
  "homepage": "https://emailengine.app/",
53
53
  "dependencies": {
54
- "@bull-board/api": "9.8.0",
55
- "@bull-board/hapi": "9.8.0",
54
+ "@bull-board/api": "9.10.0",
55
+ "@bull-board/hapi": "9.10.0",
56
56
  "@elastic/elasticsearch": "8.15.3",
57
57
  "@hapi/accept": "6.0.3",
58
- "@hapi/bell": "13.1.0",
58
+ "@hapi/bell": "13.2.0",
59
59
  "@hapi/boom": "10.0.1",
60
60
  "@hapi/cookie": "12.0.1",
61
61
  "@hapi/crumb": "9.0.1",
@@ -65,15 +65,15 @@
65
65
  "@msgpack/msgpack": "3.1.3",
66
66
  "@phc/pbkdf2": "1.1.14",
67
67
  "@postalsys/bounce-classifier": "3.0.0",
68
- "@postalsys/certs": "1.1.1",
68
+ "@postalsys/certs": "1.4.1",
69
69
  "@postalsys/ee-client": "1.8.0",
70
- "@postalsys/email-ai-tools": "1.14.3",
70
+ "@postalsys/email-ai-tools": "1.14.4",
71
71
  "@postalsys/email-content": "0.1.5",
72
72
  "@postalsys/email-text-tools": "2.4.16",
73
73
  "@postalsys/gettext": "4.1.1",
74
74
  "@postalsys/joi-messages": "1.0.5",
75
75
  "@postalsys/templates": "2.0.2",
76
- "@sentry/node": "10.73.0",
76
+ "@sentry/node": "10.74.0",
77
77
  "@simplewebauthn/browser": "14.0.0",
78
78
  "@simplewebauthn/server": "14.0.1",
79
79
  "@zone-eu/mailsplit": "5.4.16",
@@ -93,7 +93,7 @@
93
93
  "html-to-text": "10.0.1",
94
94
  "ical.js": "1.5.0",
95
95
  "iconv-lite": "0.7.3",
96
- "imapflow": "2.0.0",
96
+ "imapflow": "2.0.2",
97
97
  "ioredfour": "1.4.3",
98
98
  "ioredis": "6.0.0",
99
99
  "ipaddr.js": "2.5.0",
@@ -101,19 +101,19 @@
101
101
  "libbase64": "1.3.0",
102
102
  "libmime": "5.4.3",
103
103
  "libqp": "2.1.1",
104
- "mailparser": "3.9.23",
104
+ "mailparser": "3.9.24",
105
105
  "marked": "15.0.12",
106
106
  "minimist": "1.2.8",
107
107
  "murmurhash": "2.0.1",
108
108
  "nanoid": "3.3.18",
109
- "nodemailer": "10.0.1",
109
+ "nodemailer": "10.0.3",
110
110
  "pino": "10.3.1",
111
111
  "prom-client": "15.1.3",
112
112
  "psl": "1.15.0",
113
- "pubface": "1.1.12",
113
+ "pubface": "1.1.13",
114
114
  "punycode.js": "2.3.1",
115
115
  "qrcode": "1.5.4",
116
- "smtp-server": "3.19.9",
116
+ "smtp-server": "3.19.10",
117
117
  "socks": "2.8.10",
118
118
  "timezones-list": "3.1.0",
119
119
  "undici": "7.29.1"