ESP failover mechanism exists
Why it matters
When a primary ESP goes down — API timeout, account suspension, or DNS failure — email stops. Without automatic failover to a secondary ESP, every email queued during the outage either fails permanently or waits for manual operator intervention. CWE-391 (insufficient logging of errors) compounds the problem: a silent primary failure with no secondary means transactional emails — password resets, order confirmations — are silently dropped. The Sending Pipeline & Infrastructure Audit verifies queue resilience; this check verifies that the ESP layer itself has a recovery path that does not require a human in the loop.
Severity rationale
Critical because a single-ESP architecture converts any ESP outage into a complete email blackout — no transactional sends, no recovery path until the outage resolves.
Remediation
Implement automatic failover in your ESP router (e.g., src/lib/email/router.ts) so primary failures trigger the secondary without operator action:
async function sendWithFailover(message: EmailMessage): Promise<void> {
try {
await primaryEsp.send(message)
} catch (primaryErr) {
logger.warn({ err: primaryErr }, 'Primary ESP failed — attempting failover')
await secondaryEsp.send(message)
metrics.increment('esp_failover_used')
}
}
Both ESPs must have valid credentials loaded from environment variables. Manual failover — where an operator must change an env var and redeploy — does not satisfy this check.
DetectionPro
The detection method for this pattern is part of AuditBuffet Pro.
The full method (what to look for, pass and fail conditions, and how results get reported) ships inside the Operational Resilience (Email) Audit. The pattern definition, severity rationale, and remediation remain openly licensed under CC-BY-4.0.
External references
- cwe · CWE-391 — Unchecked Error Condition — ESP failure has no failover path
- iso-25010:2011 · reliability.fault-tolerance — Reliability / Fault Tolerance — system must continue operating when primary ESP fails
Taxons
History
- 2026-04-18·v1.0.0·Initial import from operational-resilience-email·automated