How One Developer Built a Catch-All Email Alias System Using Haraka, SRS, and DKIM
A developer has detailed the engineering behind a catch-all email aliasing system that automatically creates a new alias the moment the first email arrives, eliminating the need to pre-register addresses. The system uses a personal subdomain where any local-part — such as amazon@you.example.com or github@you.example.com — is treated as a valid recipient. Haraka, a Node.js SMTP server, handles inbound mail and consults an internal API to decide whether to forward, reject, or temporarily fail each message, with a fail-closed approach to prevent open relay abuse. To avoid SPF failures that arise from naive email forwarding, the system implements Sender Rewriting Scheme (SRS) to rewrite the envelope sender, while DKIM signing ensures outbound messages pass authentication checks. Postgres stores only user, alias, and metadata records, with message content never saved — mail is forwarded immediately to the user's real inbox.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in