HeadlinesBriefing favicon HeadlinesBriefing.com

Posthorn: Self-hosted email gateway for VPS operators

Hacker News •
×

Craig McCaskill built Posthorn after repeatedly hitting the same wall: VPS providers like DigitalOcean block outbound SMTP ports, and self-hosted apps each need their own email integration. Posthorn is a Go-based gateway that sits between self-hosted apps and transactional providers. One Docker container, one TOML config, one set of credentials.

It supports three ingress modes: HTTP form submissions for contact forms, a JSON HTTP API with Bearer auth for cron jobs and workers, and an SMTP listener for apps like Ghost, Gitea, and Mastodon. Providers include Postmark, Resend, Mailgun, AWS SES, or any outbound SMTP relay. Security layers include honeypot fields, origin checks, and IP rate limiting.

The tool consolidates what was previously duplicated across stacks. Apps like Hugo, Umami, and Cloudflare Workers no longer need independent API key management. Posthorn parses MIME from SMTP, templates emails from forms, and enforces rate limits per endpoint. Open source under Apache 2.0, it's available now on GitHub and documented at posthorn.dev.