no markAsBlocked,

This commit is contained in:
2026-04-12 20:43:37 -05:00
parent bed6c2a398
commit 9862689c0c

View File

@@ -26,7 +26,7 @@ import { BlocklistChecker } from '../email/blocklist.js';
import { BounceHandler } from '../email/bounce-handler.js'; import { BounceHandler } from '../email/bounce-handler.js';
import { parseEmail, isProcessedByWorker } from '../email/parser.js'; import { parseEmail, isProcessedByWorker } from '../email/parser.js';
import { RulesProcessor } from '../email/rules-processor.js'; import { RulesProcessor } from '../email/rules-processor.js';
import { config } from '../config.js';
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
// Processor // Processor
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
@@ -258,7 +258,8 @@ export class MessageProcessor {
if (totalHandled === recipients.length) { if (totalHandled === recipients.length) {
if (blockedRecipients.length === recipients.length) { if (blockedRecipients.length === recipients.length) {
// All blocked // All blocked — im Standby kein S3 anfassen
if (!config.standbyMode) {
try { try {
await this.s3.markAsBlocked( await this.s3.markAsBlocked(
domain, domain,
@@ -272,14 +273,18 @@ export class MessageProcessor {
log(`⚠ Failed to handle blocked email: ${err.message ?? err}`, 'ERROR', workerName); log(`⚠ Failed to handle blocked email: ${err.message ?? err}`, 'ERROR', workerName);
return false; return false;
} }
}
} else if (successful.length > 0) { } else if (successful.length > 0) {
if (!config.standbyMode) {
await this.s3.markAsProcessed( await this.s3.markAsProcessed(
domain, domain,
messageId, messageId,
workerName, workerName,
failedPermanent.length > 0 ? failedPermanent : undefined, failedPermanent.length > 0 ? failedPermanent : undefined,
); );
}
} else if (failedPermanent.length > 0) { } else if (failedPermanent.length > 0) {
if (!config.standbyMode) {
await this.s3.markAsAllInvalid( await this.s3.markAsAllInvalid(
domain, domain,
messageId, messageId,
@@ -287,6 +292,7 @@ export class MessageProcessor {
workerName, workerName,
); );
} }
}
// Summary // Summary
const parts: string[] = []; const parts: string[] = [];