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.
- package/.release-please-manifest.json +1 -1
- package/CHANGELOG.md +73 -0
- package/README.md +6 -0
- package/config/default.toml +5 -1
- package/data/google-crawlers.json +1 -1
- package/encrypt.js +43 -0
- package/lib/account/account-state.js +62 -0
- package/lib/account.js +34 -2
- package/lib/api-routes/account-routes.js +101 -1
- package/lib/api-routes/blocklist-routes.js +24 -0
- package/lib/api-routes/delivery-test-routes.js +6 -0
- package/lib/api-routes/gateway-routes.js +30 -0
- package/lib/api-routes/index.js +1 -1
- package/lib/api-routes/license-routes.js +10 -0
- package/lib/api-routes/mcp-oauth-routes.js +3 -3
- package/lib/api-routes/mcp-routes.js +39 -21
- package/lib/api-routes/oauth2-app-routes.js +38 -1
- package/lib/api-routes/outbox-routes.js +6 -0
- package/lib/api-routes/permission-map.js +208 -43
- package/lib/api-routes/pubsub-routes.js +8 -0
- package/lib/api-routes/route-helpers.js +58 -11
- package/lib/api-routes/settings-routes.js +67 -6
- package/lib/api-routes/stats-routes.js +6 -0
- package/lib/api-routes/template-routes.js +21 -0
- package/lib/api-routes/token-routes.js +34 -2
- package/lib/api-routes/webhook-route-routes.js +13 -0
- package/lib/autodetect-imap-settings.js +349 -47
- package/lib/cert-handler.js +62 -0
- package/lib/consts.js +50 -6
- package/lib/db.js +12 -0
- package/lib/egress-fetch.js +21 -9
- package/lib/email-client/base-client.js +238 -67
- package/lib/email-client/credential-errors.js +122 -0
- package/lib/email-client/gmail/gmail-api.js +2 -1
- package/lib/email-client/gmail-client.js +70 -64
- package/lib/email-client/imap/connection-errors.js +52 -0
- package/lib/email-client/imap/listing-diff.js +47 -6
- package/lib/email-client/imap/login-failure.js +52 -0
- package/lib/email-client/imap/mailbox.js +457 -379
- package/lib/email-client/imap/subconnection.js +17 -12
- package/lib/email-client/imap/sync-operations.js +46 -59
- package/lib/email-client/imap-client.js +139 -101
- package/lib/email-client/message-builder.js +11 -11
- package/lib/email-client/outlook/graph-api.js +2 -1
- package/lib/email-client/outlook-client.js +219 -106
- package/lib/enum-descriptions.js +12 -2
- package/lib/imap-proxy-auth.js +58 -3
- package/lib/imapproxy/imap-server.js +53 -62
- package/lib/lua/h-del-if-equals.lua +39 -0
- package/lib/lua/h-set-if-equals.lua +39 -0
- package/lib/mcp/oauth.js +46 -8
- package/lib/mcp/protocol.js +78 -35
- package/lib/mcp/tools.js +53 -17
- package/lib/privileged-settings.js +147 -0
- package/lib/routes-ui.js +4 -34
- package/lib/schemas.js +92 -16
- package/lib/security-headers.js +15 -0
- package/lib/settings.js +13 -0
- package/lib/tls/catalog.js +428 -0
- package/lib/tls/context.js +302 -0
- package/lib/tls/der.js +223 -0
- package/lib/tls/listeners.js +62 -0
- package/lib/tls/provision.js +555 -0
- package/lib/tls/self-signed.js +282 -0
- package/lib/tls/status.js +480 -0
- package/lib/tls/store.js +667 -0
- package/lib/token-permission-view.js +252 -102
- package/lib/token-permissions.js +176 -26
- package/lib/tokens.js +7 -6
- package/lib/tools.js +73 -27
- package/lib/ui-routes/account-routes.js +43 -30
- package/lib/ui-routes/admin-config-routes.js +63 -22
- package/lib/ui-routes/admin-entities-routes.js +23 -13
- package/lib/ui-routes/auth-routes.js +16 -1
- package/lib/ui-routes/internals-routes.js +3 -5
- package/lib/ui-routes/mcp-consent-routes.js +72 -31
- package/lib/ui-routes/network-config-routes.js +54 -45
- package/lib/ui-routes/tls-config-routes.js +628 -0
- package/lib/utils/mailbox-path.js +51 -0
- package/lib/utils/severity.js +31 -0
- package/package.json +12 -12
- package/sbom.json +1 -1
- package/server.js +23 -1
- package/static/css/flyonui.css +1 -1
- package/static/css/src/app.tailwind.css +11 -0
- package/static/js/app.js +34 -0
- package/static/js/public.js +6 -2
- package/static/js/ui.js +97 -61
- package/static/licenses.html +341 -1252
- package/translations/messages.pot +62 -56
- package/views/account/login-redirect.hbs +22 -0
- package/views/account/passkeys.hbs +2 -2
- package/views/accounts/account.hbs +2 -2
- package/views/accounts/browse.hbs +1 -1
- package/views/accounts/edit.hbs +1 -1
- package/views/accounts/register/imap-server.hbs +1 -1
- package/views/config/ai.hbs +1 -1
- package/views/config/branding.hbs +2 -2
- package/views/config/document-store/chat.hbs +1 -1
- package/views/config/document-store/index.hbs +1 -1
- package/views/config/imap-proxy.hbs +1 -4
- package/views/config/license.hbs +1 -1
- package/views/config/mcp.hbs +88 -52
- package/views/config/network.hbs +1 -1
- package/views/config/oauth/app.hbs +2 -2
- package/views/config/service.hbs +1 -1
- package/views/config/smtp.hbs +1 -4
- package/views/config/tls-upload.hbs +81 -0
- package/views/config/tls.hbs +593 -0
- package/views/config/webhooks.hbs +2 -2
- package/views/internals/index.hbs +1 -1
- package/views/layout/app.hbs +6 -6
- package/views/layout/login.hbs +5 -5
- package/views/layout/main.hbs +2 -2
- package/views/layout/prompt.hbs +3 -3
- package/views/layout/public.hbs +1 -1
- package/views/mcp/authorize.hbs +47 -45
- package/views/partials/ace_assets.hbs +1 -1
- package/views/partials/add_account_modal.hbs +1 -1
- package/views/partials/filter_editor_js.hbs +2 -2
- package/views/partials/gateway_js.hbs +1 -1
- package/views/partials/mcp_access_levels.hbs +16 -9
- package/views/partials/mcp_tool_count.hbs +15 -14
- package/views/partials/oauth_form.hbs +1 -1
- package/views/partials/public_theme_init.hbs +1 -1
- package/views/partials/side_menu.hbs +1 -0
- package/views/partials/template_form.hbs +1 -1
- package/views/partials/theme_init.hbs +1 -1
- package/views/partials/tls_security_card.hbs +25 -53
- package/views/partials/ui/alert-banner.hbs +3 -2
- package/views/partials/ui/badge.hbs +6 -2
- package/views/partials/ui/btn.hbs +5 -2
- package/views/partials/webhooks_editor_functions.hbs +1 -1
- package/views/reference/index.hbs +1 -1
- package/views/reference/redirect.hbs +1 -1
- package/views/reference/tag.hbs +1 -1
- package/views/reference/token.hbs +1 -1
- package/views/templates/template.hbs +1 -1
- package/views/tokens/new.hbs +175 -74
- package/views/unsubscribe.hbs +1 -1
- package/views/webhooks/webhook.hbs +1 -1
- package/workers/api.js +102 -142
- package/workers/imap-proxy.js +4 -1
- package/workers/smtp.js +51 -44
- package/views/partials/tls_security_js.hbs +0 -64
- package/views/partials/tls_security_modal.hbs +0 -22
package/views/config/service.hbs
CHANGED
package/views/config/smtp.hbs
CHANGED
|
@@ -140,11 +140,10 @@
|
|
|
140
140
|
|
|
141
141
|
</form>
|
|
142
142
|
|
|
143
|
-
{{> tls_security_modal}}
|
|
144
143
|
|
|
145
144
|
<input type="hidden" id="availableAddresses" value="{{availableAddresses}}">
|
|
146
145
|
|
|
147
|
-
<script nonce="{{cspNonce}}">
|
|
146
|
+
<script data-cfasync="false" nonce="{{cspNonce}}">
|
|
148
147
|
document.addEventListener('DOMContentLoaded', () => {
|
|
149
148
|
|
|
150
149
|
let availableAddresses = document.getElementById('availableAddresses').value.split(',').map(e => e.trim()).filter(e => e);
|
|
@@ -214,7 +213,5 @@ $mail->addCustomHeader('X-EE-Account', 'USERNAME');
|
|
|
214
213
|
`}
|
|
215
214
|
}
|
|
216
215
|
});
|
|
217
|
-
|
|
218
|
-
{{> tls_security_js field="smtpServerTLSEnabled"}}
|
|
219
216
|
});
|
|
220
217
|
</script>
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
{{> ui/page-header title="Upload a certificate" icon="icon-[tabler--upload]" class="mb-1"}}
|
|
2
|
+
|
|
3
|
+
{{> ui/breadcrumb parentHref="/admin/config/tls" parentLabel="TLS Certificates" current="Upload a certificate" class="mb-6"}}
|
|
4
|
+
|
|
5
|
+
<p class="mb-6">An uploaded certificate is served for every name it covers, ahead of anything EmailEngine obtains on its
|
|
6
|
+
own. It is never renewed automatically, so replace it here before it expires.</p>
|
|
7
|
+
|
|
8
|
+
{{#if manual}}
|
|
9
|
+
{{#> ui/alert-banner variant="info" icon="icon-[tabler--info-circle]"}}
|
|
10
|
+
<div>A certificate for <span class="font-mono">{{manual.subject}}</span> is installed and valid until <span
|
|
11
|
+
class="local-date-time" data-time="{{manual.validToIso}}">{{manual.validToIso}}</span>. Installing another one
|
|
12
|
+
replaces it.</div>
|
|
13
|
+
{{/ui/alert-banner}}
|
|
14
|
+
{{/if}}
|
|
15
|
+
|
|
16
|
+
{{!-- The "Choose file" buttons and drag-and-drop onto a field are wired by static/js/app.js
|
|
17
|
+
(.file-picker-btn with data-file-target, and .droptxt), so this page carries no script. --}}
|
|
18
|
+
<form method="post" action="/admin/config/tls/upload">
|
|
19
|
+
{{!-- no id: the layout already renders the #crumb element the scripts read --}}
|
|
20
|
+
<input type="hidden" name="crumb" value="{{crumb}}" />
|
|
21
|
+
|
|
22
|
+
<div class="card bg-base-100 shadow-md mb-6">
|
|
23
|
+
<div class="card-header">
|
|
24
|
+
<h6 class="card-title text-primary">Certificate and key</h6>
|
|
25
|
+
</div>
|
|
26
|
+
|
|
27
|
+
<div class="card-body space-y-4">
|
|
28
|
+
<div>
|
|
29
|
+
{{#> ui/form-field id="uploadCert" label="Certificate"}}
|
|
30
|
+
<div class="flex items-start gap-2">
|
|
31
|
+
<textarea class="textarea font-mono text-xs grow droptxt" id="uploadCert" name="cert" rows="6" required
|
|
32
|
+
spellcheck="false" placeholder="-----BEGIN CERTIFICATE-----"></textarea>
|
|
33
|
+
{{> ui/btn label="Choose file" variant="neutral" style="soft" size="sm" icon="icon-[tabler--file-import]"
|
|
34
|
+
class="file-picker-btn shrink-0" dataName="file-target" dataValue="#uploadCert" id="uploadCertFile"}}
|
|
35
|
+
</div>
|
|
36
|
+
<span class="helper-text">PEM encoded, pasted or dropped onto the field. The server certificate first;
|
|
37
|
+
intermediates may follow it here or go in the chain field below.</span>
|
|
38
|
+
{{/ui/form-field}}
|
|
39
|
+
</div>
|
|
40
|
+
|
|
41
|
+
<div>
|
|
42
|
+
{{#> ui/form-field id="uploadKey" label="Private key"}}
|
|
43
|
+
<div class="flex items-start gap-2">
|
|
44
|
+
<textarea class="textarea font-mono text-xs grow droptxt" id="uploadKey" name="privateKey" rows="6" required
|
|
45
|
+
spellcheck="false" placeholder="-----BEGIN PRIVATE KEY-----"></textarea>
|
|
46
|
+
{{> ui/btn label="Choose file" variant="neutral" style="soft" size="sm" icon="icon-[tabler--file-import]"
|
|
47
|
+
class="file-picker-btn shrink-0" dataName="file-target" dataValue="#uploadKey" id="uploadKeyFile"}}
|
|
48
|
+
</div>
|
|
49
|
+
<span class="helper-text">Stored encrypted with the instance secret and never shown again.</span>
|
|
50
|
+
{{/ui/form-field}}
|
|
51
|
+
</div>
|
|
52
|
+
|
|
53
|
+
<div>
|
|
54
|
+
{{#> ui/form-field id="uploadPassphrase" label="Key passphrase"}}
|
|
55
|
+
<input type="password" class="input" id="uploadPassphrase" name="passphrase" autocomplete="new-password"
|
|
56
|
+
data-lpignore="true" />
|
|
57
|
+
<span class="helper-text">Only if the private key is encrypted. It is used to read the key and is not
|
|
58
|
+
stored.</span>
|
|
59
|
+
{{/ui/form-field}}
|
|
60
|
+
</div>
|
|
61
|
+
|
|
62
|
+
<div>
|
|
63
|
+
{{#> ui/form-field id="uploadCa" label="Chain"}}
|
|
64
|
+
<div class="flex items-start gap-2">
|
|
65
|
+
<textarea class="textarea font-mono text-xs grow droptxt" id="uploadCa" name="ca" rows="4" spellcheck="false"
|
|
66
|
+
placeholder="-----BEGIN CERTIFICATE-----"></textarea>
|
|
67
|
+
{{> ui/btn label="Choose file" variant="neutral" style="soft" size="sm" icon="icon-[tabler--file-import]"
|
|
68
|
+
class="file-picker-btn shrink-0" dataName="file-target" dataValue="#uploadCa" id="uploadCaFile"}}
|
|
69
|
+
</div>
|
|
70
|
+
<span class="helper-text">Optional. Intermediate certificates, if they are not already in the certificate
|
|
71
|
+
field.</span>
|
|
72
|
+
{{/ui/form-field}}
|
|
73
|
+
</div>
|
|
74
|
+
</div>
|
|
75
|
+
</div>
|
|
76
|
+
|
|
77
|
+
<div class="mb-6 flex flex-wrap gap-2">
|
|
78
|
+
{{> ui/btn label=(when manual "Replace certificate" "Install certificate") type="submit" icon="icon-[tabler--upload]"}}
|
|
79
|
+
{{> ui/btn label="Cancel" variant="neutral" style="soft" href="/admin/config/tls"}}
|
|
80
|
+
</div>
|
|
81
|
+
</form>
|