emailengine-app 2.87.2 → 2.89.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 (71) hide show
  1. package/.ncurc.js +24 -44
  2. package/.release-please-manifest.json +1 -1
  3. package/CHANGELOG.md +37 -0
  4. package/ENVIRONMENT.md +26 -23
  5. package/LICENSE_EMAILENGINE.txt +20 -12
  6. package/app.json +3 -3
  7. package/bin/emailengine.js +7 -11
  8. package/data/google-crawlers.json +1 -1
  9. package/data/public_suffix_list.dat +155 -16
  10. package/lib/account.js +69 -49
  11. package/lib/admin-password.js +85 -0
  12. package/lib/api-routes/license-routes.js +9 -0
  13. package/lib/api-token-auth.js +21 -5
  14. package/lib/calendar-event.js +15 -3
  15. package/lib/consts.js +5 -0
  16. package/lib/db.js +1 -0
  17. package/lib/email-client/base-client.js +36 -15
  18. package/lib/email-client/gmail-client.js +20 -6
  19. package/lib/email-client/imap/connection-errors.js +30 -1
  20. package/lib/email-client/imap/session-expiry.js +83 -0
  21. package/lib/email-client/imap-client.js +12 -2
  22. package/lib/email-client/smtp-pool-manager.js +66 -8
  23. package/lib/export.js +147 -22
  24. package/lib/graph-notifications.js +60 -0
  25. package/lib/imap-proxy-auth.js +52 -18
  26. package/lib/imapproxy/imap-core/lib/commands/id.js +4 -2
  27. package/lib/imapproxy/imap-core/lib/imap-command.js +44 -4
  28. package/lib/imapproxy/imap-server.js +10 -1
  29. package/lib/imapproxy/proxy-handoff.js +100 -5
  30. package/lib/license-subscription.js +244 -0
  31. package/lib/node-version.js +99 -12
  32. package/lib/oauth/gmail.js +18 -0
  33. package/lib/oauth/outlook-identity.js +54 -12
  34. package/lib/prepared-password.js +38 -0
  35. package/lib/queue-browser/index.js +6 -6
  36. package/lib/queue-job-actions.js +59 -4
  37. package/lib/read-env-value.js +46 -21
  38. package/lib/redis-url.js +23 -0
  39. package/lib/response-stream.js +69 -1
  40. package/lib/revocation-events.js +79 -0
  41. package/lib/schemas.js +18 -2
  42. package/lib/settings.js +50 -24
  43. package/lib/sso.js +23 -0
  44. package/lib/submit-penalty.js +24 -0
  45. package/lib/submit-processor.js +10 -2
  46. package/lib/tokens.js +6 -0
  47. package/lib/tools.js +90 -18
  48. package/lib/ui-routes/admin-config-routes.js +3 -276
  49. package/lib/ui-routes/auth-routes.js +13 -64
  50. package/lib/ui-routes/dashboard-routes.js +4 -0
  51. package/lib/ui-routes/license-routes.js +326 -0
  52. package/lib/web-safe-html.js +74 -1
  53. package/lib/webhook-delivery.js +21 -20
  54. package/lib/webhook-penalty.js +18 -17
  55. package/lib/webhooks.js +18 -0
  56. package/list-generate.js +56 -19
  57. package/package.json +28 -31
  58. package/sbom.json +373 -964
  59. package/scan.js +2 -0
  60. package/server.js +273 -100
  61. package/static/css/flyonui.css +2 -2
  62. package/static/js/ui.js +11 -4
  63. package/static/licenses.html +1108 -504
  64. package/translations/messages.pot +18 -18
  65. package/views/config/license.hbs +43 -16
  66. package/views/dashboard.hbs +9 -0
  67. package/views/partials/side_menu.hbs +1 -1
  68. package/views/upgrade.hbs +25 -0
  69. package/workers/api.js +108 -107
  70. package/workers/imap.js +4 -6
  71. package/lib/net-tos-guard.js +0 -42
@@ -1,7 +1,7 @@
1
1
  msgid ""
2
2
  msgstr ""
3
3
  "Content-Type: text/plain; charset=ascii\n"
4
- "POT-Creation-Date: 2026-11-04 20:42+0000\n"
4
+ "POT-Creation-Date: 2026-11-15 21:46+0000\n"
5
5
 
6
6
  #: lib/autodetect-imap-settings.js:160
