Show HN: Posthorn, self-hosted mail without the mail server

Published: (May 27, 2026 at 12:26 AM EDT)
2 min read

Source: Hacker News

Introduction

Introducing Posthorn, a self‑hosted email gateway. It runs as a single Docker container (or a Go binary) that sits between your self‑hosted applications on a VPS and your transactional email provider. Set up Posthorn once, point your apps to it, and you’re done.

The Problem

Many VPS providers (e.g., DigitalOcean) block the default SMTP ports to combat abuse. This forces developers to:

  • Deploy a custom Postfix relay just to send mail from apps like Ghost.
  • Use third‑party services (e.g., Formspree) for static‑site contact forms, which often hit usage limits or lack needed anti‑spam features.
  • Re‑implement the same email‑sending logic across multiple services (Gitea, Mastodon, Umami, Comentario, etc.), each hitting the same SMTP restrictions.

These recurring issues lack a simple, unified solution.

What Posthorn Does

Posthorn is a small Go binary (≈10 MB Docker image) that acts as a gateway between your applications and your chosen transactional email provider. It supports:

  • Providers: Postmark, Resend, Mailgun, Amazon SES, or any outbound SMTP relay.
  • HTML form handling: Accepts POST requests from static‑site contact forms, adding security layers such as honeypot fields, origin checks, and IP rate limiting.
  • JSON HTTP API: A /send endpoint secured with Bearer authentication for backend scripts or cron jobs.

Features at a Glance

FeatureDescription
Single binary / Docker imageEasy deployment on any VPS.
Multi‑provider supportSwitch providers without changing app code.
Form POST handlingBuilt‑in anti‑spam (honeypot, origin, rate limiting).
Bearer‑auth JSON APISimple /send endpoint for scripts.
Open sourceLicensed under Apache 2.0; contributions welcome.

Usage

  1. Deploy the Docker container or run the Go binary.
  2. Configure your provider credentials (Postmark, Resend, Mailgun, SES, or SMTP).
  3. Point your applications (or static‑site forms) to the Posthorn endpoint.
  4. Send mail via the JSON API or standard SMTP relay.
  • Source code:
  • Documentation:
  • Longer write‑up:
  • HN discussion of the problem:
  • Comments on this post:
0 views
Back to Blog

Related posts

Read more »