emailengine-app 2.84.2 → 2.85.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 (86) hide show
  1. package/.ncurc.js +5 -3
  2. package/.prettierignore +5 -1
  3. package/.prettierrc.js +2 -0
  4. package/.release-please-manifest.json +1 -1
  5. package/CHANGELOG.md +33 -0
  6. package/Dockerfile +6 -0
  7. package/README.md +1 -1
  8. package/bin/emailengine.js +434 -408
  9. package/copy-static-files.sh +39 -14
  10. package/data/google-crawlers.json +1 -1
  11. package/data/public_suffix_list.dat +16562 -0
  12. package/eslint.config.js +81 -99
  13. package/lib/account.js +36 -5
  14. package/lib/api-reference/format.js +4 -3
  15. package/lib/api-routes/account-routes.js +177 -12
  16. package/lib/api-routes/blocklist-routes.js +23 -2
  17. package/lib/api-routes/delivery-test-routes.js +26 -3
  18. package/lib/api-routes/export-routes.js +28 -2
  19. package/lib/api-routes/gateway-routes.js +28 -2
  20. package/lib/api-routes/mailbox-routes.js +41 -2
  21. package/lib/api-routes/message-routes.js +97 -3
  22. package/lib/api-routes/oauth2-app-routes.js +48 -15
  23. package/lib/api-routes/outbox-routes.js +45 -11
  24. package/lib/api-routes/permission-map.js +12 -1
  25. package/lib/api-routes/settings-routes.js +23 -2
  26. package/lib/api-routes/submit-routes.js +336 -309
  27. package/lib/api-routes/template-routes.js +38 -2
  28. package/lib/api-routes/token-routes.js +142 -96
  29. package/lib/api-routes/webhook-route-routes.js +13 -2
  30. package/lib/bounce-detect.js +397 -205
  31. package/lib/consts.js +5 -4
  32. package/lib/email-client/base-client.js +10 -31
  33. package/lib/email-client/gmail-client.js +9 -11
  34. package/lib/email-client/imap/mailbox.js +3 -19
  35. package/lib/email-client/imap/subconnection.js +1 -1
  36. package/lib/email-client/imap-client.js +1 -1
  37. package/lib/email-client/notification-handler.js +1 -2
  38. package/lib/gateway.js +2 -3
  39. package/lib/hapi-request-logger.js +107 -0
  40. package/lib/imapproxy/imap-core/README.md +6 -5
  41. package/lib/mcp/tools.js +37 -8
  42. package/lib/notify-attachments.js +17 -0
  43. package/lib/oauth/outlook-mailbox.js +35 -0
  44. package/lib/oauth/state.js +24 -0
  45. package/lib/oauth2-apps.js +1 -1
  46. package/lib/pbkdf2-phc.js +1 -1
  47. package/lib/schemas.js +1 -1
  48. package/lib/sso.js +1 -1
  49. package/lib/swagger-options.js +1 -1
  50. package/lib/thread-diagnostics.js +46 -0
  51. package/lib/timezones.js +109 -0
  52. package/lib/token-permission-view.js +3 -3
  53. package/lib/tools.js +40 -10
  54. package/lib/totp.js +2 -5
  55. package/lib/translations.js +1 -2
  56. package/lib/ui-routes/account-routes.js +475 -454
  57. package/lib/ui-routes/account-setup.js +99 -0
  58. package/lib/ui-routes/admin-config-routes.js +88 -10
  59. package/lib/ui-routes/admin-entities-routes.js +91 -7
  60. package/lib/ui-routes/auth-routes.js +90 -38
  61. package/lib/ui-routes/internals-routes.js +5 -0
  62. package/lib/ui-routes/oauth-config-routes.js +124 -82
  63. package/lib/ui-routes/route-helpers.js +19 -3
  64. package/lib/ui-routes/tls-config-routes.js +58 -15
  65. package/lib/utils/back-off.js +82 -0
  66. package/lib/utils/murmurhash3.js +66 -0
  67. package/lib/utils/public-suffix.js +122 -0
  68. package/lib/utils/random-id.js +26 -0
  69. package/lib/utils/version.js +74 -0
  70. package/lib/webhook-routing.js +27 -0
  71. package/lib/webhooks.js +41 -6
  72. package/package.json +27 -29
  73. package/sbom.json +7980 -1
  74. package/server.js +634 -441
  75. package/static/licenses.html +181 -1006
  76. package/translations/messages.pot +62 -63
  77. package/views/config/ai.hbs +1 -1
  78. package/views/config/security.hbs +2 -2
  79. package/views/config/service.hbs +3 -0
  80. package/views/internals/index.hbs +8 -0
  81. package/views/partials/webhook_form.hbs +1 -1
  82. package/views/suppression-lists/index.hbs +1 -1
  83. package/workers/api.js +738 -583
  84. package/workers/export.js +1 -1
  85. package/workers/submit.js +1 -1
  86. package/workers/webhooks.js +16 -32