7
7
  msgid ""
@@ -11,19 +11,19 @@ msgid ""
11
11
  "connect your account."
12
12
  msgstr ""
13
13
 
14
- #: lib/tools.js:1729
14
+ #: lib/tools.js:1781
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:2693
20
+ #: lib/tools.js:2765
21
21
  msgid "Signature validation failed"
22
22
  msgstr ""
23
23
 
24
- #: lib/tools.js:2716
25
- #: lib/tools.js:2722
26
- #: lib/tools.js:2727
24
+ #: lib/tools.js:2788
25
+ #: lib/tools.js:2794
26
+ #: lib/tools.js:2799
27
27
  #: lib/ui-routes/account-setup.js:80
28
28
  msgid "Invalid or expired account setup URL"
29
29
  msgstr ""
@@ -37,7 +37,7 @@ msgstr ""
37
37
  #: lib/ui-routes/account-routes.js:1360
38
38
  #: lib/ui-routes/route-helpers.js:350
39
39
  #: lib/ui-routes/route-helpers.js:373
40
- #: workers/api.js:2055
40
+ #: workers/api.js:2050
41
41
  msgid "Email Account Setup"
42
42
  msgstr ""
43
43
 
@@ -108,7 +108,7 @@ msgstr ""
108
108
  msgid "Temporary error, please try again"
109
109
  msgstr ""
110
110
 
111
- #: lib/ui-routes/admin-config-routes.js:199
111
+ #: lib/ui-routes/admin-config-routes.js:196
112
112
  msgid "Invalid API key for OpenAI"
113
113
  msgstr ""
114
114
 
@@ -117,7 +117,7 @@ msgid "Unknown"
117
117
  msgstr ""
118
118
 
119
119
  #: lib/ui-routes/oauth-config-routes.js:273
120
- #: views/config/license.hbs:20
120
+ #: views/config/license.hbs:28
121
121
  #: views/partials/queue_retention_note.hbs:10
122
122
  #: views/queues/index.hbs:54
123
123
  #: views/queues/index.hbs:78
@@ -413,7 +413,7 @@ msgstr[0] ""
413
413
  msgstr[1] ""
414
414
 
415
415
  #: views/error.hbs:6
416
- #: workers/api.js:2916
416
+ #: workers/api.js:2930
417
417
  msgid "Something went wrong"
418
418
  msgstr ""
419
419
 
@@ -529,37 +529,37 @@ msgid ""
529
529
  "received."
530
530
  msgstr ""
531
531
 
532
- #: workers/api.js:1967
532
+ #: workers/api.js:1962
533
533
  msgid ""
534
534
  "The sign-in was cancelled or the requested access was not granted. Open the "
535
535
  "account setup link again to retry."
536
536
  msgstr ""
537
537
 
538
- #: workers/api.js:1976
538
+ #: workers/api.js:1971
539
539
  msgid "Sign-in with the email provider failed: %s"
540
540
  msgstr ""
541
541
 
542
- #: workers/api.js:1980
542
+ #: workers/api.js:1975
543
543
  msgid "Sign-in with the email provider failed: no authorization code was received"
544
544
  msgstr ""
545
545
 
546
- #: workers/api.js:1984
546
+ #: workers/api.js:1979
547
547
  msgid "Sign-in with the email provider failed: the request state is not valid"
548
548
  msgstr ""
549
549
 
550
- #: workers/api.js:1993
550
+ #: workers/api.js:1988
551
551
  msgid ""
552
552
  "The account setup session has expired or was already used. Open the account "
553
553
  "setup link again to retry."
554
554
  msgstr ""
555
555
 
556
- #: workers/api.js:1999
556
+ #: workers/api.js:1994
557
557
  msgid ""
558
558
  "Sign-in with the email provider failed: the stored setup session is not "
559
559
  "valid"
560
560
  msgstr ""
561
561
 
562
- #: workers/api.js:2915
563
- #: workers/api.js:3038
562
+ #: workers/api.js:2929
563
+ #: workers/api.js:3052
564
564
  msgid "Requested page not found"
565
565
  msgstr ""
