Problem Statement and Email Gateway Placement
Problem Statement and Email Gateway Placement — email security gateway system design section.
Problem Statement and Email Gateway Placement
SMTP sessions arrive at regional MTA pools. Each message is normalized to a canonical envelope (headers, MIME tree hash, attachment manifest). Cheap checks run first: RBL, SPF/DKIM/DMARC alignment, known-good allowlists. Suspicious MIME branches to sandbox queues; URL links are rewritten for time-of-click analysis.
Design anchors (1)
- MX records point to your gateway cluster before mail reaches Google Workspace or Exchange.
- Separate inbound inspection (spam, phishing, malware) from outbound DLP (data loss, encryption policy).
- Quarantine is a first-class workflow—users and SOC must release with audit, not shadow-delete.
Failure drills
If AV engine farm is degraded, degrade to single-engine scan with longer queue delay—never pass unscanned executables. If DMARC strict policy blocks legitimate forwarders, route to admin review bucket with 72h TTL. If click-time proxy is down, strip rewrite and block external links in HTML bodies for high-risk tenants.
Cost and capacity
At 8M messages/day inbound, CPU is dominated by MIME recursion and sandbox VM minutes—not SMTP handshake.
| Signal | Target |
|---|---|
| Peak msg/s | 120 /s |
| Avg size | 85 KB |
| Quarantine | 2.1 % |
| FP budget | 0.05 % |
1 public record MailVerdict(String tenantId, String policyVersion, String disposition, int ruleId) { 2 public boolean requiresQuarantine() { return "quarantine".equals(disposition); } 3 }
1 def dmarc_aligned(spf: str, dkim: str, policy: str) -> bool: 2 return spf == "pass" and dkim == "pass" and policy != "reject"
1 export interface NormalizedEnvelope { 2 messageId: string; 3 fromDomain: string; 4 mimeParts: number; 5 } 6 export function cacheKey(tenantId: string, env: NormalizedEnvelope): string { 7 return `${tenantId}:${env.messageId}:${env.mimeParts}`; 8 }
Why interviewers care
Email Security Gateway interviews reward crisp scope, explicit trade-offs, and failure stories—not generic microservice diagrams.
Interview checkpoint
Name one failure story for Problem Statement and Email Gateway Placement that proves you understand real outages, not happy-path diagrams.
Key Highlights
- •MX records point to your gateway cluster before mail reaches Google Workspace or
- •Metrics: Peak msg/s, Avg size, Quarantine, FP budget
- •Separate **inbound inspection** (spam, phishing, malware) fr
Section Rescue Kit
Buzzwords to use:
Safe statements:
- "SMTP 250 means queued—not clean—for ingress paths."
- "I never bypass sandbox for executable attachments without recorded risk acceptance."
- "Quarantine release is MFA-gated, idempotent, and append-only in the ledger."