emailengine-app 2.77.0 → 2.79.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/.github/workflows/test.yml +80 -0
- package/.ncurc.js +23 -13
- package/.release-please-manifest.json +1 -1
- package/CHANGELOG.md +60 -0
- package/bin/emailengine.js +1 -1
- package/config/e2e.toml +2 -1
- package/config/test.toml +2 -1
- package/data/google-crawlers.json +1 -1
- package/encrypt.js +1 -1
- package/lib/account/expected-identity.js +88 -0
- package/lib/account.js +145 -61
- package/lib/api-reference/format.js +105 -4
- package/lib/api-reference/index.js +24 -7
- package/lib/api-reference/model.js +148 -21
- package/lib/api-reference/schema-tree.js +282 -28
- package/lib/api-routes/account-routes.js +99 -36
- package/lib/api-routes/behavior-notes.js +3 -0
- package/lib/api-routes/blocklist-routes.js +21 -47
- package/lib/api-routes/chat-routes.js +10 -12
- package/lib/api-routes/delivery-test-routes.js +6 -26
- package/lib/api-routes/export-routes.js +2 -0
- package/lib/api-routes/gateway-routes.js +52 -11
- package/lib/api-routes/license-routes.js +2 -0
- package/lib/api-routes/mailbox-routes.js +29 -26
- package/lib/api-routes/message-routes.js +27 -21
- package/lib/api-routes/oauth2-app-routes.js +11 -29
- package/lib/api-routes/operation-impact.js +80 -0
- package/lib/api-routes/outbox-routes.js +15 -5
- package/lib/api-routes/permission-map.js +397 -0
- package/lib/api-routes/route-helpers.js +223 -9
- package/lib/api-routes/route-metadata.js +28 -0
- package/lib/api-routes/settings-routes.js +30 -25
- package/lib/api-routes/stats-routes.js +2 -2
- package/lib/api-routes/submit-routes.js +53 -31
- package/lib/api-routes/template-routes.js +3 -0
- package/lib/api-routes/token-routes.js +319 -33
- package/lib/api-routes/webhook-route-routes.js +14 -4
- package/lib/append-list.js +3 -14
- package/lib/arf-detect.js +23 -1
- package/lib/auth-token.js +80 -8
- package/lib/autodetect-imap-settings.js +40 -16
- package/lib/base32.js +30 -0
- package/lib/bounce-detect.js +182 -62
- package/lib/consts.js +10 -0
- package/lib/db.js +20 -2
- package/lib/delivery-error.js +30 -1
- package/lib/egress-filter.js +89 -8
- package/lib/email-client/base-client.js +35 -113
- package/lib/email-client/gmail-client.js +22 -13
- package/lib/email-client/imap/listing-diff.js +3 -3
- package/lib/email-client/imap/mailbox.js +28 -93
- package/lib/email-client/imap/subconnection.js +10 -7
- package/lib/email-client/imap/sync-operations.js +46 -46
- package/lib/email-client/imap-client.js +39 -28
- package/lib/email-client/message-builder.js +15 -15
- package/lib/email-client/notification-handler.js +1 -1
- package/lib/email-client/outlook/graph-api.js +10 -4
- package/lib/email-client/outlook-client.js +54 -55
- package/lib/email-client/smtp-pool-manager.js +1 -1
- package/lib/enum-descriptions.js +92 -2
- package/lib/export.js +2 -2
- package/lib/field-usage.js +133 -0
- package/lib/gateway.js +2 -2
- package/lib/get-raw-email.js +1 -1
- package/lib/imapproxy/imap-core/lib/commands/authenticate-plain.js +3 -3
- package/lib/imapproxy/imap-core/lib/commands/id.js +2 -13
- package/lib/imapproxy/imap-core/lib/commands/starttls.js +1 -1
- package/lib/imapproxy/imap-core/lib/imap-command.js +21 -5
- package/lib/imapproxy/imap-core/lib/imap-connection.js +17 -7
- package/lib/imapproxy/imap-core/lib/imap-server.js +2 -2
- package/lib/imapproxy/imap-server.js +40 -10
- package/lib/license-beacon.js +5 -10
- package/lib/lists.js +49 -1
- package/lib/llm-pre-process.js +6 -6
- package/lib/logger.js +5 -1
- package/lib/metrics-collector.js +2 -2
- package/lib/msgpack.js +62 -0
- package/lib/oauth/decode-jwt-payload.js +39 -0
- package/lib/oauth/gmail.js +9 -12
- package/lib/oauth/mail-ru.js +5 -7
- package/lib/oauth/outlook-identity.js +61 -0
- package/lib/oauth/outlook.js +9 -9
- package/lib/oauth/pubsub/google.js +25 -10
- package/lib/oauth/retry-setup.js +38 -0
- package/lib/oauth/scope-checker.js +1 -1
- package/lib/oauth2-apps.js +224 -295
- package/lib/openapi/build-document.js +15 -7
- package/lib/openapi/joi-schema.js +20 -0
- package/lib/outbox.js +145 -14
- package/lib/pre-process.js +9 -9
- package/lib/queue-stats.js +49 -0
- package/lib/read-env-value.js +37 -0
- package/lib/reconnection-manager.js +2 -2
- package/lib/rewrite-text-nodes.js +4 -3
- package/lib/routes-ui.js +4 -0
- package/lib/schemas.js +223 -155
- package/lib/settings.js +84 -5
- package/lib/sub-script.js +2 -1
- package/lib/swagger-options.js +2 -1
- package/lib/templates.js +5 -5
- package/lib/threads.js +2 -2
- package/lib/token-audit-log.js +208 -0
- package/lib/token-permission-view.js +219 -0
- package/lib/token-permissions.js +172 -0
- package/lib/tokens.js +100 -16
- package/lib/tools.js +259 -85
- package/lib/totp.js +67 -0
- package/lib/ui-routes/account-routes.js +122 -26
- package/lib/ui-routes/admin-config-routes.js +20 -17
- package/lib/ui-routes/admin-entities-routes.js +66 -22
- package/lib/ui-routes/auth-routes.js +36 -48
- package/lib/ui-routes/export-routes.js +10 -4
- package/lib/ui-routes/oauth-config-routes.js +5 -5
- package/lib/ui-routes/reference-routes.js +11 -8
- package/lib/ui-routes/route-helpers.js +79 -2
- package/lib/ui-routes/settings-page.js +1 -1
- package/lib/ui-routes/smtp-test-routes.js +1 -1
- package/lib/ui-routes/suppression-list-routes.js +294 -0
- package/lib/ui-routes/unsubscribe-routes.js +19 -29
- package/lib/utils/is-email.js +34 -0
- package/lib/utils/network.js +2 -2
- package/lib/utils/to-camel-case.js +17 -0
- package/lib/web-safe-html.js +1 -1
- package/lib/webhook-egress.js +37 -0
- package/lib/webhook-routing.js +80 -0
- package/lib/webhooks.js +21 -15
- package/package.json +26 -27
- package/sbom.json +1 -0
- package/server.js +81 -42
- package/static/css/flyonui.css +1 -1
- package/static/css/public.css +3 -0
- package/static/css/src/app.tailwind.css +159 -9
- package/static/js/app.js +69 -0
- package/static/js/reference.js +741 -10
- package/static/js/ui.js +43 -0
- package/static/licenses.html +698 -1590
- package/translations/README.md +64 -0
- package/translations/de.mo +0 -0
- package/translations/de.po +164 -120
- package/translations/en.po +200 -161
- package/translations/et.mo +0 -0
- package/translations/et.po +163 -120
- package/translations/fr.mo +0 -0
- package/translations/fr.po +163 -120
- package/translations/ja.mo +0 -0
- package/translations/ja.po +163 -120
- package/translations/messages.pot +94 -64
- package/translations/nl.mo +0 -0
- package/translations/nl.po +164 -120
- package/translations/pl.mo +0 -0
- package/translations/pl.po +163 -120
- package/views/account-identity-error.hbs +34 -0
- package/views/accounts/account.hbs +69 -7
- package/views/accounts/browse.hbs +18 -35
- package/views/accounts/edit.hbs +1 -0
- package/views/accounts/register/imap.hbs +12 -2
- package/views/config/logging.hbs +6 -0
- package/views/config/oauth/app.hbs +0 -2
- package/views/config/security.hbs +13 -0
- package/views/layout/app.hbs +29 -5
- package/views/oauth-scope-error.hbs +1 -1
- package/views/partials/oauth_form.hbs +0 -15
- package/views/partials/reference/disclosure.hbs +8 -2
- package/views/partials/reference/nav.hbs +36 -9
- package/views/partials/reference/operation.hbs +48 -14
- package/views/partials/reference/params.hbs +17 -1
- package/views/partials/reference/schema-node.hbs +112 -54
- package/views/partials/reference/schema-tools.hbs +25 -0
- package/views/partials/reference/token-alert.hbs +35 -10
- package/views/partials/reference/try-it.hbs +84 -11
- package/views/partials/side_menu.hbs +1 -0
- package/views/partials/ui/checkbox.hbs +2 -2
- package/views/partials/ui/tabs.hbs +7 -1
- package/views/reference/index.hbs +1 -1
- package/views/reference/token.hbs +4 -0
- package/views/suppression-lists/index.hbs +85 -0
- package/views/suppression-lists/list.hbs +87 -0
- package/views/templates/index.hbs +8 -2
- package/views/tokens/index.hbs +31 -4
- package/views/tokens/new.hbs +324 -2
- package/workers/api.js +299 -140
- package/workers/documents.js +46 -26
- package/workers/export.js +20 -8
- package/workers/imap-proxy.js +2 -2
- package/workers/imap.js +13 -7
- package/workers/smtp.js +13 -7
- package/workers/submit.js +41 -31
- package/workers/webhooks.js +60 -37
- package/lib/feature-flags.js +0 -48
package/lib/web-safe-html.js
CHANGED
|
@@ -388,7 +388,7 @@ async function messageWebSafeHtml(messageData) {
|
|
|
388
388
|
}
|
|
389
389
|
} catch (err) {
|
|
390
390
|
// A message that can not be folded is still a message. Render all of it.
|
|
391
|
-
logger.
|
|
391
|
+
logger.warn({ msg: 'Failed to mark quoted thread content', err });
|
|
392
392
|
}
|
|
393
393
|
}
|
|
394
394
|
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// Owns the webhook egress policy: where it is read from, what "off" means, and the two forms the
|
|
4
|
+
// rest of the system consumes it in. Previously each consumer resolved the environment variable
|
|
5
|
+
// itself and re-derived the off-switch, which meant the pre-check and the connect-time binding
|
|
6
|
+
// could disagree about what was configured - the same split-brain the binding exists to prevent.
|
|
7
|
+
|
|
8
|
+
const { readEnvValue } = require('./read-env-value');
|
|
9
|
+
const { assertAllowedUrl, createEgressLookup, normalizePolicy, POLICY_OFF } = require('./egress-filter');
|
|
10
|
+
|
|
11
|
+
// Which destinations webhook deliveries may reach. An account-scoped API token can set both the
|
|
12
|
+
// webhook URL and its custom headers, so without this the least-privileged credential in the
|
|
13
|
+
// system can aim EmailEngine at anything its host can route to. Defaults to blocking the
|
|
14
|
+
// link-local range (cloud instance metadata); `private` also blocks RFC1918 and friends, `off`
|
|
15
|
+
// disables the check and restores redirect following. See lib/egress-filter.js
|
|
16
|
+
const WEBHOOK_EGRESS_POLICY = normalizePolicy(readEnvValue('EENGINE_WEBHOOK_EGRESS_POLICY'));
|
|
17
|
+
|
|
18
|
+
const policyEnabled = WEBHOOK_EGRESS_POLICY !== POLICY_OFF;
|
|
19
|
+
|
|
20
|
+
// Built once rather than per delivery. Null when the policy is off, which is also what tells
|
|
21
|
+
// sendWebhookRequest() to keep following redirects.
|
|
22
|
+
const validateWebhookTarget = policyEnabled ? target => assertAllowedUrl(target, { policy: WEBHOOK_EGRESS_POLICY }) : null;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Builds the connect-time half of the guard, for use as an undici Agent's `connect.lookup`.
|
|
26
|
+
*
|
|
27
|
+
* @returns {Function|null} A lookup enforcing the policy, or null when the policy is off
|
|
28
|
+
*/
|
|
29
|
+
function createWebhookLookup() {
|
|
30
|
+
return policyEnabled ? createEgressLookup(WEBHOOK_EGRESS_POLICY) : null;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
module.exports = {
|
|
34
|
+
WEBHOOK_EGRESS_POLICY,
|
|
35
|
+
validateWebhookTarget,
|
|
36
|
+
createWebhookLookup
|
|
37
|
+
};
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// Shared webhook routing rules. The notify pipeline (lib/webhooks.js, workers/webhooks.js)
|
|
4
|
+
// and the admin account page's routing card resolve targets and gates through the helpers
|
|
5
|
+
// here, so the debug view cannot drift from what the worker actually does.
|
|
6
|
+
|
|
7
|
+
// Precedence: custom route target, then the per-account webhooks override, then the global
|
|
8
|
+
// webhooks setting. Returns the winning URL and which configuration level provided it.
|
|
9
|
+
function resolveTargetUrl(customRouteTargetUrl, accountWebhooks, globalWebhooks) {
|
|
10
|
+
if (customRouteTargetUrl) {
|
|
11
|
+
return { url: customRouteTargetUrl, source: 'route' };
|
|
12
|
+
}
|
|
13
|
+
if (accountWebhooks) {
|
|
14
|
+
return { url: accountWebhooks, source: 'account' };
|
|
15
|
+
}
|
|
16
|
+
if (globalWebhooks) {
|
|
17
|
+
return { url: globalWebhooks, source: 'global' };
|
|
18
|
+
}
|
|
19
|
+
return { url: null, source: null };
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
// A custom route can only deliver when it is enabled and has a target URL
|
|
23
|
+
function isDeliverableRoute(route) {
|
|
24
|
+
return !!(route && route.enabled && route.targetUrl);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
// The webhookEvents allowlist applies to the default route only; '*' allows everything
|
|
28
|
+
function eventAllowed(webhookEvents, eventName) {
|
|
29
|
+
let events = [].concat(webhookEvents || []);
|
|
30
|
+
return events.includes('*') || events.includes(eventName);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
// Assembles a render-ready description of the webhook routing that applies to one account.
|
|
34
|
+
// All inputs are pre-fetched values; this function does not touch Redis or settings.
|
|
35
|
+
function describeEffectiveRouting(opts) {
|
|
36
|
+
opts = opts || {};
|
|
37
|
+
|
|
38
|
+
let events = [].concat(opts.webhookEvents || []);
|
|
39
|
+
let allEvents = events.includes('*');
|
|
40
|
+
|
|
41
|
+
let { url, source } = resolveTargetUrl(null, opts.accountWebhooks, opts.globalWebhooks);
|
|
42
|
+
|
|
43
|
+
let globalHeaders = [].concat(opts.globalCustomHeaders || []).length;
|
|
44
|
+
let accountHeaders = [].concat(opts.accountCustomHeaders || []).length;
|
|
45
|
+
|
|
46
|
+
let customHeadersLabel = null;
|
|
47
|
+
if (globalHeaders && accountHeaders) {
|
|
48
|
+
customHeadersLabel = `${globalHeaders} global, ${accountHeaders} account-specific`;
|
|
49
|
+
} else if (globalHeaders) {
|
|
50
|
+
customHeadersLabel = `${globalHeaders} global`;
|
|
51
|
+
} else if (accountHeaders) {
|
|
52
|
+
customHeadersLabel = `${accountHeaders} account-specific`;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
return {
|
|
56
|
+
enabled: !!opts.webhooksEnabled,
|
|
57
|
+
|
|
58
|
+
defaultRoute: {
|
|
59
|
+
url,
|
|
60
|
+
source,
|
|
61
|
+
events: allEvents ? [] : events,
|
|
62
|
+
allEvents,
|
|
63
|
+
inboxNewOnly: !!opts.inboxNewOnly,
|
|
64
|
+
customHeadersLabel
|
|
65
|
+
},
|
|
66
|
+
|
|
67
|
+
// Enabled custom routes deliver independently of the default route, each gated by its
|
|
68
|
+
// own filter function instead of the webhookEvents allowlist
|
|
69
|
+
customRoutes: []
|
|
70
|
+
.concat(opts.routes || [])
|
|
71
|
+
.filter(isDeliverableRoute)
|
|
72
|
+
.map(route => ({
|
|
73
|
+
id: route.id,
|
|
74
|
+
name: route.name,
|
|
75
|
+
targetUrl: route.targetUrl
|
|
76
|
+
}))
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
module.exports = { resolveTargetUrl, isDeliverableRoute, eventAllowed, describeEffectiveRouting };
|
package/lib/webhooks.js
CHANGED
|
@@ -2,13 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
const { randomUUID: uuid } = require('crypto');
|
|
4
4
|
const { redis, notifyQueue } = require('./db');
|
|
5
|
-
const msgpack = require('
|
|
5
|
+
const msgpack = require('./msgpack');
|
|
6
6
|
const logger = require('./logger');
|
|
7
7
|
const { REDIS_PREFIX, MESSAGE_NEW_NOTIFY } = require('./consts');
|
|
8
8
|
const { SubScript } = require('./sub-script');
|
|
9
9
|
const settings = require('./settings');
|
|
10
10
|
const { filterListPage } = require('./tools');
|
|
11
11
|
const { buildRetentionPolicy } = require('./queue-retention');
|
|
12
|
+
const { isDeliverableRoute } = require('./webhook-routing');
|
|
12
13
|
|
|
13
14
|
class WebhooksHandler {
|
|
14
15
|
constructor(options) {
|
|
@@ -70,7 +71,12 @@ class WebhooksHandler {
|
|
|
70
71
|
webhookErrorFlag = JSON.parse(list[i + 2].toString());
|
|
71
72
|
}
|
|
72
73
|
} catch (err) {
|
|
73
|
-
logger.error({
|
|
74
|
+
logger.error({
|
|
75
|
+
msg: 'Failed to parse webhook error flag',
|
|
76
|
+
webhook: selectedIds[i / 3],
|
|
77
|
+
entry: list[i + 2] && list[i + 2].toString('base64'),
|
|
78
|
+
err
|
|
79
|
+
});
|
|
74
80
|
}
|
|
75
81
|
|
|
76
82
|
try {
|
|
@@ -192,7 +198,7 @@ class WebhooksHandler {
|
|
|
192
198
|
let entry = msgpack.decode(line);
|
|
193
199
|
logEntries.unshift(entry);
|
|
194
200
|
} catch (err) {
|
|
195
|
-
logger.error({ msg: 'Failed to
|
|
201
|
+
logger.error({ msg: 'Failed to decode log line', webhook: id, entry: line && line.toString('base64'), err });
|
|
196
202
|
}
|
|
197
203
|
}
|
|
198
204
|
|
|
@@ -212,7 +218,7 @@ class WebhooksHandler {
|
|
|
212
218
|
meta = msgpack.decode(getResult[0]);
|
|
213
219
|
}
|
|
214
220
|
} catch (err) {
|
|
215
|
-
logger.error({ msg: 'Failed to process webhook', entry: getResult[0].toString('base64') });
|
|
221
|
+
logger.error({ msg: 'Failed to process webhook', webhook: id, entry: getResult[0].toString('base64'), err });
|
|
216
222
|
}
|
|
217
223
|
|
|
218
224
|
return Object.assign({}, meta || {});
|
|
@@ -237,7 +243,7 @@ class WebhooksHandler {
|
|
|
237
243
|
meta = msgpack.decode(getResult[0]);
|
|
238
244
|
}
|
|
239
245
|
} catch (err) {
|
|
240
|
-
logger.error({ msg: 'Failed to process webhook', entry: getResult[0].toString('base64') });
|
|
246
|
+
logger.error({ msg: 'Failed to process webhook', webhook: id, entry: getResult[0].toString('base64'), err });
|
|
241
247
|
}
|
|
242
248
|
|
|
243
249
|
try {
|
|
@@ -245,7 +251,7 @@ class WebhooksHandler {
|
|
|
245
251
|
content = msgpack.decode(getResult[1]);
|
|
246
252
|
}
|
|
247
253
|
} catch (err) {
|
|
248
|
-
logger.error({ msg: 'Failed to process webhook', entry: getResult[1].toString('base64') });
|
|
254
|
+
logger.error({ msg: 'Failed to process webhook', webhook: id, entry: getResult[1].toString('base64'), err });
|
|
249
255
|
}
|
|
250
256
|
|
|
251
257
|
v = Number(getResult[2] && getResult[2].toString()) || 0;
|
|
@@ -255,7 +261,7 @@ class WebhooksHandler {
|
|
|
255
261
|
webhookErrorFlag = JSON.parse(getResult[3].toString());
|
|
256
262
|
}
|
|
257
263
|
} catch (err) {
|
|
258
|
-
logger.error({ msg: 'Failed to process webhook', entry: getResult[3].toString('base64') });
|
|
264
|
+
logger.error({ msg: 'Failed to process webhook', webhook: id, entry: getResult[3].toString('base64'), err });
|
|
259
265
|
}
|
|
260
266
|
|
|
261
267
|
tcount = Number(getResult[4] && getResult[4].toString()) || 0;
|
|
@@ -355,7 +361,7 @@ class WebhooksHandler {
|
|
|
355
361
|
} catch (err) {
|
|
356
362
|
await this.storeLog(id, 'filter', null, err.stack);
|
|
357
363
|
|
|
358
|
-
logger.error({ msg: '
|
|
364
|
+
logger.error({ msg: 'Failed to compile webhook script', type: 'filter', webhook: id, err });
|
|
359
365
|
webhookData.compiledFn = null;
|
|
360
366
|
webhookData.compiledMap = null;
|
|
361
367
|
}
|
|
@@ -370,7 +376,7 @@ class WebhooksHandler {
|
|
|
370
376
|
} catch (err) {
|
|
371
377
|
await this.storeLog(id, 'map', null, err.stack);
|
|
372
378
|
|
|
373
|
-
logger.error({ msg: '
|
|
379
|
+
logger.error({ msg: 'Failed to compile webhook script', type: 'map', webhook: id, err });
|
|
374
380
|
webhookData.compiledFn = null;
|
|
375
381
|
webhookData.compiledMap = null;
|
|
376
382
|
}
|
|
@@ -383,7 +389,7 @@ class WebhooksHandler {
|
|
|
383
389
|
} catch (err) {
|
|
384
390
|
await this.storeLog(id, 'filter', payload, err.stack);
|
|
385
391
|
|
|
386
|
-
logger.error({ msg: '
|
|
392
|
+
logger.error({ msg: 'Failed to execute webhook script', type: 'filter', webhook: webhookData.id, err });
|
|
387
393
|
return null;
|
|
388
394
|
}
|
|
389
395
|
};
|
|
@@ -396,7 +402,7 @@ class WebhooksHandler {
|
|
|
396
402
|
} catch (err) {
|
|
397
403
|
await this.storeLog(id, 'map', payload, err.stack);
|
|
398
404
|
|
|
399
|
-
logger.error({ msg: '
|
|
405
|
+
logger.error({ msg: 'Failed to execute webhook script', type: 'map', webhook: webhookData.id, err });
|
|
400
406
|
return null;
|
|
401
407
|
}
|
|
402
408
|
};
|
|
@@ -543,7 +549,7 @@ class WebhooksHandler {
|
|
|
543
549
|
};
|
|
544
550
|
|
|
545
551
|
for (let route of webhookRoutes) {
|
|
546
|
-
if (route
|
|
552
|
+
if (isDeliverableRoute(route) && typeof route.filterFn === 'function') {
|
|
547
553
|
let canSend;
|
|
548
554
|
let payload = structuredClone(originalPayload);
|
|
549
555
|
|
|
@@ -556,7 +562,7 @@ class WebhooksHandler {
|
|
|
556
562
|
} catch (err) {
|
|
557
563
|
await this.storeLog(route.id, 'filter', payload, err.stack);
|
|
558
564
|
|
|
559
|
-
logger.error({ msg: '
|
|
565
|
+
logger.error({ msg: 'Failed to execute webhook script', type: 'filter', webhook: route.id, err });
|
|
560
566
|
}
|
|
561
567
|
|
|
562
568
|
if (canSend) {
|
|
@@ -566,7 +572,7 @@ class WebhooksHandler {
|
|
|
566
572
|
} catch (err) {
|
|
567
573
|
await this.storeLog(route.id, 'map', payload, err.stack);
|
|
568
574
|
|
|
569
|
-
logger.error({ msg: '
|
|
575
|
+
logger.error({ msg: 'Failed to execute webhook script', type: 'map', webhook: route.id, err });
|
|
570
576
|
canSend = false;
|
|
571
577
|
}
|
|
572
578
|
}
|
|
@@ -599,7 +605,7 @@ class WebhooksHandler {
|
|
|
599
605
|
try {
|
|
600
606
|
await this.redis.hincrby(this.getWebhooksContentKey(), `${route.id}:tcount`, 1);
|
|
601
607
|
} catch (err) {
|
|
602
|
-
logger.
|
|
608
|
+
logger.warn({ msg: 'Failed to increment counter', event, webhook: route.id, err });
|
|
603
609
|
}
|
|
604
610
|
}
|
|
605
611
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "emailengine-app",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.79.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"productTitle": "EmailEngine",
|
|
6
6
|
"description": "Email Sync Engine",
|
|
@@ -50,8 +50,8 @@
|
|
|
50
50
|
},
|
|
51
51
|
"homepage": "https://emailengine.app/",
|
|
52
52
|
"dependencies": {
|
|
53
|
-
"@bull-board/api": "
|
|
54
|
-
"@bull-board/hapi": "
|
|
53
|
+
"@bull-board/api": "9.0.0",
|
|
54
|
+
"@bull-board/hapi": "9.0.0",
|
|
55
55
|
"@elastic/elasticsearch": "8.15.3",
|
|
56
56
|
"@hapi/accept": "6.0.3",
|
|
57
57
|
"@hapi/bell": "13.1.0",
|
|
@@ -61,28 +61,29 @@
|
|
|
61
61
|
"@hapi/hapi": "21.4.10",
|
|
62
62
|
"@hapi/inert": "7.1.2",
|
|
63
63
|
"@hapi/vision": "7.0.3",
|
|
64
|
+
"@msgpack/msgpack": "3.1.3",
|
|
64
65
|
"@phc/pbkdf2": "1.1.14",
|
|
65
66
|
"@postalsys/bounce-classifier": "3.0.0",
|
|
66
|
-
"@postalsys/certs": "1.0.
|
|
67
|
+
"@postalsys/certs": "1.0.17",
|
|
67
68
|
"@postalsys/ee-client": "1.7.0",
|
|
68
|
-
"@postalsys/email-ai-tools": "1.13.
|
|
69
|
-
"@postalsys/email-content": "0.1.
|
|
70
|
-
"@postalsys/email-text-tools": "2.4.
|
|
69
|
+
"@postalsys/email-ai-tools": "1.13.18",
|
|
70
|
+
"@postalsys/email-content": "0.1.3",
|
|
71
|
+
"@postalsys/email-text-tools": "2.4.13",
|
|
71
72
|
"@postalsys/gettext": "4.1.1",
|
|
72
73
|
"@postalsys/joi-messages": "1.0.5",
|
|
73
|
-
"@postalsys/templates": "2.0.
|
|
74
|
-
"@sentry/node": "10.
|
|
74
|
+
"@postalsys/templates": "2.0.2",
|
|
75
|
+
"@sentry/node": "10.70.0",
|
|
75
76
|
"@simplewebauthn/browser": "13.3.0",
|
|
76
77
|
"@simplewebauthn/server": "13.3.2",
|
|
77
|
-
"@zone-eu/mailsplit": "5.4.
|
|
78
|
+
"@zone-eu/mailsplit": "5.4.15",
|
|
78
79
|
"@zone-eu/wild-config": "1.7.6",
|
|
79
80
|
"ace-builds": "1.44.0",
|
|
80
|
-
"
|
|
81
|
-
"bullmq": "5.81.3",
|
|
81
|
+
"bullmq": "6.1.2",
|
|
82
82
|
"compare-versions": "6.1.1",
|
|
83
83
|
"dotenv": "17.4.2",
|
|
84
84
|
"encoding-japanese": "2.2.0",
|
|
85
85
|
"exponential-backoff": "3.1.3",
|
|
86
|
+
"fast-xml-parser": "5.11.0",
|
|
86
87
|
"gettext-parser": "7.0.1",
|
|
87
88
|
"handlebars": "4.7.9",
|
|
88
89
|
"hapi-auth-bearer-token": "8.0.0",
|
|
@@ -91,33 +92,30 @@
|
|
|
91
92
|
"html-to-text": "10.0.0",
|
|
92
93
|
"ical.js": "1.5.0",
|
|
93
94
|
"iconv-lite": "0.7.3",
|
|
94
|
-
"imapflow": "1.
|
|
95
|
+
"imapflow": "1.7.1",
|
|
95
96
|
"ioredfour": "1.4.2",
|
|
96
|
-
"ioredis": "
|
|
97
|
-
"ipaddr.js": "2.
|
|
97
|
+
"ioredis": "6.0.0",
|
|
98
|
+
"ipaddr.js": "2.5.0",
|
|
98
99
|
"joi": "18.2.3",
|
|
99
100
|
"libbase64": "1.3.0",
|
|
100
|
-
"libmime": "5.4.
|
|
101
|
+
"libmime": "5.4.2",
|
|
101
102
|
"libqp": "2.1.1",
|
|
102
|
-
"mailparser": "3.9.
|
|
103
|
+
"mailparser": "3.9.15",
|
|
103
104
|
"marked": "15.0.12",
|
|
104
105
|
"minimist": "1.2.8",
|
|
105
|
-
"msgpack5": "6.0.2",
|
|
106
106
|
"murmurhash": "2.0.1",
|
|
107
|
-
"nanoid": "3.3.
|
|
108
|
-
"nodemailer": "9.0.
|
|
107
|
+
"nanoid": "3.3.18",
|
|
108
|
+
"nodemailer": "9.0.5",
|
|
109
109
|
"pino": "10.3.1",
|
|
110
110
|
"prom-client": "15.1.3",
|
|
111
111
|
"psl": "1.15.0",
|
|
112
|
-
"pubface": "1.1.
|
|
112
|
+
"pubface": "1.1.6",
|
|
113
113
|
"punycode.js": "2.3.1",
|
|
114
114
|
"qrcode": "1.5.4",
|
|
115
|
-
"smtp-server": "3.19.
|
|
115
|
+
"smtp-server": "3.19.3",
|
|
116
116
|
"socks": "2.8.9",
|
|
117
|
-
"speakeasy": "2.0.0",
|
|
118
117
|
"timezones-list": "3.1.0",
|
|
119
|
-
"undici": "7.29.0"
|
|
120
|
-
"xml2js": "0.6.2"
|
|
118
|
+
"undici": "7.29.0"
|
|
121
119
|
},
|
|
122
120
|
"devDependencies": {
|
|
123
121
|
"@eslint/js": "10.0.1",
|
|
@@ -129,7 +127,7 @@
|
|
|
129
127
|
"acorn-walk": "8.3.5",
|
|
130
128
|
"chai": "4.5.0",
|
|
131
129
|
"eerawlog": "1.5.5",
|
|
132
|
-
"eslint": "10.8.
|
|
130
|
+
"eslint": "10.8.1",
|
|
133
131
|
"flyonui": "2.4.1",
|
|
134
132
|
"pino-pretty": "13.1.3",
|
|
135
133
|
"prettier": "3.9.6",
|
|
@@ -140,7 +138,8 @@
|
|
|
140
138
|
"xgettext-template": "5.0.0"
|
|
141
139
|
},
|
|
142
140
|
"overrides": {
|
|
143
|
-
"@asamuzakjp/css-color": "4.1.1"
|
|
141
|
+
"@asamuzakjp/css-color": "4.1.1",
|
|
142
|
+
"deepmerge-ts": "^8.0.1"
|
|
144
143
|
},
|
|
145
144
|
"engines": {
|
|
146
145
|
"node": ">=20.x"
|