The problem with giving strangers your real address
Every vendor trial, every forum, every “enter your email to download the datasheet” form is a small gamble. Plus-addressing (gary+vendor@example.com) is the usual compromise, and it works — until the day one of those vendors strips the tag and sells the address anyway. Now your real domain is on a marketing list that outlives the vendor. The other option, a public temp-mail service, is worse: the inbox is shared with everyone else using it, the domains are on every blocklist in existence, and the mails sit in someone else’s logs until their retention policy says otherwise.
There’s a third option that homelab people keep sleeping on: run the disposable address service yourself, on a domain you control and don’t otherwise care about. OpenTrashmail caught my eye because it’s the rare mail-adjacent project that doesn’t demand a week of your life. It ships its own mail server — a Python SMTP daemon — plus a web UI, and it stores everything as flat files. No Postfix, no Dovecot, no database. That’s the right amount of mail server for a job that’s supposed to be disposable.
What it actually does
OpenTrashmail is a catch-all inbox for a domain you point at it. You set an MX record, expose port 25, and from that moment every address on the domain works — vendorx@burn.example.com, random-nouns@burn.example.com, anything. Nothing to pre-create. Mails land in a web UI with attachments, dark mode, per-address RSS, and delete buttons.
The parts that matter more than they first appear:
- JSON API and RSS for every address. You can script “give me the newest message at this address” — which turns throwaway email from a manual chore into plumbing.
- Webhooks, global or per-address, signed with HMAC-SHA256. A mail arrives, your automation hears about it.
- 100% file-based storage. The data directory is one bind mount. Backing up a burner-mail service is
rsync, not database dumps. - Retention is built in (
DELETE_OLDER_THAN_DAYS), so the whole thing can be self-cleaning.
Why this beats the temp-mail sites
Public temp-mail domains get blocked because they’re public. Your domain gets blocklisted the same way only if you publish it — so don’t. Use it exclusively for your own sign-ups, never paste its addresses into forums, and pick a domain that isn’t your main one. The trade is: a little DNS discipline in exchange for addresses that (a) actually pass sign-up forms, (b) aren’t readable by every other temp-mail user, and (c) can be burned per-vendor because there’s an infinite supply.
The privacy argument is the one I care about most. A throwaway address that routes through someone else’s server isn’t throwaway — it’s theirs. Mine rides a mail daemon whose logs I own, on a box in my rack, and when I nuke the data directory nobody keeps a copy.
Setup: one record, one container
DNS first. Point an MX at a host that runs the container:
mail.burn.example.com. IN A 203.0.113.10
burn.example.com. IN MX 10 mail.burn.example.com.
Then the container. This is close to what I’d run in production — daemonised, persisted, domain-restricted, with cleanup:
docker run -d --restart=unless-stopped --name opentrashmail \
-e DOMAINS="burn.example.com" \
-e SMTP_HOSTNAME="mail.burn.example.com" \
-e DISCARD_UNKNOWN=true \
-e DELETE_OLDER_THAN_DAYS=90 \
-e PASSWORD="something-long" \
-p 80:80 -p 25:25 \
-v /srv/opentrashmail/data:/var/www/opentrashmail/data \
hascheksolutions/opentrashmail:1
If you want subdomain-tagged addresses per vendor family — shopping@retail.burn.example.com — a wildcard MX plus DOMAINS="*.burn.example.com" gets you there. Cute, optional.
The two settings that keep you off blocklists
Here’s where I’d slow down, because this is the part that separates “fun weekend service” from “career-limiting DNS incident”.
Set DISCARD_UNKNOWN=true. With it off, the server accepts mail for any domain, which to the outside world looks exactly like an open relay — the kind of thing that gets your IP onto blacklists your real mail will then suffer for. With it on, the server rejects foreign recipients during the SMTP dialog like a well-behaved MTA.
Host the web UI somewhere else. The project’s own advice is right: put the UI on a different domain than the one receiving mail, guard it with PASSWORD or ALLOWED_IPS (or hide it behind your reverse proxy with auth), and set SMTP_HOSTNAME to match your MX with a matching PTR record. Add STARTTLS with a Let’s Encrypt cert — a mail host that offers no TLS in 2026 looks sketchy to senders and spam filters alike. None of this is hard; it’s just ten minutes of care that most “quick SMTP in Docker” tutorials skip.
The trick that makes it more than a toy
The moment this stopped being a novelty for me was the JSON API. Disposable addresses plus a scriptable inbox equals automated email round-trips: sign up for a service from a script, poll /json/<address> for the confirmation link, done. The project docs even pitch it for capturing 2FA mail programmatically — I’d keep that inside the lab boundary only, because anything that auto-reads auth mail from a shared-ish surface deserves a long think first. But for test environments and CI that need to verify “the mail actually sent”, it’s excellent glue. Webhooks push the same idea further: a signed POST per message, straight into n8n, a Discord channel, or a small receiver script.
There’s also a quiet honeypot mode: set an ADMIN catch-all address and every message to every address is visible from one login. For a lab network where everything is yours anyway, that’s a feature; for anything multi-user, it’s a footgun. Know which one you’re running.
The small business angle
If you run IT for a small outfit, this pattern earns its keep without touching customer data: procurement portals, vendor trials, webinar registrations, “create an account to see the price” — all of it can go to per-vendor burner addresses on your domain. When the marketing spam starts, you know exactly who leaked, and you delete the address instead of unsubscribing from eleven lists. Combined with the retention setting, the data you’re keeping is close to none — and as I keep saying about breaches, mail you no longer have cannot be dumped.
Verdict
OpenTrashmail nails a narrow brief: disposable inbound mail with zero ceremony. It will not replace your mail server, and you shouldn’t ask it to. But as a purpose-built burner domain that you own end to end — scriptable, self-cleaning, one container — it’s earned a slot on my “runs forever, never think about it” list. Give it a spare domain, harden those two settings, and stop handing your real address to strangers.