@@ -1,7 +1,7 @@
1
1
  msgid ""
2
2
  msgstr ""
3
3
  "Content-Type: text/plain; charset=ascii\n"
4
- "POT-Creation-Date: 2026-10-18 16:36+0000\n"
4
+ "POT-Creation-Date: 2026-10-20 18:02+0000\n"
5
5
 
6
6
  #: lib/autodetect-imap-settings.js:160
7
7
  msgid ""
@@ -11,113 +11,112 @@ msgid ""
11
11
  "connect your account."
12
12
  msgstr ""
13
13
 
14
- #: lib/tools.js:1738
14
+ #: lib/tools.js:1746
15
15
  #: lib/ui-routes/unsubscribe-routes.js:34
16
16
  #: lib/ui-routes/unsubscribe-routes.js:102
17
17
  msgid "Invalid input"
18
18
  msgstr ""
19
19
 
20
- #: lib/tools.js:2738
20
+ #: lib/tools.js:2746
21
21
  msgid "Signature validation failed"
22
22
  msgstr ""
23
23
 
24
- #: lib/tools.js:2761
25
- #: lib/tools.js:2767
26
- #: lib/tools.js:2772
27
- #: lib/ui-routes/account-routes.js:1327
24
+ #: lib/tools.js:2769
25
+ #: lib/tools.js:2775
26
+ #: lib/tools.js:2780
27
+ #: lib/ui-routes/account-setup.js:80
28
28
  msgid "Invalid or expired account setup URL"
29
29
  msgstr ""
30
30
 
31
- #: lib/ui-routes/account-routes.js:486
32
- #: lib/ui-routes/account-routes.js:530
33
- #: lib/ui-routes/account-routes.js:850
34
- #: lib/ui-routes/account-routes.js:927
35
- #: lib/ui-routes/account-routes.js:940
36
- #: lib/ui-routes/account-routes.js:987
37
- #: lib/ui-routes/account-routes.js:1203
38
- #: lib/ui-routes/account-routes.js:1394
31
+ #: lib/ui-routes/account-routes.js:229
32
+ #: lib/ui-routes/account-routes.js:787
33
+ #: lib/ui-routes/account-routes.js:939
34
+ #: lib/ui-routes/account-routes.js:952
35
+ #: lib/ui-routes/account-routes.js:999
36
+ #: lib/ui-routes/account-routes.js:1208
37
+ #: lib/ui-routes/account-routes.js:1360
39
38
  #: lib/ui-routes/route-helpers.js:350
40
- #: workers/api.js:2346
41
- #: workers/api.js:2421
39
+ #: lib/ui-routes/route-helpers.js:373
40
+ #: workers/api.js:2411
42
41
  msgid "Email Account Setup"
43
42
  msgstr ""
44
43
 
45
- #: lib/ui-routes/account-routes.js:555
46
- #: lib/ui-routes/account-routes.js:587
47
- #: lib/ui-routes/unsubscribe-routes.js:74
48
- msgid "Invalid request. Check your input and try again."
44
+ #: lib/ui-routes/account-routes.js:369
45
+ msgid "Too many attempts for this setup link. Request a new setup link to continue."
49
46
  msgstr ""
50
47
 
