emailengine-app 2.83.1 → 2.84.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/.release-please-manifest.json +1 -1
- package/CHANGELOG.md +30 -0
- package/README.md +1 -1
- package/SECURITY.md +126 -47
- package/data/google-crawlers.json +1 -1
- package/gettext-extract.js +95 -15
- package/lib/api-routes/outbox-routes.js +132 -9
- package/lib/api-routes/permission-map.js +11 -1
- package/lib/consts.js +3 -5
- package/lib/email-client/base-client.js +44 -20
- package/lib/email-client/credential-errors.js +3 -31
- package/lib/email-client/imap/idle-settings.js +44 -0
- package/lib/email-client/imap/mailbox.js +19 -7
- package/lib/email-client/imap-client.js +3 -21
- package/lib/email-client/smtp-pool-manager.js +25 -6
- package/lib/enum-descriptions.js +7 -0
- package/lib/export.js +46 -42
- package/lib/field-usage.js +4 -0
- package/lib/handlebars-helpers.js +4 -0
- package/lib/imapproxy/imap-core/lib/commands/starttls.js +4 -2
- package/lib/imapproxy/imap-core/lib/imap-server.js +44 -11
- package/lib/imapproxy/proxy-handoff.js +10 -1
- package/lib/logger.js +3 -2
- package/lib/message-port-stream.js +23 -0
- package/lib/network-errors.js +50 -0
- package/lib/oauth/gmail.js +5 -1
- package/lib/oauth/mail-ru.js +5 -1
- package/lib/oauth/outlook.js +5 -1
- package/lib/oauth/pubsub/google.js +3 -2
- package/lib/oauth/token-fetch.js +2 -3
- package/lib/outbox.js +338 -10
- package/lib/queue-browser/definitions.js +132 -0
- package/lib/queue-browser/format.js +387 -0
- package/lib/queue-browser/index.js +568 -0
- package/lib/queue-job-actions.js +75 -0
- package/lib/queue-retention.js +53 -1
- package/lib/routes-ui.js +5 -0
- package/lib/schemas.js +42 -2
- package/lib/security-headers.js +2 -24
- package/lib/sub-script.js +10 -3
- package/lib/token-permission-view.js +1 -1
- package/lib/tools.js +16 -2
- package/lib/ui-routes/account-routes.js +6 -0
- package/lib/ui-routes/imap-idle-field.js +42 -0
- package/lib/ui-routes/queue-routes.js +371 -0
- package/lib/utils/status-error.js +21 -0
- package/package.json +18 -20
- package/prepare-bundle-deps.sh +1 -1
- package/sbom.json +1 -1
- package/server.js +10 -0
- package/static/css/flyonui.css +1 -1
- package/static/css/src/app.tailwind.css +2 -0
- package/static/js/queues.js +117 -0
- package/static/licenses.html +127 -251
- package/translations/README.md +3 -2
- package/translations/messages.pot +280 -265
- package/views/accounts/account.hbs +31 -0
- package/views/accounts/edit.hbs +2 -0
- package/views/config/service.hbs +1 -2
- package/views/dashboard.hbs +2 -2
- package/views/partials/queue_cell_account.hbs +20 -0
- package/views/partials/queue_cell_failure.hbs +6 -0
- package/views/partials/queue_clean_items.hbs +9 -0
- package/views/partials/queue_clean_modal.hbs +9 -0
- package/views/partials/queue_entry_actions.hbs +41 -0
- package/views/partials/queue_job_actions.hbs +15 -0
- package/views/partials/queue_pause_controls.hbs +18 -0
- package/views/partials/queue_retention_note.hbs +49 -0
- package/views/partials/queue_rows_export.hbs +58 -0
- package/views/partials/queue_rows_notify.hbs +73 -0
- package/views/partials/queue_rows_submit.hbs +70 -0
- package/views/partials/side_menu.hbs +1 -1
- package/views/partials/ui/tooltip.hbs +5 -3
- package/views/queues/index.hbs +104 -0
- package/views/queues/job.hbs +224 -0
- package/views/queues/queue.hbs +93 -0
- package/views/webhooks/webhook.hbs +3 -0
- package/workers/api.js +0 -4
- package/workers/imap.js +10 -3
- package/workers/smtp.js +16 -1
- package/workers/submit.js +19 -5
- package/workers/webhooks.js +13 -0
- package/lib/api-routes/bull-board-routes.js +0 -56
package/server.js
CHANGED
|
@@ -118,6 +118,7 @@ initSentry('main');
|
|
|
118
118
|
const pathlib = require('path');
|
|
119
119
|
const { redis, queueConf, notifyQueue, submitQueue, exportQueue, logBullErrors } = require('./lib/db');
|
|
120
120
|
const { queueStats } = require('./lib/queue-stats');
|
|
121
|
+
const { pruneFailedContent } = require('./lib/outbox');
|
|
121
122
|
const { packRpcError, unpackRpcError } = require('./lib/worker-rpc-error');
|
|
122
123
|
const promClient = require('prom-client');
|
|
123
124
|
const fs = require('fs').promises;
|
|
@@ -3731,6 +3732,15 @@ startApplication()
|
|
|
3731
3732
|
logger.error({ msg: 'Queue cleanup failed', queue: queue.name, err });
|
|
3732
3733
|
}
|
|
3733
3734
|
}
|
|
3735
|
+
|
|
3736
|
+
// The content kept for retrying failed messages follows the failed jobs it belongs
|
|
3737
|
+
// to: whatever the clean above removed, and whatever aged out, is dropped here
|
|
3738
|
+
try {
|
|
3739
|
+
const pruned = await pruneFailedContent({ logger });
|
|
3740
|
+
logger.trace({ msg: 'Failed message content pruned', ...pruned });
|
|
3741
|
+
} catch (err) {
|
|
3742
|
+
logger.error({ msg: 'Failed to prune the content of failed messages', err });
|
|
3743
|
+
}
|
|
3734
3744
|
}
|
|
3735
3745
|
|
|
3736
3746
|
const queueCleanupTimer = setInterval(cleanupQueues, QUEUE_CLEANUP_INTERVAL);
|