emailengine-app 2.79.7 → 2.79.9
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.
- package/.github/dependabot.yml +22 -0
- package/.github/workflows/test.yml +39 -0
- package/.release-please-manifest.json +1 -1
- package/CHANGELOG.md +37 -0
- package/DOCKER_DEPLOYMENT.md +8 -7
- package/Dockerfile +35 -11
- package/bin/emailengine.js +29 -13
- package/config/default.toml +15 -4
- package/copy-static-files.sh +23 -5
- package/data/google-crawlers.json +7 -1
- package/docker-compose.yml +12 -3
- package/install.sh +2 -0
- package/lib/account.js +26 -1
- package/lib/api-routes/account-routes.js +14 -3
- package/lib/api-routes/bull-board-routes.js +3 -2
- package/lib/api-routes/mailbox-routes.js +4 -1
- package/lib/api-routes/message-routes.js +6 -5
- package/lib/api-routes/outbox-routes.js +7 -4
- package/lib/api-routes/route-helpers.js +8 -0
- package/lib/api-routes/settings-routes.js +34 -25
- package/lib/api-routes/stats-routes.js +8 -1
- package/lib/api-routes/submit-routes.js +2 -1
- package/lib/api-routes/template-routes.js +3 -2
- package/lib/auth-token.js +73 -2
- package/lib/autodetect-imap-settings.js +33 -25
- package/lib/bounce-detect.js +45 -0
- package/lib/consts.js +13 -2
- package/lib/egress-fetch.js +133 -0
- package/lib/egress-filter.js +39 -4
- package/lib/email-client/base-client.js +274 -24
- package/lib/email-client/gmail/gmail-api.js +15 -7
- package/lib/email-client/gmail-client.js +121 -64
- package/lib/email-client/imap/mailbox.js +18 -59
- package/lib/email-client/imap-client.js +53 -29
- package/lib/email-client/notification-handler.js +11 -2
- package/lib/email-client/outlook/graph-api.js +106 -90
- package/lib/email-client/outlook-client.js +222 -106
- package/lib/export.js +35 -2
- package/lib/generate-text-preview.js +10 -5
- package/lib/handlebars-helpers.js +129 -0
- package/lib/headers-rewriter.js +1 -1
- package/lib/imap-proxy-auth.js +41 -21
- package/lib/imapproxy/imap-core/README.md +1 -0
- package/lib/imapproxy/imap-core/lib/tls-options.js +5 -46
- package/lib/imapproxy/imap-server.js +9 -10
- package/lib/llm-pre-process.js +4 -1
- package/lib/mcp/json-schema.js +50 -2
- package/lib/openapi/index.js +3 -0
- package/lib/outbox.js +50 -8
- package/lib/pre-process.js +4 -1
- package/lib/rate-limit.js +23 -4
- package/lib/rewrite-text-nodes.js +12 -1
- package/lib/schemas.js +37 -8
- package/lib/security-headers.js +396 -0
- package/lib/sentry.js +36 -4
- package/lib/settings.js +19 -1
- package/lib/smtp-auth.js +86 -7
- package/lib/sso.js +13 -3
- package/lib/submit-progress.js +29 -0
- package/lib/templates.js +11 -0
- package/lib/tools.js +361 -173
- package/lib/ui-routes/account-routes.js +73 -13
- package/lib/ui-routes/admin-config-routes.js +7 -21
- package/lib/ui-routes/admin-entities-routes.js +42 -12
- package/lib/ui-routes/auth-routes.js +87 -28
- package/lib/ui-routes/dashboard-routes.js +1 -1
- package/lib/ui-routes/export-routes.js +4 -0
- package/lib/ui-routes/internals-routes.js +2 -0
- package/lib/ui-routes/mcp-consent-routes.js +12 -2
- package/lib/ui-routes/network-config-routes.js +6 -5
- package/lib/ui-routes/oauth-config-routes.js +12 -1
- package/lib/ui-routes/route-helpers.js +65 -14
- package/lib/ui-routes/settings-page.js +10 -0
- package/lib/ui-routes/smtp-test-routes.js +7 -0
- package/lib/ui-routes/suppression-list-routes.js +16 -5
- package/lib/ui-routes/unsubscribe-routes.js +22 -3
- package/lib/webhook-egress.js +5 -0
- package/lib/webhooks.js +14 -2
- package/package.json +23 -26
- package/sbom.json +1 -1
- package/server.js +100 -71
- package/static/css/flyonui.css +1 -1
- package/static/js/ace/css/ace.css +1462 -0
- package/static/js/ace/css/kuroir-1.png +0 -0
- package/static/js/ace/css/kuroir-2.png +0 -0
- package/static/js/ace/css/main-1.png +0 -0
- package/static/js/ace/css/main-10.svg +4 -0
- package/static/js/ace/css/main-11.svg +5 -0
- package/static/js/ace/css/main-12.svg +4 -0
- package/static/js/ace/css/main-13.png +0 -0
- package/static/js/ace/css/main-14.png +0 -0
- package/static/js/ace/css/main-15.png +0 -0
- package/static/js/ace/css/main-16.png +0 -0
- package/static/js/ace/css/main-17.png +0 -0
- package/static/js/ace/css/main-18.png +0 -0
- package/static/js/ace/css/main-19.png +0 -0
- package/static/js/ace/css/main-2.png +0 -0
- package/static/js/ace/css/main-20.png +0 -0
- package/static/js/ace/css/main-21.png +0 -0
- package/static/js/ace/css/main-22.png +0 -0
- package/static/js/ace/css/main-23.png +0 -0
- package/static/js/ace/css/main-24.png +0 -0
- package/static/js/ace/css/main-25.svg +1 -0
- package/static/js/ace/css/main-26.png +0 -0
- package/static/js/ace/css/main-3.png +0 -0
- package/static/js/ace/css/main-4.png +0 -0
- package/static/js/ace/css/main-5.svg +7 -0
- package/static/js/ace/css/main-6.svg +9 -0
- package/static/js/ace/css/main-7.svg +7 -0
- package/static/js/ace/css/main-8.svg +9 -0
- package/static/js/ace/css/main-9.svg +6 -0
- package/static/js/ace/css/theme/kuroir.css +78 -0
- package/static/js/ace/css/theme/tomorrow_night.css +128 -0
- package/static/js/ace/css/theme/tomorrow_night_eighties.css +128 -0
- package/static/js/ace/css/theme/xcode.css +106 -0
- package/static/js/ace/css/tomorrow_night-1.png +0 -0
- package/static/js/ace/css/tomorrow_night-2.png +0 -0
- package/static/js/ace/css/tomorrow_night_eighties-1.png +0 -0
- package/static/js/ace/css/tomorrow_night_eighties-2.png +0 -0
- package/static/js/ace/css/xcode-1.png +0 -0
- package/static/js/ace/css/xcode-2.png +0 -0
- package/static/js/ee-client.js +256 -102
- package/static/js/public.js +7 -0
- package/static/js/ui.js +32 -0
- package/static/licenses.html +338 -298
- package/static/vendor/simplewebauthn/browser.min.js +2 -2
- package/translations/messages.pot +158 -112
- package/views/account/passkeys.hbs +8 -0
- package/views/account/password.hbs +11 -0
- package/views/account/security.hbs +18 -7
- package/views/accounts/account.hbs +21 -38
- package/views/accounts/browse.hbs +3 -1
- package/views/accounts/edit.hbs +1 -1
- package/views/accounts/register/imap-server.hbs +11 -3
- package/views/config/ai.hbs +3 -1
- package/views/config/branding.hbs +4 -2
- package/views/config/document-store/chat.hbs +1 -1
- package/views/config/document-store/index.hbs +1 -1
- package/views/config/email-processing.hbs +2 -0
- package/views/config/imap-proxy.hbs +3 -1
- package/views/config/license.hbs +1 -1
- package/views/config/logging.hbs +3 -1
- package/views/config/mcp.hbs +3 -1
- package/views/config/network.hbs +16 -16
- package/views/config/oauth/app.hbs +4 -4
- package/views/config/security.hbs +2 -0
- package/views/config/service.hbs +3 -1
- package/views/config/smtp.hbs +3 -1
- package/views/config/webhooks.hbs +4 -2
- package/views/error.hbs +10 -2
- package/views/internals/index.hbs +1 -1
- package/views/layout/app.hbs +9 -14
- package/views/layout/login.hbs +1 -1
- package/views/layout/prompt.hbs +1 -1
- package/views/layout/public.hbs +1 -1
- package/views/legal.hbs +1 -1
- package/views/mcp/authorize.hbs +1 -1
- package/views/partials/ace_assets.hbs +13 -0
- package/views/partials/add_account_modal.hbs +1 -1
- package/views/partials/address_list.hbs +4 -4
- package/views/partials/filter_editor_js.hbs +3 -3
- package/views/partials/gateway_js.hbs +1 -1
- package/views/partials/oauth_form.hbs +6 -6
- package/views/partials/public_theme_init.hbs +1 -1
- package/views/partials/template_form.hbs +2 -2
- package/views/partials/test_send.hbs +7 -4
- package/views/partials/theme_init.hbs +1 -1
- package/views/partials/ui/details.hbs +2 -2
- package/views/partials/ui/env-managed-alert.hbs +19 -0
- package/views/partials/webhook_form.hbs +1 -1
- package/views/partials/webhooks_editor_functions.hbs +1 -1
- package/views/reference/redirect.hbs +1 -1
- package/views/templates/template.hbs +2 -2
- package/views/tokens/new.hbs +1 -1
- package/views/unsubscribe.hbs +7 -1
- package/views/webhooks/webhook.hbs +2 -2
- package/workers/api.js +179 -175
- package/workers/export.js +1 -5
- package/workers/imap.js +33 -6
- package/workers/smtp.js +19 -43
- package/workers/submit.js +31 -13
- package/workers/webhooks.js +9 -24
- package/lib/reconnection-manager.js +0 -106
- package/static/front/EmailEngine_logo_horiz.png +0 -0
- package/static/front/EmailEngine_logo_vert.png +0 -0
- package/static/front/index.html +0 -57
- package/static/front/logo.png +0 -0
- package/static/vendor/handlebars/handlebars.min-v4.7.9.js +0 -29
|
@@ -280,13 +280,18 @@
|
|
|
280
280
|
|
|
281
281
|
{{#if account.oauth2.generatedStr}}
|
|
282
282
|
<span class="local-date-time code-link" data-time="{{account.oauth2.generatedStr}}"
|
|
283
|
-
title="{{account.oauth2.generatedStr}}"></span>
|
|
283
|
+
title="{{account.oauth2.generatedStr}}"></span> -
|
|
284
284
|
{{else}}
|
|
285
285
|
To
|
|
286
286
|
{{/if}}
|
|
287
287
|
|
|
288
|
+
{{#if account.oauth2.accessTokenInvalidated}}
|
|
289
|
+
{{!-- the expiry was rewound to force a renewal, so the stored end is meaningless --}}
|
|
290
|
+
invalidated, a new token is requested on the next connection
|
|
291
|
+
{{else}}
|
|
288
292
|
<span class="local-date-time code-link" data-time="{{account.oauth2.expiresStr}}"
|
|
289
293
|
title="{{account.oauth2.expiresStr}}"></span>
|
|
294
|
+
{{/if}}
|
|
290
295
|
</dd>
|
|
291
296
|
{{/if}}
|
|
292
297
|
|
|
@@ -946,7 +951,7 @@ submitLabel="Delete account"}}
|
|
|
946
951
|
{{!-- no #crumb input: the layout already renders the element the script reads --}}
|
|
947
952
|
<input type="hidden" id="account-id" value="{{account.account}}">
|
|
948
953
|
|
|
949
|
-
<script>
|
|
954
|
+
<script nonce="{{cspNonce}}">
|
|
950
955
|
document.addEventListener('DOMContentLoaded', () => {
|
|
951
956
|
|
|
952
957
|
const reconnectAccount = async () => {
|
|
@@ -1340,11 +1345,14 @@ submitLabel="Delete account"}}
|
|
|
1340
1345
|
const account = document.getElementById('account-id').value.trim();
|
|
1341
1346
|
|
|
1342
1347
|
try {
|
|
1343
|
-
|
|
1348
|
+
// the crumb travels in the header: the route validates DELETE in restful mode
|
|
1349
|
+
const res = await fetch(`/admin/accounts/${account}/export/${currentExportId}`, {
|
|
1344
1350
|
method: 'DELETE',
|
|
1345
|
-
headers: { '
|
|
1346
|
-
body: JSON.stringify({ crumb: document.getElementById('crumb').value })
|
|
1351
|
+
headers: { 'X-CSRF-Token': document.getElementById('crumb').value }
|
|
1347
1352
|
});
|
|
1353
|
+
if (!res.ok) {
|
|
1354
|
+
throw new Error(`HTTP ${res.status}`);
|
|
1355
|
+
}
|
|
1348
1356
|
|
|
1349
1357
|
stopPolling();
|
|
1350
1358
|
currentExportId = null;
|
|
@@ -1357,39 +1365,8 @@ submitLabel="Delete account"}}
|
|
|
1357
1365
|
});
|
|
1358
1366
|
</script>
|
|
1359
1367
|
|
|
1360
|
-
<script
|
|
1361
|
-
|
|
1362
|
-
<script>
|
|
1368
|
+
<script nonce="{{cspNonce}}">
|
|
1363
1369
|
document.addEventListener('DOMContentLoaded', () => {
|
|
1364
|
-
Handlebars.registerHelper('equals', function (compareVal, baseVal, options) {
|
|
1365
|
-
if (baseVal == compareVal) {
|
|
1366
|
-
return options.fn(this);
|
|
1367
|
-
}
|
|
1368
|
-
return options.inverse(this);
|
|
1369
|
-
});
|
|
1370
|
-
|
|
1371
|
-
Handlebars.registerHelper('inc', function (nr, inc, options) {
|
|
1372
|
-
return Number(nr) + Number(inc);
|
|
1373
|
-
});
|
|
1374
|
-
|
|
1375
|
-
// status -> FlyonUI color/icon maps for the delivery-test results template
|
|
1376
|
-
const STATUS_COLORS = { pass: 'success', softfail: 'warning', fail: 'error', permerror: 'info', temperror: 'info' };
|
|
1377
|
-
Handlebars.registerHelper('statusColor', result => STATUS_COLORS[result] || 'neutral');
|
|
1378
|
-
|
|
1379
|
-
Handlebars.registerHelper('statusIcon', result => {
|
|
1380
|
-
switch (result) {
|
|
1381
|
-
case 'pass':
|
|
1382
|
-
return 'icon-[tabler--circle-check]';
|
|
1383
|
-
case 'neutral':
|
|
1384
|
-
case 'none':
|
|
1385
|
-
return 'icon-[tabler--circle-off]';
|
|
1386
|
-
default:
|
|
1387
|
-
return 'icon-[tabler--alert-triangle]';
|
|
1388
|
-
}
|
|
1389
|
-
});
|
|
1390
|
-
|
|
1391
|
-
const testSendTemplate = Handlebars.compile(document.getElementById('test-send-template').innerHTML);
|
|
1392
|
-
|
|
1393
1370
|
let aborted = false;
|
|
1394
1371
|
|
|
1395
1372
|
const createSmtpTestAccount = async (account, gateway) => {
|
|
@@ -1449,6 +1426,11 @@ submitLabel="Delete account"}}
|
|
|
1449
1426
|
uiModal.open('#testSendModal');
|
|
1450
1427
|
|
|
1451
1428
|
createSmtpTestAccount(testData.account, testData.gateway).then((result) => {
|
|
1429
|
+
if (result.error) {
|
|
1430
|
+
// the route answers 200 with { error } when the account could not be loaded or
|
|
1431
|
+
// the probe could not be queued - polling with no user would only report "Not Found"
|
|
1432
|
+
throw new Error(result.error);
|
|
1433
|
+
}
|
|
1452
1434
|
return waitForTestResults(result.user);
|
|
1453
1435
|
}).then(results => {
|
|
1454
1436
|
document.getElementById('test-send-pending-message').classList.add('hidden');
|
|
@@ -1457,7 +1439,8 @@ submitLabel="Delete account"}}
|
|
|
1457
1439
|
return false
|
|
1458
1440
|
}
|
|
1459
1441
|
document.getElementById('test-send-results').classList.remove('hidden');
|
|
1460
|
-
|
|
1442
|
+
// rendered server-side by /admin/smtp/check-test from views/partials/test_send.hbs
|
|
1443
|
+
document.getElementById('test-send-results').innerHTML = results.html;
|
|
1461
1444
|
}).catch(err => {
|
|
1462
1445
|
if (aborted) {
|
|
1463
1446
|
return false
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
</div>
|
|
27
27
|
{{/ui/modal}}
|
|
28
28
|
|
|
29
|
-
<script type="module">
|
|
29
|
+
<script type="module" nonce="{{cspNonce}}">
|
|
30
30
|
import { EmailEngineClient } from '/static/js/ee-client.js';
|
|
31
31
|
|
|
32
32
|
// Create client with UI container. The embed follows the admin theme -
|
|
@@ -36,6 +36,8 @@
|
|
|
36
36
|
apiUrl: window.location.origin,
|
|
37
37
|
account: '{{account}}',
|
|
38
38
|
accessToken: '{{sessionToken}}',
|
|
39
|
+
// the widget appends its own stylesheet element; the admin policy accepts it with this nonce
|
|
40
|
+
styleNonce: '{{cspNonce}}',
|
|
39
41
|
container: document.getElementById('email-client'),
|
|
40
42
|
darkMode: uiEffectiveTheme() === 'dark',
|
|
41
43
|
showDarkModeToggle: false,
|
package/views/accounts/edit.hbs
CHANGED
|
@@ -140,7 +140,7 @@
|
|
|
140
140
|
|
|
141
141
|
<input type="hidden" id="availablePaths" value="{{availablePaths}}">
|
|
142
142
|
|
|
143
|
-
<script>
|
|
143
|
+
<script nonce="{{cspNonce}}">
|
|
144
144
|
document.addEventListener('DOMContentLoaded', () => {
|
|
145
145
|
let availablePaths = JSON.parse(document.getElementById('availablePaths').value);
|
|
146
146
|
// native datalist suggestions for the Sent Mail folder input (the
|
|
@@ -17,6 +17,14 @@ dropdown allows skipping the test. --}}
|
|
|
17
17
|
|
|
18
18
|
<input type="hidden" id="tz" name="tz" value="{{values.tz}}">
|
|
19
19
|
|
|
20
|
+
{{#if autodetectFailed}}
|
|
21
|
+
<div class="ee-alert ee-alert-info">
|
|
22
|
+
<span class="ee-icon ee-icon-alert-circle"></span>
|
|
23
|
+
<span>{{_ "Server settings could not be detected automatically for %s. Enter them below." templateLocale
|
|
24
|
+
(escapeHtml autodetectDomain) }}</span>
|
|
25
|
+
</div>
|
|
26
|
+
{{/if}}
|
|
27
|
+
|
|
20
28
|
<div class="ee-form-grid">
|
|
21
29
|
<div class="ee-form-col">
|
|
22
30
|
<h6>{{_ "IMAP" templateLocale }}</h6>
|
|
@@ -282,7 +290,7 @@ focus ring on) the corner close button --}}
|
|
|
282
290
|
|
|
283
291
|
<input type="hidden" id="autoTest" value="{{#if autoTest}}true{{/if}}">
|
|
284
292
|
|
|
285
|
-
<script>
|
|
293
|
+
<script nonce="{{cspNonce}}">
|
|
286
294
|
document.addEventListener('DOMContentLoaded', () => {
|
|
287
295
|
|
|
288
296
|
let formTested = false;
|
|
@@ -548,8 +556,8 @@ focus ring on) the corner close button --}}
|
|
|
548
556
|
// enable TLS checkbox
|
|
549
557
|
document.getElementById(`${proto}_secure`).checked = true;
|
|
550
558
|
}
|
|
551
|
-
if (portNr ===
|
|
552
|
-
//
|
|
559
|
+
if (portNr === 143) {
|
|
560
|
+
// plaintext IMAP port (STARTTLS), so clear the TLS checkbox
|
|
553
561
|
document.getElementById(`${proto}_secure`).checked = false;
|
|
554
562
|
}
|
|
555
563
|
break;
|
package/views/config/ai.hbs
CHANGED
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
content to OpenAI and adds the AI response to your webhooks.
|
|
5
5
|
</p>
|
|
6
6
|
|
|
7
|
+
{{> ui/env-managed-alert}}
|
|
8
|
+
|
|
7
9
|
<form method="post" id="settings-form" action="/admin/config/ai">
|
|
8
10
|
{{!-- no id: the layout already renders the #crumb element the script reads --}}
|
|
9
11
|
<input type="hidden" name="crumb" value="{{crumb}}" />
|
|
@@ -309,7 +311,7 @@ defaultTestPayload='{"account":"test","path":"INBOX","subject":"test email"}'}}
|
|
|
309
311
|
|
|
310
312
|
<input type="hidden" id="defaultPromptJson" value="{{defaultPromptJson}}">
|
|
311
313
|
|
|
312
|
-
<script>
|
|
314
|
+
<script nonce="{{cspNonce}}">
|
|
313
315
|
document.addEventListener('DOMContentLoaded', () => {
|
|
314
316
|
|
|
315
317
|
const editorPrompt = uiAceEditor("editor-prompt", "markdown", document.getElementById('openAiPromptElement').value, {
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
<p class="mb-6">Customize public pages like authentication forms, error pages, and unsubscribe pages.</p>
|
|
4
4
|
|
|
5
|
+
{{> ui/env-managed-alert}}
|
|
6
|
+
|
|
5
7
|
<form method="post" id="settings-form" action="/admin/config/branding">
|
|
6
8
|
{{!-- no id: the layout already renders the #crumb element the script reads --}}
|
|
7
9
|
<input type="hidden" name="crumb" value="{{crumb}}" />
|
|
@@ -76,10 +78,10 @@
|
|
|
76
78
|
</form>
|
|
77
79
|
|
|
78
80
|
|
|
79
|
-
|
|
81
|
+
{{> ace_assets}}
|
|
80
82
|
<script src="/static/js/ace/ext-language_tools.js"></script>
|
|
81
83
|
|
|
82
|
-
<script>
|
|
84
|
+
<script nonce="{{cspNonce}}">
|
|
83
85
|
document.addEventListener('DOMContentLoaded', () => {
|
|
84
86
|
|
|
85
87
|
const editors = new Map();
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
<p class="mb-6">Control how EmailEngine delivers, indexes, and tracks email messages.</p>
|
|
4
4
|
|
|
5
|
+
{{> ui/env-managed-alert}}
|
|
6
|
+
|
|
5
7
|
<form method="post" action="/admin/config/email-processing">
|
|
6
8
|
{{!-- no id: the layout already renders the #crumb element the script reads --}}
|
|
7
9
|
<input type="hidden" name="crumb" value="{{crumb}}" />
|
|
@@ -15,6 +15,8 @@
|
|
|
15
15
|
|
|
16
16
|
<p class="mb-6">Configure your IMAP proxy server below.</p>
|
|
17
17
|
|
|
18
|
+
{{> ui/env-managed-alert}}
|
|
19
|
+
|
|
18
20
|
<form method="post" action="/admin/config/imap-proxy">
|
|
19
21
|
{{!-- no id: the layout already renders the #crumb element the script reads --}}
|
|
20
22
|
<input type="hidden" name="crumb" value="{{crumb}}" />
|
|
@@ -138,7 +140,7 @@
|
|
|
138
140
|
|
|
139
141
|
<input type="hidden" id="availableAddresses" value="{{availableAddresses}}">
|
|
140
142
|
|
|
141
|
-
<script>
|
|
143
|
+
<script nonce="{{cspNonce}}">
|
|
142
144
|
document.addEventListener('DOMContentLoaded', () => {
|
|
143
145
|
|
|
144
146
|
let availableAddresses = document.getElementById('availableAddresses').value.split(',').map(e => e.trim()).filter(e => e);
|
package/views/config/license.hbs
CHANGED
|
@@ -122,7 +122,7 @@ submitLabel="Remove License"}}
|
|
|
122
122
|
Remove the current license key from this EmailEngine instance?
|
|
123
123
|
{{/ui/confirm-modal}}
|
|
124
124
|
|
|
125
|
-
<script>
|
|
125
|
+
<script nonce="{{cspNonce}}">
|
|
126
126
|
document.addEventListener('DOMContentLoaded', () => {
|
|
127
127
|
let licenseTextElm = document.getElementById('licenseTextElement')
|
|
128
128
|
let fileSelectElm = document.getElementById('licenseFile');
|
package/views/config/logging.hbs
CHANGED
|
@@ -5,6 +5,8 @@
|
|
|
5
5
|
activity (credentials and message content are never logged). Download logs anytime for troubleshooting.
|
|
6
6
|
</p>
|
|
7
7
|
|
|
8
|
+
{{> ui/env-managed-alert}}
|
|
9
|
+
|
|
8
10
|
<form method="post" action="/admin/config/logging">
|
|
9
11
|
{{!-- no id: the layout already renders the #crumb element scripts read --}}
|
|
10
12
|
<input type="hidden" name="crumb" value="{{crumb}}" />
|
|
@@ -14,7 +16,7 @@
|
|
|
14
16
|
{{> ui/setting-ref name="logs.all"}}
|
|
15
17
|
{{> ui/checkbox id="settingsLogsAll" name="all" label="Enable Logging for All Accounts"
|
|
16
18
|
checked=values.all error=errors.all}}
|
|
17
|
-
<span class="helper-text">Turn on logging for every connected account. Use with caution
|
|
19
|
+
<span class="helper-text">Turn on logging for every connected account. Use with caution, this can impact
|
|
18
20
|
performance with many accounts.<br>
|
|
19
21
|
<strong>Restart required</strong> after changing this setting.</span>
|
|
20
22
|
</div>
|
package/views/config/mcp.hbs
CHANGED
|
@@ -33,6 +33,8 @@
|
|
|
33
33
|
|
|
34
34
|
<div id="mcp-settings" role="tabpanel" aria-labelledby="mcp-settings-tab">
|
|
35
35
|
|
|
36
|
+
{{> ui/env-managed-alert}}
|
|
37
|
+
|
|
36
38
|
<form method="post" action="/admin/config/mcp">
|
|
37
39
|
{{!-- no id: the layout already renders the #crumb element scripts read --}}
|
|
38
40
|
<input type="hidden" name="crumb" value="{{crumb}}" />
|
|
@@ -289,7 +291,7 @@
|
|
|
289
291
|
|
|
290
292
|
</div>
|
|
291
293
|
|
|
292
|
-
<script>
|
|
294
|
+
<script nonce="{{cspNonce}}">
|
|
293
295
|
(() => {
|
|
294
296
|
let container = document.getElementById('mcpTokenGen');
|
|
295
297
|
let presets = JSON.parse(container.dataset.presets || '{}');
|
package/views/config/network.hbs
CHANGED
|
@@ -2,18 +2,22 @@
|
|
|
2
2
|
|
|
3
3
|
<p class="mb-6">Control how EmailEngine connects to email servers and routes traffic.</p>
|
|
4
4
|
|
|
5
|
+
{{> ui/env-managed-alert}}
|
|
6
|
+
|
|
5
7
|
<form method="post" action="/admin/config/network">
|
|
6
8
|
{{!-- no id: the layout already renders the #crumb element the script reads --}}
|
|
7
9
|
<input type="hidden" name="crumb" value="{{crumb}}" />
|
|
8
10
|
|
|
9
11
|
{{#> ui/card title="Proxy Settings" bodyClass="space-y-4"}}
|
|
10
|
-
<p>Route all
|
|
12
|
+
<p>Route all outbound connections through a proxy: IMAP and SMTP sessions, Gmail API and Microsoft
|
|
13
|
+
Graph requests, OAuth2 token exchange, webhook delivery, and EmailEngine's own requests such as
|
|
14
|
+
license validation. Supports HTTP CONNECT, SOCKS4, and SOCKS5.</p>
|
|
11
15
|
|
|
12
16
|
<div>
|
|
13
17
|
{{> ui/setting-ref name="proxyEnabled"}}
|
|
14
18
|
{{> ui/checkbox id="proxy_enabled" name="proxyEnabled" label="Enable Global Proxy" class="proxy-status"
|
|
15
19
|
checked=values.proxyEnabled error=errors.proxyEnabled
|
|
16
|
-
hint="Routes all connections through the proxy below. Individual accounts can override
|
|
20
|
+
hint="Routes all outbound connections through the proxy below. Individual accounts can override it for their IMAP and SMTP connections."}}
|
|
17
21
|
</div>
|
|
18
22
|
|
|
19
23
|
<div>
|
|
@@ -41,14 +45,15 @@
|
|
|
41
45
|
{{/ui/card}}
|
|
42
46
|
|
|
43
47
|
{{#> ui/card title="HTTP Proxy Settings" bodyClass="space-y-4"}}
|
|
44
|
-
<p>
|
|
45
|
-
|
|
48
|
+
<p>Optional. Use a different proxy for HTTP/HTTPS requests only: webhook delivery, OAuth2 token exchange,
|
|
49
|
+
Gmail API and Microsoft Graph calls, and license validation. When disabled, these requests use the
|
|
50
|
+
global proxy above.</p>
|
|
46
51
|
|
|
47
52
|
<div>
|
|
48
53
|
{{> ui/setting-ref name="httpProxyEnabled"}}
|
|
49
54
|
{{> ui/checkbox id="http_proxy_enabled" name="httpProxyEnabled" label="Enable HTTP Proxy"
|
|
50
55
|
class="http-proxy-status" checked=values.httpProxyEnabled error=errors.httpProxyEnabled
|
|
51
|
-
hint="Routes
|
|
56
|
+
hint="Routes outbound HTTP/HTTPS requests through the proxy below instead of the global proxy."}}
|
|
52
57
|
</div>
|
|
53
58
|
|
|
54
59
|
<div>
|
|
@@ -179,11 +184,7 @@ Remove this IP from the list? It will be re-added if found during the next scan.
|
|
|
179
184
|
{{/ui/confirm-modal}}
|
|
180
185
|
|
|
181
186
|
|
|
182
|
-
<script
|
|
183
|
-
{{{addressListTemplate}}}
|
|
184
|
-
</script>
|
|
185
|
-
|
|
186
|
-
<script>
|
|
187
|
+
<script nonce="{{cspNonce}}">
|
|
187
188
|
document.addEventListener('DOMContentLoaded', () => {
|
|
188
189
|
let reloadBtn = document.getElementById('reload-btn');
|
|
189
190
|
|
|
@@ -221,10 +222,9 @@ Remove this IP from the list? It will be re-added if found during the next scan.
|
|
|
221
222
|
|
|
222
223
|
checkCheckboxes()
|
|
223
224
|
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
let html = addressListTemplate(data);
|
|
225
|
+
let redrawAddressList = html => {
|
|
226
|
+
// rendered server-side by /admin/config/network/reload from the same
|
|
227
|
+
// address_list partial as the initial page
|
|
228
228
|
document.getElementById('address-list').innerHTML = html;
|
|
229
229
|
|
|
230
230
|
for (let elm of document.querySelectorAll('#address-list .checkbox-entry')) {
|
|
@@ -248,8 +248,8 @@ Remove this IP from the list? It will be re-added if found during the next scan.
|
|
|
248
248
|
return;
|
|
249
249
|
}
|
|
250
250
|
|
|
251
|
-
if (data.
|
|
252
|
-
redrawAddressList(data);
|
|
251
|
+
if (data.html) {
|
|
252
|
+
redrawAddressList(data.html);
|
|
253
253
|
}
|
|
254
254
|
|
|
255
255
|
}).catch(err => {
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
|
|
89
89
|
{{#if app.cloudData}}
|
|
90
90
|
<dt>Cloud environment</dt>
|
|
91
|
-
<dd>{{app.cloudData.name}} <em
|
|
91
|
+
<dd>{{app.cloudData.name}} <em>-
|
|
92
92
|
{{app.cloudData.description}}</em></dd>
|
|
93
93
|
{{/if}}
|
|
94
94
|
|
|
@@ -170,7 +170,7 @@
|
|
|
170
170
|
{{#if app.pubSubAppData}}
|
|
171
171
|
<a href="/admin/config/oauth/app/{{app.pubSubAppData.id}}"
|
|
172
172
|
class="link link-animated">{{app.pubSubAppData.name}}{{#if
|
|
173
|
-
app.pubSubAppData.description}}
|
|
173
|
+
app.pubSubAppData.description}} - <em>{{app.pubSubAppData.description}}</em>{{/if}}</a>
|
|
174
174
|
{{else}}
|
|
175
175
|
<em>App set but not found</em>
|
|
176
176
|
{{/if}}
|
|
@@ -355,7 +355,7 @@ fieldName="app" fieldValue=app.id submitLabel="Delete app" submitIcon="icon-[tab
|
|
|
355
355
|
</form>
|
|
356
356
|
{{/ui/modal}}
|
|
357
357
|
|
|
358
|
-
<script>
|
|
358
|
+
<script nonce="{{cspNonce}}">
|
|
359
359
|
document.addEventListener('DOMContentLoaded', () => {
|
|
360
360
|
document.getElementById('addServiceAccountModal').addEventListener('open.overlay', () => {
|
|
361
361
|
document.getElementById('service-account-name').focus();
|
|
@@ -364,7 +364,7 @@ fieldName="app" fieldValue=app.id submitLabel="Delete app" submitIcon="icon-[tab
|
|
|
364
364
|
</script>
|
|
365
365
|
{{/if}}
|
|
366
366
|
|
|
367
|
-
<script>
|
|
367
|
+
<script nonce="{{cspNonce}}">
|
|
368
368
|
document.addEventListener('DOMContentLoaded', () => {
|
|
369
369
|
const appId = "{{app.id}}";
|
|
370
370
|
const stepsElm = document.getElementById('verify-steps');
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
<p class="mb-6">Control API authentication, secrets, and connection security for this EmailEngine instance.</p>
|
|
4
4
|
|
|
5
|
+
{{> ui/env-managed-alert}}
|
|
6
|
+
|
|
5
7
|
<form method="post" action="/admin/config/security">
|
|
6
8
|
{{!-- no id: the layout already renders the #crumb element the script reads --}}
|
|
7
9
|
<input type="hidden" name="crumb" value="{{crumb}}" />
|
package/views/config/service.hbs
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
<p class="mb-6">Configure core settings for your EmailEngine instance.</p>
|
|
4
4
|
|
|
5
|
+
{{> ui/env-managed-alert}}
|
|
6
|
+
|
|
5
7
|
<form method="post" action="/admin/config/service">
|
|
6
8
|
{{!-- no id: the layout already renders the #crumb element the script reads --}}
|
|
7
9
|
<input type="hidden" name="crumb" value="{{crumb}}" />
|
|
@@ -121,7 +123,7 @@
|
|
|
121
123
|
|
|
122
124
|
</form>
|
|
123
125
|
|
|
124
|
-
<script>
|
|
126
|
+
<script nonce="{{cspNonce}}">
|
|
125
127
|
document.addEventListener('DOMContentLoaded', () => {
|
|
126
128
|
|
|
127
129
|
const sendCleanPayload = async () => {
|
package/views/config/smtp.hbs
CHANGED
|
@@ -9,6 +9,8 @@
|
|
|
9
9
|
interface supports legacy systems that require traditional email sending.</p>
|
|
10
10
|
<p class="mb-6">Configure your SMTP server settings below.</p>
|
|
11
11
|
|
|
12
|
+
{{> ui/env-managed-alert}}
|
|
13
|
+
|
|
12
14
|
<form method="post" action="/admin/config/smtp">
|
|
13
15
|
{{!-- no id: the layout already renders the #crumb element the script reads --}}
|
|
14
16
|
<input type="hidden" name="crumb" value="{{crumb}}" />
|
|
@@ -142,7 +144,7 @@
|
|
|
142
144
|
|
|
143
145
|
<input type="hidden" id="availableAddresses" value="{{availableAddresses}}">
|
|
144
146
|
|
|
145
|
-
<script>
|
|
147
|
+
<script nonce="{{cspNonce}}">
|
|
146
148
|
document.addEventListener('DOMContentLoaded', () => {
|
|
147
149
|
|
|
148
150
|
let availableAddresses = document.getElementById('availableAddresses').value.split(',').map(e => e.trim()).filter(e => e);
|
|
@@ -27,6 +27,8 @@ class="mb-1"}}
|
|
|
27
27
|
{{/if}}
|
|
28
28
|
{{/if}}
|
|
29
29
|
|
|
30
|
+
{{> ui/env-managed-alert}}
|
|
31
|
+
|
|
30
32
|
<form method="post" id="settings-form" action="/admin/config/webhooks">
|
|
31
33
|
{{!-- no id: the layout already renders the #crumb element the script reads --}}
|
|
32
34
|
<input type="hidden" name="crumb" value="{{crumb}}" />
|
|
@@ -264,10 +266,10 @@ class="mb-1"}}
|
|
|
264
266
|
|
|
265
267
|
</form>
|
|
266
268
|
|
|
267
|
-
|
|
269
|
+
{{> ace_assets}}
|
|
268
270
|
<script src="/static/js/ace/ext-language_tools.js"></script>
|
|
269
271
|
|
|
270
|
-
<script>
|
|
272
|
+
<script nonce="{{cspNonce}}">
|
|
271
273
|
document.addEventListener('DOMContentLoaded', () => {
|
|
272
274
|
|
|
273
275
|
const sendTestPayload = async () => {
|
package/views/error.hbs
CHANGED
|
@@ -14,12 +14,20 @@ pages, blocked access, failed form submissions without a friendlier page). --}}
|
|
|
14
14
|
</div>
|
|
15
15
|
{{/if}}
|
|
16
16
|
<div class="ee-form-actions">
|
|
17
|
-
|
|
17
|
+
{{!-- A button rather than a javascript: link: the Content-Security-Policy on the admin
|
|
18
|
+
surface allows no javascript: URLs; static/js/public.js wires data-ee-back --}}
|
|
19
|
+
<button type="button" data-ee-back class="ee-btn ee-btn-neutral ee-btn-soft ee-btn-sm">
|
|
18
20
|
<span class="ee-icon ee-icon-arrow-left"></span> {{_ "Go back" templateLocale}}
|
|
19
|
-
</
|
|
21
|
+
</button>
|
|
22
|
+
{{!-- The dashboard is an admin destination. A mailbox owner on the hosted form or a
|
|
23
|
+
list recipient on an unsubscribe link has no business there, so the button only
|
|
24
|
+
shows for a requester who holds an admin session, or on an instance that has no
|
|
25
|
+
admin login at all (showDashboardLink, set by the view context in workers/api.js). --}}
|
|
26
|
+
{{#if showDashboardLink}}
|
|
20
27
|
<a href="/admin" class="ee-btn ee-btn-primary ee-btn-sm">
|
|
21
28
|
<span class="ee-icon ee-icon-home"></span> {{_ "Dashboard" templateLocale}}
|
|
22
29
|
</a>
|
|
30
|
+
{{/if}}
|
|
23
31
|
</div>
|
|
24
32
|
</div>
|
|
25
33
|
<div class="ee-error-card-icon">
|
|
@@ -163,7 +163,7 @@ submitLabel="Download Snapshot" submitVariant="info"}}
|
|
|
163
163
|
Generate a memory snapshot for debugging? This may briefly affect thread performance.
|
|
164
164
|
{{/ui/confirm-modal}}
|
|
165
165
|
|
|
166
|
-
<script>
|
|
166
|
+
<script nonce="{{cspNonce}}">
|
|
167
167
|
document.addEventListener('DOMContentLoaded', () => {
|
|
168
168
|
for (let elm of document.querySelectorAll('.kill-thread-btn')) {
|
|
169
169
|
elm.addEventListener('click', e => {
|
package/views/layout/app.hbs
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
<meta name="description" content="EmailEngine Application page; The Ultimate Email API for Developers" />
|
|
10
10
|
<meta name="author" content="Postal Systems OÜ">
|
|
11
11
|
|
|
12
|
-
<title>{{#if pageTitleFull}}{{pageTitleFull}}{{else}}{{pageBrandName}}{{#if pageTitle}}
|
|
12
|
+
<title>{{#if pageTitleFull}}{{pageTitleFull}}{{else}}{{pageBrandName}}{{#if pageTitle}} -
|
|
13
13
|
{{pageTitle}}{{/if}}{{/if}}</title>
|
|
14
14
|
|
|
15
15
|
{{> head_assets}}
|
|
@@ -53,7 +53,10 @@
|
|
|
53
53
|
|
|
54
54
|
<!-- Topbar -->
|
|
55
55
|
<header class="bg-base-100 border-base-content/20 sticky top-0 z-30 border-b">
|
|
56
|
-
|
|
56
|
+
{{!-- flex-wrap: on phones the search form drops to a full-width second row (see its
|
|
57
|
+
max-sm classes) instead of disappearing, so the account search and the state
|
|
58
|
+
filter stay reachable without a redesign of the bar --}}
|
|
59
|
+
<nav class="navbar flex flex-wrap items-center gap-2 px-6 py-2">
|
|
57
60
|
|
|
58
61
|
<button type="button" class="btn btn-text btn-circle btn-sm lg:hidden" aria-haspopup="dialog"
|
|
59
62
|
aria-expanded="false" aria-controls="layout-sidebar" data-overlay="#layout-sidebar"
|
|
@@ -63,7 +66,7 @@
|
|
|
63
66
|
|
|
64
67
|
{{#if searchTarget}}
|
|
65
68
|
<!-- Topbar search -->
|
|
66
|
-
<form class="
|
|
69
|
+
<form class="flex items-center gap-2 grow max-w-xl max-sm:order-last max-sm:w-full max-sm:max-w-none" method="get" action="{{searchTarget}}">
|
|
67
70
|
|
|
68
71
|
{{#if stateOptions}}
|
|
69
72
|
<div class="dropdown relative inline-flex shrink-0">
|
|
@@ -140,13 +143,7 @@
|
|
|
140
143
|
<span class="bg-{{eeColor level}}/10 text-{{eeColor level}} flex size-8 shrink-0 items-center justify-center rounded-field">
|
|
141
144
|
<span class="{{icon}} size-4 shrink-0"></span>
|
|
142
145
|
</span>
|
|
143
|
-
<span class="text-sm whitespace-normal">
|
|
144
|
-
{{#if verbatim}}
|
|
145
|
-
{{{message}}}
|
|
146
|
-
{{else}}
|
|
147
|
-
{{message}}
|
|
148
|
-
{{/if}}
|
|
149
|
-
</span>
|
|
146
|
+
<span class="text-sm whitespace-normal">{{message}}</span>
|
|
150
147
|
</a>
|
|
151
148
|
</li>
|
|
152
149
|
{{/each}}
|
|
@@ -340,8 +337,6 @@
|
|
|
340
337
|
<script src="/static/js/flyonui.js"></script>
|
|
341
338
|
<script src="/static/js/ui.js"></script>
|
|
342
339
|
|
|
343
|
-
<script src="/static/vendor/handlebars/handlebars.min-v4.7.9.js"></script>
|
|
344
|
-
|
|
345
340
|
<script src="/static/js/highlight.min.js"></script>
|
|
346
341
|
|
|
347
342
|
<script src="/static/js/app.js"></script>
|
|
@@ -357,7 +352,7 @@
|
|
|
357
352
|
Provisioning a trial license, please wait <span class="loading loading-spinner loading-sm align-middle"></span>
|
|
358
353
|
</div>
|
|
359
354
|
{{/ui/modal}}
|
|
360
|
-
<script>
|
|
355
|
+
<script nonce="{{cspNonce}}">
|
|
361
356
|
document.addEventListener('DOMContentLoaded', () => {
|
|
362
357
|
let trialBtn = document.getElementById('start-trial-btn');
|
|
363
358
|
if (!trialBtn) {
|
|
@@ -397,7 +392,7 @@
|
|
|
397
392
|
|
|
398
393
|
{{#if updateBrowserInfo}}
|
|
399
394
|
<input type="hidden" id="browser-info-crumb" value="{{crumb}}" />
|
|
400
|
-
<script>
|
|
395
|
+
<script nonce="{{cspNonce}}">
|
|
401
396
|
document.addEventListener('DOMContentLoaded', () => {
|
|
402
397
|
let sendBrowserInfo = async () => {
|
|
403
398
|
let timezone = false;
|
package/views/layout/login.hbs
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
<meta name="description" content="EmailEngine Application page; The Ultimate Email API for Developers" />
|
|
10
10
|
<meta name="author" content="Postal Systems OÜ">
|
|
11
11
|
|
|
12
|
-
<title>{{#if pageTitleFull}}{{pageTitleFull}}{{else}}{{pageBrandName}}{{#if pageTitle}}
|
|
12
|
+
<title>{{#if pageTitleFull}}{{pageTitleFull}}{{else}}{{pageBrandName}}{{#if pageTitle}} -
|
|
13
13
|
{{pageTitle}}{{/if}}{{/if}}</title>
|
|
14
14
|
|
|
15
15
|
{{> head_assets}}
|
package/views/layout/prompt.hbs
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
<meta name="description" content="EmailEngine Application page; The Ultimate Email API for Developers" />
|
|
10
10
|
<meta name="author" content="Postal Systems OÜ">
|
|
11
11
|
|
|
12
|
-
<title>{{#if pageTitleFull}}{{pageTitleFull}}{{else}}{{pageBrandName}}{{#if pageTitle}}
|
|
12
|
+
<title>{{#if pageTitleFull}}{{pageTitleFull}}{{else}}{{pageBrandName}}{{#if pageTitle}} -
|
|
13
13
|
{{pageTitle}}{{/if}}{{/if}}</title>
|
|
14
14
|
|
|
15
15
|
{{> head_assets}}
|
package/views/layout/public.hbs
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
<meta name="description" content="EmailEngine Application page; The Ultimate Email API for Developers" />
|
|
10
10
|
<meta name="author" content="Postal Systems OÜ">
|
|
11
11
|
|
|
12
|
-
<title>{{#if pageTitleFull}}{{pageTitleFull}}{{else}}{{pageBrandName}}{{#if pageTitle}}
|
|
12
|
+
<title>{{#if pageTitleFull}}{{pageTitleFull}}{{else}}{{pageBrandName}}{{#if pageTitle}} -
|
|
13
13
|
{{pageTitle}}{{/if}}{{/if}}</title>
|
|
14
14
|
|
|
15
15
|
<link rel="apple-touch-icon" href="/static/favicon/apple-touch-icon.png" sizes="180x180" />
|
package/views/legal.hbs
CHANGED