51
- #: lib/ui-routes/account-routes.js:731
52
- msgid "Too many attempts for this setup link. Request a new setup link to continue."
48
+ #: lib/ui-routes/account-routes.js:812
49
+ #: lib/ui-routes/account-routes.js:846
50
+ #: lib/ui-routes/unsubscribe-routes.js:74
51
+ msgid "Invalid request. Check your input and try again."
53
52
  msgstr ""
54
53
 
55
- #: lib/ui-routes/account-routes.js:974
56
- #: lib/ui-routes/account-routes.js:1377
54
+ #: lib/ui-routes/account-routes.js:986
55
+ #: lib/ui-routes/account-routes.js:1343
57
56
  msgid "Couldn't set up account. Try again."
58
57
  msgstr ""
59
58
 
60
- #: lib/ui-routes/account-routes.js:1062
61
- #: lib/ui-routes/account-routes.js:1102
62
- #: lib/ui-routes/admin-entities-routes.js:1953
59
+ #: lib/ui-routes/account-routes.js:1076
60
+ #: lib/ui-routes/account-routes.js:1116
61
+ #: lib/ui-routes/admin-entities-routes.js:1996
63
62
  msgid "Server hostname was not found"
64
63
  msgstr ""
65
64
 
66
- #: lib/ui-routes/account-routes.js:1065
67
- #: lib/ui-routes/account-routes.js:1105
68
- #: lib/ui-routes/admin-entities-routes.js:1956
65
+ #: lib/ui-routes/account-routes.js:1079
66
+ #: lib/ui-routes/account-routes.js:1119
67
+ #: lib/ui-routes/admin-entities-routes.js:1999
69
68
  msgid "Invalid username or password"
70
69
  msgstr ""
71
70
 
72
- #: lib/ui-routes/account-routes.js:1070
73
- #: lib/ui-routes/account-routes.js:1122
74
- #: lib/ui-routes/admin-entities-routes.js:1973
71
+ #: lib/ui-routes/account-routes.js:1084
72
+ #: lib/ui-routes/account-routes.js:1136
73
+ #: lib/ui-routes/admin-entities-routes.js:2016
75
74
  msgid "Connection timed out"
76
75
  msgstr ""
77
76
 
78
- #: lib/ui-routes/account-routes.js:1076
79
- #: lib/ui-routes/account-routes.js:1125
80
- #: lib/ui-routes/admin-entities-routes.js:1976
77
+ #: lib/ui-routes/account-routes.js:1090
78
+ #: lib/ui-routes/account-routes.js:1139
79
+ #: lib/ui-routes/admin-entities-routes.js:2019
81
80
  msgid "Could not connect to server"
82
81
  msgstr ""
83
82
 
84
- #: lib/ui-routes/account-routes.js:1089
85
- #: lib/ui-routes/account-routes.js:1093
86
- #: lib/ui-routes/account-routes.js:1114
87
- #: lib/ui-routes/account-routes.js:1118
88
- #: lib/ui-routes/admin-entities-routes.js:1965
89
- #: lib/ui-routes/admin-entities-routes.js:1969
83
+ #: lib/ui-routes/account-routes.js:1103
84
+ #: lib/ui-routes/account-routes.js:1107
85
+ #: lib/ui-routes/account-routes.js:1128
86
+ #: lib/ui-routes/account-routes.js:1132
87
+ #: lib/ui-routes/admin-entities-routes.js:2008
88
+ #: lib/ui-routes/admin-entities-routes.js:2012
90
89
  msgid "TLS protocol error"
91
90
  msgstr ""
92
91
 
93
- #: lib/ui-routes/account-routes.js:1108
94
- #: lib/ui-routes/admin-entities-routes.js:1959
92
+ #: lib/ui-routes/account-routes.js:1122
93
+ #: lib/ui-routes/admin-entities-routes.js:2002
95
94
  msgid "Authentication credentials were not provided"
96
95
  msgstr ""
97
96
 
98
- #: lib/ui-routes/account-routes.js:1111
99
- #: lib/ui-routes/admin-entities-routes.js:1962
97
+ #: lib/ui-routes/account-routes.js:1125
98
+ #: lib/ui-routes/admin-entities-routes.js:2005
100
99
  msgid "OAuth2 authentication failed"
101
100
  msgstr ""
