SMTP Black Hole
A developer-facing email capture system built on AWS for MerchantE — intercept, store, and inspect outbound application emails via web UI or API.
The Problem
MerchantE's development and QA teams needed to test email-sending features without delivering real messages. Existing solutions either cost money per seat, require hosted SaaS dependencies, or lack API access for automated test suites.
The Solution
A self-hosted SMTP endpoint that accepts all inbound mail and silently captures it — a "black hole" that swallows every message and makes it available for inspection. Developers point their application's SMTP config at the server and every outbound email is captured, stored, and browsable.
How It Works
What I Built
Postfix on an EC2 Linux instance configured as a catch-all mail server. A custom script hooks into Postfix's delivery pipeline, extracts the message contents, and writes them as text files to an S3 bucket.
On the read side, a Python Lambda function serves both a web interface for developers to browse captured emails and a REST API that automated test suites can query to verify email delivery, content, and formatting.
Technology
Mail Server
Postfix on EC2 Linux — configured as a catch-all SMTP endpoint
Capture Pipeline
Custom scripts piping mail content from Postfix to S3 as text files
Storage
Amazon S3 — durable, cheap storage for captured messages
Viewer & API
Python Lambda — web UI for browsing and REST API for automated tests
A lightweight, self-hosted alternative to paid email testing services — built entirely on AWS for MerchantE with no per-seat costs, full API access for CI/CD pipelines, and zero risk of leaking test emails to real recipients.