emailengine-app 2.90.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 (64) hide show
  1. package/.release-please-manifest.json +1 -1
  2. package/CHANGELOG.md +29 -0
  3. package/Dockerfile +2 -2
  4. package/ENVIRONMENT.md +24 -23
  5. package/README.md +1 -1
  6. package/data/google-crawlers.json +1 -1
  7. package/lib/account-assignment.js +26 -9
  8. package/lib/account.js +38 -9
  9. package/lib/api-routes/account-routes.js +7 -0
  10. package/lib/autodetect-imap-settings.js +401 -64
  11. package/lib/consts.js +4 -0
  12. package/lib/email-client/imap-client.js +5 -5
  13. package/lib/email-client/message-builder.js +4 -5
  14. package/lib/imapproxy/imap-server.js +5 -5
  15. package/lib/logger-consts.js +37 -1
  16. package/lib/mail-probe.js +157 -0
  17. package/lib/oauth/mail-ru.js +9 -2
  18. package/lib/read-env-value.js +30 -6
  19. package/lib/redis-backend-warnings.js +70 -0
  20. package/lib/tools.js +17 -28
  21. package/lib/ui-routes/account-routes.js +34 -31
  22. package/lib/ui-routes/account-setup.js +1 -1
  23. package/lib/ui-routes/provider-signin.js +187 -0
  24. package/lib/ui-routes/route-helpers.js +1 -1
  25. package/lib/ui-routes/unsubscribe-routes.js +2 -2
  26. package/package.json +13 -13
  27. package/sbom.json +231 -260
  28. package/server.js +80 -1
  29. package/static/css/public.css +55 -1
  30. package/static/licenses.html +126 -148
  31. package/translations/de.mo +0 -0
  32. package/translations/de.po +429 -390
  33. package/translations/en.mo +0 -0
  34. package/translations/en.po +342 -257
  35. package/translations/es.mo +0 -0
  36. package/translations/es.po +440 -395
  37. package/translations/et.mo +0 -0
  38. package/translations/et.po +425 -375
  39. package/translations/fr.mo +0 -0
  40. package/translations/fr.po +425 -383
  41. package/translations/it.mo +0 -0
  42. package/translations/it.po +441 -394
  43. package/translations/ja.mo +0 -0
  44. package/translations/ja.po +408 -335
  45. package/translations/messages.pot +136 -89
  46. package/translations/nl.mo +0 -0
  47. package/translations/nl.po +419 -382
  48. package/translations/pl.mo +0 -0
  49. package/translations/pl.po +425 -379
  50. package/translations/sv.mo +0 -0
  51. package/translations/sv.po +440 -388
  52. package/translations/tr.mo +0 -0
  53. package/translations/tr.po +441 -387
  54. package/views/account-identity-error.hbs +1 -1
  55. package/views/account-workspace-error.hbs +2 -2
  56. package/views/accounts/register/imap-server.hbs +22 -7
  57. package/views/accounts/register/imap.hbs +3 -0
  58. package/views/accounts/register/index.hbs +1 -27
  59. package/views/accounts/register/provider-signin.hbs +58 -0
  60. package/views/oauth-scope-error.hbs +1 -1
  61. package/views/partials/provider_signin_button.hbs +30 -0
  62. package/views/queues/index.hbs +1 -1
  63. package/views/redirect.hbs +1 -1
  64. package/views/unsubscribe.hbs +6 -6
@@ -9,7 +9,7 @@ rather than bouncing them to the calling application. --}}
9
9
 
10
10
  <div class="ee-alert ee-alert-error">
11
11
  <span class="ee-icon ee-icon-alert-triangle ee-icon-lg"></span>
12
- <span>{{_ "This setup link can only be used with one specific email account, and a different one was used." templateLocale}}</span>
12
+ <span>{{_ "This setup link is for a specific email account. You signed in with a different account." templateLocale}}</span>
13
13
  </div>
14
14
 
15
15
  {{!-- These labels are whole phrases rather than "Expected" / "Used": the gettext helper has no message
@@ -4,12 +4,12 @@ account-identity-error.hbs and oauth-scope-error.hbs - the user made a correctab
4
4
  stops here with a way back rather than bouncing them to the calling application. --}}
5
5
 
6
6
  <div class="ee-center">