102
101
 
103
- #: lib/ui-routes/account-routes.js:1128
104
- #: lib/ui-routes/admin-entities-routes.js:1979
102
+ #: lib/ui-routes/account-routes.js:1142
103
+ #: lib/ui-routes/admin-entities-routes.js:2022
105
104
  msgid "Unexpected server response"
106
105
  msgstr ""
107
106
 
108
- #: lib/ui-routes/account-routes.js:1315
107
+ #: lib/ui-routes/account-setup.js:68
109
108
  msgid "Temporary error, please try again"
110
109
  msgstr ""
111
110
 
112
- #: lib/ui-routes/admin-config-routes.js:195
111
+ #: lib/ui-routes/admin-config-routes.js:196
113
112
  msgid "Invalid API key for OpenAI"
114
113
  msgstr ""
115
114
 
116
- #: lib/ui-routes/oauth-config-routes.js:267
115
+ #: lib/ui-routes/oauth-config-routes.js:266
117
116
  msgid "Unknown"
118
117
  msgstr ""
119
118
 
120
- #: lib/ui-routes/oauth-config-routes.js:274
119
+ #: lib/ui-routes/oauth-config-routes.js:273
121
120
  #: views/config/license.hbs:20
122
121
  #: views/partials/queue_retention_note.hbs:10
123
122
  #: views/queues/index.hbs:54
@@ -127,7 +126,7 @@ msgid_plural "%d days"
127
126
  msgstr[0] ""
128
127
  msgstr[1] ""
129
128
 
130
- #: lib/ui-routes/oauth-config-routes.js:276
129
+ #: lib/ui-routes/oauth-config-routes.js:275
131
130
  msgid "Indefinite"
132
131
  msgstr ""
133
132
 
@@ -414,7 +413,7 @@ msgstr[0] ""
414
413
  msgstr[1] ""
415
414
 
416
415
  #: views/error.hbs:6
417
- #: workers/api.js:3216
416
+ #: workers/api.js:3271
418
417
  msgid "Something went wrong"
419
418
  msgstr ""
420
419
 
@@ -530,37 +529,37 @@ msgid ""
530
529
  "received."
531
530
  msgstr ""
532
531
 
533
- #: workers/api.js:2273
532
+ #: workers/api.js:2325
534
533
  msgid ""
535
534
  "The sign-in was cancelled or the requested access was not granted. Open the "
536
535
  "account setup link again to retry."
537
536
  msgstr ""
538
537
 
539
- #: workers/api.js:2282
538
+ #: workers/api.js:2334
540
539
  msgid "Sign-in with the email provider failed: %s"
541
540
  msgstr ""
542
541
 
543
- #: workers/api.js:2286
542
+ #: workers/api.js:2338
544
543
  msgid "Sign-in with the email provider failed: no authorization code was received"
545
544
  msgstr ""
546
545
 
547
- #: workers/api.js:2292
546
+ #: workers/api.js:2342
548
547
  msgid "Sign-in with the email provider failed: the request state is not valid"
549
548
  msgstr ""
550
549
 
551
- #: workers/api.js:2298
550
+ #: workers/api.js:2351
552
551
  msgid ""
553
552
  "The account setup session has expired or was already used. Open the account "
554
553
  "setup link again to retry."
555
554
  msgstr ""
556
555
 
557
- #: workers/api.js:2305
556
+ #: workers/api.js:2357
558
557
  msgid ""
559
558
  "Sign-in with the email provider failed: the stored setup session is not "
560
559
  "valid"
561
560
  msgstr ""
562
561
 
563
- #: workers/api.js:3215
564
- #: workers/api.js:3327
562
+ #: workers/api.js:3270
563
+ #: workers/api.js:3387
565
564
  msgid "Requested page not found"
566
565
  msgstr ""
@@ -106,7 +106,7 @@
106
106
 
107
107
  <div>
108
108
  <div class="text-base-content/60 float-right code-link">[<a
109
- href="https://learn.emailengine.app/docs/advanced/pre-processing" target="_blank"
109
+ href="https://learn.emailengine.app/docs/webhooks/pre-processing" target="_blank"
110
110
  rel="noopener noreferrer" referrerpolicy="no-referrer"
111
111
  class="link link-animated">documentation</a>]
