emailengine-app 2.82.1 → 2.83.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.
- package/.ncurc.js +8 -1
- package/.release-please-manifest.json +1 -1
- package/CHANGELOG.md +25 -0
- package/data/google-crawlers.json +1 -1
- package/lib/account.js +16 -3
- package/lib/api-routes/account-routes.js +8 -6
- package/lib/api-routes/blocklist-routes.js +4 -4
- package/lib/api-routes/oauth2-app-routes.js +5 -2
- package/lib/api-routes/route-helpers.js +28 -0
- package/lib/api-routes/submit-routes.js +6 -5
- package/lib/bounce-detect.js +4 -2
- package/lib/egress-filter.js +8 -3
- package/lib/email-client/gmail-client.js +3 -1
- package/lib/email-client/imap-client.js +2 -1
- package/lib/email-client/outlook-client.js +106 -47
- package/lib/email-client/outlook-fallback-poll.js +30 -0
- package/lib/enum-descriptions.js +3 -1
- package/lib/imapproxy/imap-core/README.md +1 -0
- package/lib/imapproxy/imap-core/lib/commands/authenticate-plain.js +11 -1
- package/lib/imapproxy/proxy-handoff.js +6 -3
- package/lib/imapproxy/response-error.js +14 -1
- package/lib/oauth/gcp-metadata.js +222 -0
- package/lib/oauth/gmail.js +115 -20
- package/lib/oauth/mail-ru.js +10 -4
- package/lib/oauth/outlook.js +11 -4
- package/lib/oauth/token-fetch.js +4 -2
- package/lib/oauth/verify-app.js +120 -32
- package/lib/oauth2-apps.js +46 -12
- package/lib/schemas.js +60 -18
- package/lib/tools.js +52 -2
- package/lib/ui-routes/admin-entities-routes.js +2 -2
- package/lib/ui-routes/auth-routes.js +4 -1
- package/lib/ui-routes/gmail-service-auth.js +64 -0
- package/lib/ui-routes/oauth-config-routes.js +8 -16
- package/lib/ui-routes/outlook-subscription-view.js +36 -0
- package/lib/ui-routes/route-helpers.js +2 -14
- package/lib/ui-routes/suppression-list-routes.js +2 -2
- package/lib/utils/network.js +29 -0
- package/lib/webhook-request.js +12 -4
- package/lib/webhook-routing.js +34 -11
- package/package.json +11 -11
- package/sbom.json +1 -1
- package/server.js +8 -2
- package/static/css/flyonui.css +1 -1
- package/static/js/app.js +2 -1
- package/static/js/ui.js +6 -1
- package/static/licenses.html +18 -28
- package/translations/messages.pot +73 -73
- package/views/accounts/account.hbs +5 -2
- package/views/accounts/edit.hbs +1 -1
- package/views/config/imap-proxy.hbs +1 -1
- package/views/config/network.hbs +7 -5
- package/views/config/oauth/app.hbs +2 -0
- package/views/config/smtp.hbs +1 -1
- package/views/config/tls.hbs +2 -2
- package/views/config/webhooks.hbs +1 -1
- package/views/partials/oauth_form.hbs +116 -27
- package/workers/api.js +4 -2
- package/workers/webhooks.js +18 -7
package/lib/webhook-routing.js
CHANGED
|
@@ -30,15 +30,35 @@ function eventAllowed(webhookEvents, eventName) {
|
|
|
30
30
|
return events.includes('*') || events.includes(eventName);
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
//
|
|
34
|
-
//
|
|
35
|
-
//
|
|
36
|
-
//
|
|
37
|
-
|
|
38
|
-
|
|
33
|
+
// Which custom header lists travel with a delivery, by the configuration level whose target won
|
|
34
|
+
// (`source`, from resolveTargetUrl), in the order they are merged (later lists override earlier):
|
|
35
|
+
//
|
|
36
|
+
// - A custom route carries its own headers and nothing else. The global and account-level headers
|
|
37
|
+
// belong to the default target, and letting them ride along sent an account's secrets to an
|
|
38
|
+
// operator-defined endpoint and let an account override the route's own Authorization.
|
|
39
|
+
// - The global headers go to the global target only. They typically hold the credential of the
|
|
40
|
+
// operator's own receiver, and the per-account URL is settable by an account-scoped API token,
|
|
41
|
+
// so sending them along to an account's URL handed that credential to whoever set the URL.
|
|
42
|
+
// - An account's headers accompany its deliveries to whichever default target they go to: an
|
|
43
|
+
// account identifying itself to the global receiver is what the account-level list is for.
|
|
44
|
+
//
|
|
45
|
+
// The worker reads this to decide which lists to load, deliveryCustomHeaders() to merge them and
|
|
46
|
+
// describeEffectiveRouting() to count them, so the rule lives in one place.
|
|
47
|
+
const HEADER_LEVELS = {
|
|
48
|
+
route: ['route'],
|
|
49
|
+
global: ['global', 'account'],
|
|
50
|
+
account: ['account']
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
function headerLevels(source) {
|
|
54
|
+
return HEADER_LEVELS[source] || [];
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
// The custom headers of one delivery. `headers` maps a level name to its header list.
|
|
58
|
+
function deliveryCustomHeaders(source, lists) {
|
|
39
59
|
let headers = {};
|
|
40
|
-
for (let
|
|
41
|
-
for (let header of [].concat(
|
|
60
|
+
for (let level of headerLevels(source)) {
|
|
61
|
+
for (let header of [].concat(lists[level] || [])) {
|
|
42
62
|
if (header && header.key) {
|
|
43
63
|
headers[header.key] = header.value;
|
|
44
64
|
}
|
|
@@ -66,8 +86,11 @@ function describeEffectiveRouting(opts) {
|
|
|
66
86
|
|
|
67
87
|
let { url, source } = resolveTargetUrl(null, opts.accountWebhooks, opts.globalWebhooks);
|
|
68
88
|
|
|
69
|
-
|
|
70
|
-
|
|
89
|
+
// Only the lists that travel to the winning target are counted, so an account that overrides
|
|
90
|
+
// the URL is shown its own headers alone
|
|
91
|
+
let levels = headerLevels(source);
|
|
92
|
+
let globalHeaders = levels.includes('global') ? [].concat(opts.globalCustomHeaders || []).length : 0;
|
|
93
|
+
let accountHeaders = levels.includes('account') ? [].concat(opts.accountCustomHeaders || []).length : 0;
|
|
71
94
|
|
|
72
95
|
let customHeadersLabel = null;
|
|
73
96
|
if (globalHeaders && accountHeaders) {
|
|
@@ -107,4 +130,4 @@ function describeEffectiveRouting(opts) {
|
|
|
107
130
|
};
|
|
108
131
|
}
|
|
109
132
|
|
|
110
|
-
module.exports = { resolveTargetUrl, isDeliverableRoute, eventAllowed, describeEffectiveRouting, deliveryCustomHeaders, isRouteMappingMissing };
|
|
133
|
+
module.exports = { resolveTargetUrl, isDeliverableRoute, eventAllowed, describeEffectiveRouting, headerLevels, deliveryCustomHeaders, isRouteMappingMissing };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "emailengine-app",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.83.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"productTitle": "EmailEngine",
|
|
6
6
|
"description": "Email Sync Engine",
|
|
@@ -69,25 +69,25 @@
|
|
|
69
69
|
"@postalsys/email-text-tools": "2.4.18",
|
|
70
70
|
"@postalsys/gettext": "4.1.1",
|
|
71
71
|
"@postalsys/joi-messages": "1.3.1",
|
|
72
|
-
"@postalsys/templates": "2.0.
|
|
73
|
-
"@sentry/node-core": "10.76.
|
|
72
|
+
"@postalsys/templates": "2.0.4",
|
|
73
|
+
"@sentry/node-core": "10.76.1",
|
|
74
74
|
"@simplewebauthn/server": "14.0.3",
|
|
75
75
|
"@zone-eu/mailsplit": "5.4.20",
|
|
76
76
|
"@zone-eu/wild-config": "1.7.7",
|
|
77
77
|
"bullmq": "6.3.11",
|
|
78
78
|
"compare-versions": "6.1.1",
|
|
79
|
-
"dotenv": "18.0.
|
|
79
|
+
"dotenv": "18.0.6",
|
|
80
80
|
"encoding-japanese": "2.4.0",
|
|
81
81
|
"exponential-backoff": "3.1.3",
|
|
82
82
|
"fast-xml-parser": "5.11.2",
|
|
83
83
|
"gettext-parser": "7.0.1",
|
|
84
|
-
"handlebars": "4.7.
|
|
84
|
+
"handlebars": "4.7.10",
|
|
85
85
|
"hapi-pino": "13.0.0",
|
|
86
86
|
"he": "1.2.0",
|
|
87
87
|
"html-to-text": "10.0.1",
|
|
88
88
|
"ical.js": "2.2.1",
|
|
89
89
|
"iconv-lite": "0.7.3",
|
|
90
|
-
"imapflow": "2.
|
|
90
|
+
"imapflow": "2.3.0",
|
|
91
91
|
"ioredfour": "1.4.4",
|
|
92
92
|
"ioredis": "6.0.0",
|
|
93
93
|
"ipaddr.js": "2.5.0",
|
|
@@ -95,33 +95,33 @@
|
|
|
95
95
|
"libbase64": "1.3.2",
|
|
96
96
|
"libmime": "5.4.7",
|
|
97
97
|
"libqp": "2.1.2",
|
|
98
|
-
"mailparser": "3.9.
|
|
98
|
+
"mailparser": "3.9.37",
|
|
99
99
|
"marked": "15.0.12",
|
|
100
100
|
"minimist": "1.2.8",
|
|
101
101
|
"murmurhash": "2.0.1",
|
|
102
102
|
"nanoid": "3.3.20",
|
|
103
|
-
"nodemailer": "10.0.
|
|
103
|
+
"nodemailer": "10.0.16",
|
|
104
104
|
"pino": "10.3.1",
|
|
105
105
|
"prom-client": "15.1.3",
|
|
106
106
|
"psl": "1.15.0",
|
|
107
107
|
"pubface": "1.1.18",
|
|
108
108
|
"punycode.js": "2.3.1",
|
|
109
109
|
"qrcode-generator": "2.0.4",
|
|
110
|
-
"smtp-server": "3.19.
|
|
110
|
+
"smtp-server": "3.19.18",
|
|
111
111
|
"socks": "2.8.10",
|
|
112
112
|
"timezones-list": "3.1.0",
|
|
113
113
|
"undici": "7.30.0"
|
|
114
114
|
},
|
|
115
115
|
"devDependencies": {
|
|
116
116
|
"@eslint/js": "10.0.1",
|
|
117
|
-
"@iconify-json/tabler": "1.2.
|
|
117
|
+
"@iconify-json/tabler": "1.2.42",
|
|
118
118
|
"@iconify/tailwind4": "1.2.3",
|
|
119
119
|
"@playwright/test": "1.63.0",
|
|
120
120
|
"@postalsys/ee-client": "1.8.1",
|
|
121
121
|
"@simplewebauthn/browser": "14.0.0",
|
|
122
122
|
"@tailwindcss/cli": "4.3.3",
|
|
123
123
|
"ace-builds": "1.44.0",
|
|
124
|
-
"acorn": "8.
|
|
124
|
+
"acorn": "8.19.0",
|
|
125
125
|
"acorn-walk": "8.3.5",
|
|
126
126
|
"chai": "4.5.0",
|
|
127
127
|
"eerawlog": "1.5.5",
|