7
- <h1>{{_ "Work Account Required" templateLocale}}</h1>
7
+ <h1>{{_ "Work or school account required" templateLocale}}</h1>
8
8
  </div>
9
9
 
10
10
  <div class="ee-alert ee-alert-error">
11
11
  <span class="ee-icon ee-icon-alert-triangle ee-icon-lg"></span>
12
- <span>{{_ "This setup accepts only a Google Workspace account, and a personal Google account was used." templateLocale}}</span>
12
+ <span>{{_ "This setup requires a Google Workspace account. You signed in with a personal Google account." templateLocale}}</span>
13
13
  </div>
14
14
 
15
15
  {{#if actualEmail}}
@@ -25,6 +25,21 @@ dropdown allows skipping the test. --}}
25
25
  </div>
26
26
  {{/if}}
27
27
 
28
+ {{!-- A Microsoft mailbox: Microsoft refuses the password over IMAP, so say so before the visitor
29
+ fills in the form and watches the check fail. signInNotice.noApp means no OAuth2 application
30
+ could have been offered instead, which only the operator can change. --}}
31
+ {{#if signInNotice}}
32
+ <div class="ee-alert ee-alert-warning">
33
+ <span class="ee-icon ee-icon-alert-triangle"></span>
34
+ <span>
35
+ {{_ "This appears to be a Microsoft mailbox. Microsoft no longer accepts passwords for IMAP, so the connection test is likely to fail." templateLocale }}
36
+ {{#if signInNotice.noApp}}
37
+ {{_ "Ask the service that sent you this link to enable Microsoft sign-in." templateLocale }}
38
+ {{/if}}
39
+ </span>
40
+ </div>
41
+ {{/if}}
42
+
28
43
  {{!-- Set when the checking page sent the visitor here because its connection check did not pass,
29
44
  so the form says what it is for instead of appearing out of nowhere. The per-protocol detail stays
30
45
  on the page they read it on. --}}
@@ -81,7 +96,7 @@ dropdown allows skipping the test. --}}
81
96
  href="{{values.appPassword_instructions}}" tabindex="-1">{{_ 'Instructions'
82
97
  templateLocale }}</a></span>
83
98
  <span class="ee-tooltip-content" role="tooltip">{{_
84
- '%s accounts require an application password for %s.' templateLocale
99
+ '%s accounts require an app password for %s.' templateLocale
85
100
  values.appPassword_provider "IMAP"}}</span>
86
101
  </span>
87
102
  </div>
@@ -89,7 +104,7 @@ dropdown allows skipping the test. --}}
89
104
  {{/if}}
90
105
 
91
106
  <label class="ee-label" for="imap_auth_pass">
92
- {{_ "Application Password" templateLocale }}
107
+ {{_ "App password" templateLocale }}
93
108
  </label>
94
109
 
95
110
  {{/unless}}
@@ -129,7 +144,7 @@ dropdown allows skipping the test. --}}
129
144
  class="ee-icon ee-icon-help-circle ee-icon-muted"></span></span>
130
145
  <span class="ee-tooltip-content" role="tooltip">
131
146
  <strong>{{_ 'TLS for IMAP' templateLocale }}</strong><br>
132
- {{_ 'TLS (also known as SSL) is usually only needed when using port 993. For other ports EmailEngine falls back to using STARTTLS based encryption.' templateLocale }}
147
+ {{_ 'Enable this option for a direct TLS connection, usually on port 993. Otherwise, EmailEngine uses STARTTLS if the server supports it.' templateLocale }}
133
148
  </span>
134
149
  </span>
135
150
  </div>
@@ -188,7 +203,7 @@ dropdown allows skipping the test. --}}
188
203
  href="{{values.appPassword_instructions}}" tabindex="-1">{{_ 'Instructions'
189
204
  templateLocale }}</a></span>
190
205
  <span class="ee-tooltip-content" role="tooltip">{{_
191
- '%s accounts require an application password for %s.' templateLocale
206
+ '%s accounts require an app password for %s.' templateLocale
192
207
  values.appPassword_provider 'SMTP'}}</span>
193
208
  </span>
194
209
  </div>
@@ -196,7 +211,7 @@ dropdown allows skipping the test. --}}
196
211
  {{/if}}
197
212
 
198
213
  <label class="ee-label" for="smtp_auth_pass">
199
- {{_ "Application Password" templateLocale }}
214
+ {{_ "App password" templateLocale }}
200
215
  </label>