@@ -1,6 +1,6 @@
1
1
  {{> ui/page-header title="License" icon="icon-[tabler--settings]"
2
- badgeLabel=(when licenseInfo.details.trial "trial" (when licenseInfo.active "active" "not activated"))
3
- badgeVariant=(when licenseInfo.details.trial "warning" (when licenseInfo.active "success" "error"))
2
+ badgeLabel=(when licenseInfo.details.trial "trial" (when licenseInfo.active "active" (when licenseInfo.subscription "paused" "not activated")))
3
+ badgeVariant=(when licenseInfo.details.trial "warning" (when licenseInfo.active "success" (when licenseInfo.subscription "warning" "error")))
4
4
  class="mb-1"}}
5
5
 
6
6
  <p class="mb-6">
@@ -8,28 +8,41 @@ class="mb-1"}}
8
8
  target="_blank" rel="noopener noreferrer" class="link link-animated">EmailEngine License</a>.
9
9
  </p>
10
10
 
11
- {{#if subexp}}
12
- {{#> ui/stat-card variant="error" title="License Issue" icon="icon-[tabler--alert-triangle]" class="mb-6"}}
11
+ {{#if licenseInfo.subscription}}
12
+ {{#> ui/stat-card variant="error" title=(when isPaused "EmailEngine is paused" "Subscription payment overdue") icon=(when isPaused "icon-[tabler--player-pause]" "icon-[tabler--alert-triangle]") class="mb-6"}}
13
13
 
14
+ {{#if isPaused}}
14
15
  <p class="mb-2">
15
- Your license key is registered but the associated subscription appears to be inactive or the key has
16
- been invalidated.
16
+ The subscription behind this license key is not in good standing{{#if subscriptionSince}} since
17
+ {{subscriptionSince}}{{/if}}.
18
+ Email processing has stopped: accounts do not sync, and no messages or webhooks are sent. Your license key, accounts
19
+ and data are kept.
17
20
  </p>
18
-
19
21
  <p class="mb-2">
20
- You can continue using EmailEngine for <strong>{{ngettext '%d day' '%d days' expiresDays}}</strong>.
21
- After that, you'll need a new license key.
22
+ EmailEngine resumes on its own within an hour of the invoice being paid, or straight away when you check below.
23
+ </p>
24
+ {{else}}
25
+ <p class="mb-2">
26
+ The subscription behind this license key has an unpaid invoice. EmailEngine keeps working until
27
+ <strong>{{subscriptionUntil}}</strong>
28
+ ({{ngettext '%d day' '%d days' expiresDays}}) and then pauses until the invoice is paid.
22
29
  </p>
30
+ {{/if}}
23
31
 
24
- <div>
25
- {{> ui/btn href="https://postalsys.com/plans" external=true label="Renew subscription"
26
- icon="icon-[tabler--arrow-right]"}}
32
+ <div class="flex flex-wrap gap-2">
33
+ {{> ui/btn href="https://postalsys.com/billing/invoices" external=true label="Pay the invoice"
34
+ icon="icon-[tabler--credit-card]"}}
35
+ <form method="post" action="/admin/config/license/recheck" class="inline">
36
+ <input type="hidden" name="crumb" value="{{crumb}}" />
37
+ {{> ui/btn type="submit" label="Check subscription now" variant="primary" style="soft"
38
+ icon="icon-[tabler--refresh]"}}
39
+ </form>
27
40
  </div>
28
41
 
29
42
  {{/ui/stat-card}}
30
43
  {{/if}}
31
44
 
32
- {{#unless licenseInfo.active}}
45
+ {{#unless licenseInfo.details}}
33
46
 
34
47
  {{#> ui/card}}
35
48
  <div class="float-right ms-4">
@@ -47,12 +60,21 @@ class="mb-1"}}
47
60
 
48
61
  {{/unless}}
49
62
 
50
- {{#if licenseInfo.active}}
63
+ {{#if licenseInfo.details}}
51
64
  <div class="card bg-base-100 shadow-md mb-6">
52
65
  <div class="card-header flex flex-wrap items-center justify-between gap-3">
53
66
  <h6 class="card-title text-primary">Current License</h6>
54
- {{> ui/btn label="Remove license" variant="error" style="soft" size="sm" icon="icon-[tabler--trash]"
55
- id="unregister-license-link" overlay="#deleteLicense"}}
67
+ <div class="flex flex-wrap gap-2">
68
+ {{#if isSubscriptionLicense}}{{#unless licenseInfo.subscription}}
69
+ <form method="post" action="/admin/config/license/recheck" class="inline">
70
+ <input type="hidden" name="crumb" value="{{crumb}}" />
71
+ {{> ui/btn type="submit" label="Check subscription now" variant="primary" style="soft" size="sm"
72
+ icon="icon-[tabler--refresh]"}}
73
+ </form>
74
+ {{/unless}}{{/if}}
75
+ {{> ui/btn label="Remove license" variant="error" style="soft" size="sm" icon="icon-[tabler--trash]"
76
+ id="unregister-license-link" overlay="#deleteLicense"}}
77
+ </div>
56
78
  </div>
57
79
  <div class="card-body">
58
80
 
@@ -77,6 +99,11 @@ class="mb-1"}}
77
99
  <dd>Never expires</dd>
78
100
  {{/if}}
79
101
 
102
+ {{#if licenseInfo.details.billing}}
103
+ <dt>Billing</dt>
104
+ <dd>Monthly plan</dd>
105
+ {{/if}}
106
+
80
107
  </dl>
81
108
 
82
109
  </div>
@@ -46,6 +46,15 @@
46
46
  {{> ui/btn label="Add account" icon="icon-[tabler--user-plus]" overlay="#addAccount"}}
47
47
  {{/ui/page-header}}
48
48
 
49
+ {{!-- Not dismissable: the next Node.js floor raise stops an instance on such a release from starting --}}
50
+ {{#if nodeRuntime.outsideRange}}
51
+ {{#> ui/alert-banner variant="warning" title="Upgrade Node.js" class="mt-6"}}
52
+ <p>This instance runs on Node.js {{nodeRuntime.version}}, which is outside the range EmailEngine supports
53
+ ({{nodeRuntime.supported}}). It works for now, but a future EmailEngine release may not start on it.
54
+ <a href="/admin/upgrade#node" class="link link-animated">How to upgrade Node.js</a></p>
55
+ {{/ui/alert-banner}}
56
+ {{/if}}
57
+
49
58
  {{#each redisWarnings}}
50
59
  {{#> ui/stat-card variant=(eeColor color) title=title icon="icon-[tabler--alert-circle]" class="mt-6"}}
51
60
  {{#each details}}
@@ -37,6 +37,6 @@
37
37
  {{/ui/menu-section}}
38
38
 
39
39
  {{> ui/menu-item href="/admin/config/license" label="License" icon="icon-[tabler--license] size-4.5"
40
- active=menuLicense warnText=(when licenseInfo.active "" "License not activated")}}
40
+ active=menuLicense warnText=(when licenseInfo.active "" (when licenseInfo.subscription "EmailEngine paused" "License not activated"))}}
41
41
 
42
42
  </ul>
package/views/upgrade.hbs CHANGED
@@ -41,3 +41,28 @@
41
41
  </div>
42
42
  </div>
43
43
  {{/if}}
44
+
45
+ {{#unless nodeRuntime.packaged}}
46
+ {{#> ui/card title="Node.js" id="node" class="mt-6"}}
47
+ {{#if nodeRuntime.outsideRange}}
48
+ {{#> ui/alert-banner variant="warning" class="mb-4"}}
49
+ <p>This instance runs on Node.js {{nodeRuntime.version}}, which is outside the range EmailEngine supports
50
+ ({{nodeRuntime.supported}}). Upgrade Node.js before upgrading EmailEngine.</p>
51
+ {{/ui/alert-banner}}
52
+ {{else}}
53
+ <p class="mb-4">This instance runs on Node.js {{nodeRuntime.version}}. EmailEngine supports {{nodeRuntime.supported}}.</p>
54
+ {{/if}}
55
+
56
+ {{#if isRender}}
57
+ <p class="mb-2">Render picks the Node.js release from the <code>engines</code> field of EmailEngine's
58
+ <code>package.json</code>, so a manual deploy of the latest version also moves Node.js.</p>
59
+ {{else}}
60
+ <p class="mb-2">On a Debian or Ubuntu server that installed Node.js from NodeSource, which includes the
61
+ DigitalOcean one-click image, log in and run:</p>
62
+ <pre class="ee-code-block"><code>{{#each nodeRuntime.upgradeCommands}}$ {{this}}
63
+ {{/each}}</code></pre>
64
+ <p class="mt-2">Anywhere else, install a supported release with the tool Node.js came from. The
65
+ EmailEngine binaries and the Docker image carry their own Node.js.</p>
66
+ {{/if}}
67
+ {{/ui/card}}
68
+ {{/unless}}