A detailed walkthrough of a hybrid self-hosted email architecture that stores mailboxes locally using Stalwart (a Rust-based all-in-one mail server) while delegating outbound sending reputation to Cloudflare Email Sending. The setup uses a VPS with HAProxy as a public-facing SMTP proxy forwarding to a home server over Tailscale, avoiding the IP reputation pitfalls of residential outbound mail. Key topics covered include the inbound/outbound split rationale, DNS management with OpenTofu, mailbox migration from Fastmail using imapsync, handling home connection outages via SMTP retry semantics, and a comprehensive monitoring stack using Prometheus, Blackbox exporter, Gatus, and Loki.

10m read timeFrom blog.iodev.org
Post cover image
Table of contents
Why move away from hosted mail?Stalwart changes the self-hosting calculationInbound and outbound mail are different problemsThe split architectureWhat happens when the home connection goes down?DNS is configuration, not a checklistMigrating the mailboxMonitoring mail as a pipelineWhat this replaces, and what it does not
10K Impressions