201
216
 
202
217
  {{/unless}}
@@ -236,7 +251,7 @@ dropdown allows skipping the test. --}}
236
251
  class="ee-icon ee-icon-help-circle ee-icon-muted"></span></span>
237
252
  <span class="ee-tooltip-content" role="tooltip">
238
253
  <strong>{{_ 'TLS for SMTP' templateLocale }}</strong><br>
239
- {{_ 'TLS (also known as SSL) is usually only needed when using port 465. For other ports EmailEngine falls back to using STARTTLS based encryption.' templateLocale }}
254
+ {{_ 'Enable this option for a direct TLS connection, usually on port 465. Otherwise, EmailEngine uses STARTTLS if the server supports it.' templateLocale }}
240
255
  </span>
241
256
  </span>
242
257
  </div>
@@ -267,7 +282,7 @@ dropdown allows skipping the test. --}}
267
282
  <details class="ee-dropdown">
268
283
  <summary id="submit-settings-btn-down" class="ee-btn ee-btn-neutral ee-dropdown-toggle"
269
284
  aria-haspopup="menu">
270
- <span class="ee-sr-only">{{_ "Toggle Dropdown" templateLocale }}</span>
285
+ <span class="ee-sr-only">{{_ "Show or hide options" templateLocale }}</span>
271
286
  <span class="ee-icon ee-icon-chevron-down"></span>
272
287
  </summary>
273
288
  <ul class="ee-dropdown-menu" role="menu" aria-labelledby="submit-settings-btn-down">
@@ -6,6 +6,9 @@ step (/accounts/new/imap/server). --}}
6
6
  <input type="hidden" name="crumb" value="{{crumb}}">
7
7
  <input type="hidden" name="data" value="{{values.data}}">
8
8
  <input type="hidden" name="sig" value="{{values.sig}}">
