NubMail
A self-hosted mail stack — Postfix out, Dovecot for IMAP and POP3, a hand-written SMTP receiver in — with a dashboard for domains, mailboxes and API sending.
- Project
- Mail infrastructure
- Language
- TypeScript
- Started
- 2025-10
The story
NubMail exists because transactional email vendors are a recurring tax on small projects, and because I wanted to know what is actually involved. The answer is: more than the pricing pages suggest, and less than the folklore.
The dashboard is Next.js and React 19 — configure DNS records, create mailboxes, delegate access to a team, send programmatically over REST. Behind it, Postfix handles delivery and DKIM signing, Dovecot handles client sync, and a small Node receiver handles ingress so I control parsing and storage rather than shelling out to a delivery agent.
Deliverability is the whole game, so the SPF, DKIM and DMARC verification tooling is not a nicety — it is the difference between working software and a spam folder.
Under the hood
The decisions that make it work.
- Inbound
- A Node SMTP receiver on the ingress port parses RFC 5322 messages directly instead of handing off to a local delivery agent.
- Outbound
- Postfix relay with DKIM signing, plus tooling to check that a domain's SPF and DMARC records actually resolve before mail starts flowing.
- Client access
- Dovecot serves standard IMAP and POP3, so existing mail clients sync without a bespoke protocol.
- Durability
- PostgreSQL for mailboxes and metadata, with nightly encrypted snapshots pushed off-box to B2 or R2 via rclone.