112
112
 
@@ -70,13 +70,13 @@
70
70
  </div>
71
71
 
72
72
  <div>
73
- {{> ui/setting-ref name="EENGINE_SECRET" href="https://learn.emailengine.app/docs/advanced/encryption"}}
73
+ {{> ui/setting-ref name="EENGINE_SECRET" href="https://learn.emailengine.app/docs/deployment/encryption"}}
74
74
 
75
75
  {{#> ui/checkbox id="encryption" label="Data Encryption" checked=encryption disabled=true}}
76
76
  {{> ui/badge label=(when encryption "enabled" "disabled") variant=(when encryption "success" "error")}}
77
77
  {{/ui/checkbox}}
78
78
  <span class="helper-text">Set <code>EENGINE_SECRET</code> environment variable at startup to enable. <a
79
- href="https://learn.emailengine.app/docs/advanced/encryption" target="_blank"
79
+ href="https://learn.emailengine.app/docs/deployment/encryption" target="_blank"
80
80
  rel="noopener noreferrer" referrerpolicy="no-referrer" class="link link-animated">Learn
81
81
  more</a></span>
82
82
  </div>
@@ -33,6 +33,9 @@
33
33
  {{#> ui/form-field id="settingsServiceTimezone" label="Timezone" error=errors.timezone}}
34
34
  <select id="settingsServiceTimezone" class="select max-w-md{{#if errors.timezone}} is-invalid{{/if}}"
35
35
  name="timezone">
36
+ {{#unless values.timezone}}
37
+ <option value="" selected>Not set</option>
38
+ {{/unless}}
36
39
  {{#each timezones}}
37
40
  <option value="{{timezone}}" {{#if selected}}selected{{/if}}>{{name}}</option>
38
41
  {{/each}}
@@ -58,6 +58,7 @@
58
58
  <th>ID</th>
59
59
  <th>Uptime</th>
60
60
  <th class="text-end">Memory</th>
61
+ <th class="text-end" title="Longest event loop delay over the last 15 seconds">Event loop</th>
61
62
  {{#if showAccounts}}
62
63
  <th class="text-end">Accounts</th>
63
64
  {{/if}}
@@ -99,6 +100,13 @@
99
100
  {{heapUsed}}
100
101
  {{/if}}
101
102
  </td>
103
+ <td class="text-end" data-label="Event loop">
104
+ {{#if eventLoopDelayMax includeZero=true}}
105
+ {{formatInteger eventLoopDelayMax userLocale}} ms
106
+ {{else}}
107
+ <span class="text-base-content/40">-</span>
108
+ {{/if}}
109
+ </td>
102
110
  {{#if ../showAccounts}}
103
111
  <td class="text-end" data-label="Accounts">
104
112
  {{#if accounts}}
@@ -27,7 +27,7 @@
27
27
 
28
28
  <div>
29
29
  <div class="text-base-content/60 float-right code-link">[<a
30
- href="https://learn.emailengine.app/docs/advanced/pre-processing" target="_blank" rel="noopener noreferrer"
30
+ href="https://learn.emailengine.app/docs/webhooks/pre-processing" target="_blank" rel="noopener noreferrer"
31
31
  referrerpolicy="no-referrer" class="link link-animated">documentation</a>]</div>
32
32
  <label class="label-text" for="editor-fn">Filter function</label>
33
33
  <div class="mb-2 leading-tight">
@@ -61,7 +61,7 @@
61
61
  <em>List-Unsubscribe</em> link in emails opens. Use it to preview the page or send the
62
62
  link to a recipient who wants to re-subscribe themselves.
63
63
  </p>
64
- <p class="mb-0"><a href="https://learn.emailengine.app/docs/advanced/virtual-lists" target="_blank"
64
+ <p class="mb-0"><a href="https://learn.emailengine.app/docs/sending/deliverability/suppression-lists" target="_blank"
65
65
  rel="noopener noreferrer" referrerpolicy="no-referrer" class="link link-animated">Learn more about virtual
66
66
  lists and sending with a listId</a>.</p>
67
67
  </div>