9
+ {{#if values.skipSignIn}}
10
+ <input type="hidden" name="skipSignIn" value="1">
11
+ {{/if}}
9
12
 
10
13
  <div class="ee-form-col">
11
14
 
@@ -24,33 +24,7 @@ provider type. --}}
24
24
  {{#if oauth2apps}}
25
25
 
26
26
  {{#each oauth2apps}}
27
-
28
- {{!-- an app's optional display title (set in the OAuth2 app settings) renders
29
- above its button so several apps of the same provider can be told apart; the
30
- ee-provider-titled hover highlight ties the title and button visually together --}}
31
- <div class="ee-provider{{#if title}} ee-provider-titled{{/if}}">
32
-
33
- {{#if title}}
34
- <h5 class="ee-provider-title">{{title}}</h5>
35
- {{/if}}
36
-
37
- <form method="post" action="/accounts/new">
38
- <input type="hidden" name="crumb" value="{{../crumb}}">
39
- <input type="hidden" name="type" value="{{id}}">
40
- <input type="hidden" name="data" value="{{../values.data}}">
41
- <input type="hidden" name="sig" value="{{../values.sig}}">
42
-
43
- {{#if providerData.linkImage}}
44
- <input type="image" src="{{providerData.linkImage}}" class="ee-provider-image" alt="{{providerData.comment}}" />
45
- {{else}}
46
-
47
- <button type="submit" class="ee-btn ee-btn-primary ee-btn-block ee-btn-xl">
48
- <span class="ee-icon {{providerData.publicIcon}}"></span> {{providerData.comment}}
49
- </button>
50
- {{/if}}
51
-
52
- </form>
53
- </div>
27
+ {{> provider_signin_button app=this title=title crumb=../crumb data=../values.data sig=../values.sig}}
54
28
  {{/each}}
55
29
 
56
30
  {{/if}}
@@ -0,0 +1,58 @@
1
+ {{!-- Hosted authentication form, IMAP path: autodiscovery recognized a Microsoft or Google mailbox
2
+ and at least one OAuth2 application can sign it in. Each application button starts its OAuth2 flow
3
+ exactly as the provider picker's button would, with the typed address as the sign-in hint; the
4
+ password is not carried. "Continue with IMAP" re-submits the account details step with skipSignIn
5
+ set, which skips this page and goes on to the server settings as before. --}}
6
+
7
+ <div class="ee-center">
8
+ <h1>
9
+ {{#if isMicrosoft}}
10
+ {{_ "Sign in with your Microsoft account" templateLocale }}
11
+ {{else}}
12
+ {{_ "Sign in with your Google account" templateLocale }}
13
+ {{/if}}
14
+ </h1>
15
+ </div>
16
+
17
+ <div class="ee-provider-lead">
18
+ <p class="ee-provider-email"><strong>{{values.email}}</strong></p>
19
+ <p>
20
+ {{#if isMicrosoft}}
21
+ {{_ "This appears to be a Microsoft mailbox. Sign in with Microsoft to connect it. Password sign-in over IMAP is no longer supported." templateLocale }}
22
+ {{else}}
23
+ {{_ "This appears to be a Google account. Sign in with Google to connect it." templateLocale }}
24
+ {{/if}}
25
+ </p>
26
+ </div>
27
+
28
+ <div class="ee-providers">
29
+ {{#each apps}}
30
+ {{> provider_signin_button app=this title=displayTitle crumb=../crumb data=../values.data sig=../values.sig loginHint=../values.email}}
31
+ {{/each}}
32
+ </div>
33
+
34
+ <form method="post" action="/accounts/new/imap" class="ee-provider-alt">
35
+ <input type="hidden" name="crumb" value="{{crumb}}">
36
+ <input type="hidden" name="data" value="{{values.data}}">
37
+ <input type="hidden" name="sig" value="{{values.sig}}">
38
+ <input type="hidden" name="name" value="{{values.name}}">
39
+ <input type="hidden" name="email" value="{{values.email}}">
40
+ <input type="hidden" name="password" value="{{values.password}}">
41
+ <input type="hidden" name="skipSignIn" value="1">
42
+
43
+ <button type="submit" class="ee-btn ee-btn-soft ee-btn-primary ee-btn-sm">
44
+ <span class="ee-icon ee-icon-mail"></span>
45
+ {{#if isMicrosoft}}
46
+ {{_ "Use IMAP with a password" templateLocale }}
47
+ {{else}}
48
+ {{_ "Use IMAP with an app password" templateLocale }}
49
+ {{/if}}
50
+ </button>
51
+ <span class="ee-hint">
52
+ {{#if isMicrosoft}}
53
+ {{_ "Choose this option only if your mailbox is hosted by another provider." templateLocale }}
54
+ {{else}}
55
+ {{_ "This option requires a Google app password. Your regular password will not work." templateLocale }}
56
+ {{/if}}
57
+ </span>
58
+ </form>
@@ -7,7 +7,7 @@ permissions; offers a link to restart the consent flow. --}}
7
7
 
8
8
  <div class="ee-alert ee-alert-error">
9
9
  <span class="ee-icon ee-icon-alert-triangle ee-icon-lg"></span>
10
- <span>{{_ "All requested permissions are required for this service to function properly. Some required permissions were not granted during sign-in." templateLocale}}</span>
10
+ <span>{{_ "Some permissions were not granted during sign-in. This service needs all the requested permissions to work." templateLocale}}</span>
11
11
  </div>
12
12
 
13
13
  {{#if missingScopesList}}
@@ -0,0 +1,30 @@
1
+ {{!-- One OAuth2 application's sign-in button on the hosted setup form, shared by the provider
2
+ picker (accounts/register/index) and the sign-in page on the IMAP path
3
+ (accounts/register/provider-signin). Posts the signed data/sig blob back to /accounts/new with the
4
+ application as the type. Parameters: app, title (shown above the button when set), crumb, data,
5
+ sig, and optionally loginHint (the address to prefill on the provider's sign-in form). The
6
+ ee-provider-titled hover highlight ties a title and its button visually together. --}}
7
+ <div class="ee-provider{{#if title}} ee-provider-titled{{/if}}">
8
+
9
+ {{#if title}}
10
+ <h5 class="ee-provider-title">{{title}}</h5>
11
+ {{/if}}
12
+
13
+ <form method="post" action="/accounts/new">
14
+ <input type="hidden" name="crumb" value="{{crumb}}">
15
+ <input type="hidden" name="type" value="{{app.id}}">
16
+ <input type="hidden" name="data" value="{{data}}">
17
+ <input type="hidden" name="sig" value="{{sig}}">
18
+ {{#if loginHint}}
19
+ <input type="hidden" name="loginHint" value="{{loginHint}}">
20
+ {{/if}}
21
+
22
+ {{#if app.providerData.linkImage}}
23
+ <input type="image" src="{{app.providerData.linkImage}}" class="ee-provider-image" alt="{{app.providerData.comment}}" />
24
+ {{else}}
25
+ <button type="submit" class="ee-btn ee-btn-primary ee-btn-block ee-btn-xl">
26
+ <span class="ee-icon {{app.providerData.publicIcon}}"></span> {{app.providerData.comment}}
27
+ </button>
28
+ {{/if}}
29
+ </form>
30
+ </div>
@@ -46,7 +46,7 @@
46
46
  </div>
47
47
 
48
48
  <div class="mt-4 flex flex-wrap items-center gap-x-6 gap-y-1 text-sm text-base-content/60">
49
- {{#> ui/tooltip multiline=true text=(concat (ngettext "%d worker thread" "%d worker threads" concurrency.workers) " (" concurrency.workersEnv ")" (newline) (ngettext "%d job at a time each" "%d jobs at a time each" concurrency.perWorker) " (" concurrency.concurrencyEnv ")")}}
49
+ {{#> ui/tooltip multiline=true text=(concat (ngettext "%d worker thread" "%d worker threads" concurrency.workers) " (" concurrency.workersEnv ")" (newline) (ngettext "%d job at a time per worker" "%d jobs at a time per worker" concurrency.perWorker) " (" concurrency.concurrencyEnv ")")}}
50
50
  <span><span class="icon-[tabler--cpu] size-4 align-text-bottom"></span> Runs up to <strong class="text-base-content">{{concurrency.total}}</strong> at once</span>
51
51
  {{/ui/tooltip}}
52
52
 
@@ -1 +1 @@
1
- <p>{{_ 'Click <a href="%s">here</a> to continue&mldr;' templateLocale httpRedirectUrl}}</p>
1
+ <p>{{_ '<a href="%s">Continue</a>' templateLocale httpRedirectUrl}}</p>
@@ -6,22 +6,22 @@ the "subscription resumed" state. --}}
6
6
 
7
7
  <h1>{{_ "Unsubscribe" templateLocale }}</h1>
8
8
 
9
- <p>{{_ "Your email address was unsubscribed." templateLocale }}</p>
9
+ <p>{{_ "You have been unsubscribed." templateLocale }}</p>
10
10
 
11
- <p>{{_ "Was this a mistake? Click <a%s>here</a> to re-subscribe." templateLocale
11
+ <p>{{_ "Unsubscribed by mistake? <a%s>Subscribe again</a>." templateLocale
12
12
  (markup " id='resubscribe-link' href='#' class='ee-link'")}}</p>
13
13
 
14
14
  {{!-- autofocus on the dialog keeps showModal() from focusing (and drawing a
15
15
  focus ring on) the corner close button --}}
16
16
  <dialog id="resubscribeModal" class="ee-modal" aria-labelledby="resubscribeModalLabel" autofocus>
17
17
  <div class="ee-modal-header">
18
- <h3 class="ee-modal-title" id="resubscribeModalLabel">{{_ "Re-subscribe" templateLocale }}</h3>
19
- <button type="button" class="ee-modal-close" aria-label="Close" data-modal-close>
18
+ <h3 class="ee-modal-title" id="resubscribeModalLabel">{{_ "Subscribe again" templateLocale }}</h3>
19
+ <button type="button" class="ee-modal-close" aria-label="{{_ "Close" templateLocale }}" data-modal-close>
20
20
  <span class="ee-icon ee-icon-x"></span>
21
21
  </button>
22
22
  </div>
23
23
  <div class="ee-modal-body">
24
- {{_ "Are you sure you want to re-subscribe your email address <em>%s</em>?" templateLocale
24
+ {{_ "Subscribe again with <em>%s</em>?" templateLocale
25
25
  (escapeHtml values.email) }}
26
26
  </div>
27
27
  <div class="ee-modal-footer">
@@ -53,7 +53,7 @@ focus ring on) the corner close button --}}
53
53
 
54
54
  <h1>{{_ "Subscription resumed" templateLocale }}</h1>
55
55
 
56
- <p>{{_ "Your email address <em>%s</em> was re-subscribed." templateLocale (escapeHtml values.email)}}</p>
56
+ <p>{{_ "You have subscribed again with <em>%s</em>." templateLocale (escapeHtml values.email)}}</p>
57
57
 
58
58
  {{else}}
59
59