SelfHostStackOpen-Source Directory

Why Migrate Away from SendGrid, Mailgun & Postmark?

Cloud email delivery services charge steep rates per 10,000 emails and frequently freeze transactional deliveries over false positive heuristics. Self-hosting Postal or Stalwart on your own VPS with custom rDNS/SPF/DKIM/DMARC gives you 100% control over outbound deliveries, unmetered monthly email volume, granular SMTP click/open telemetry, and zero vendor lock-in.

Top 2 Recommended Open-Source Replacements

Tested, self-contained, and production-ready. Click any tool to inspect verified docker-compose configurations, hardware sizing, and deployment guides.

Postal

GPL-3.0⭐ 16.5k+

A fully featured, self-hosted transactional mail platform like SendGrid or Mailgun.

Min RAM2 GB
Min CPU2 vCPU
GitHub Repo ↗

✅ Advantages

  • Drop-in transactional email replacement for SendGrid, Postmark, and Mailgun
  • Detailed live message inspect, raw header views, and bounce analysis
  • Unmetered email sending with zero cost per thousand emails

⚠️ Trade-offs / Limitations

  • Requires properly configured DNS records (rDNS, SPF, DKIM) on VPS for optimal inbox delivery

Core Features

Complete web administrative UI for mail servers, send tracking, and deliverability logs
Full REST API and standard SMTP relay endpoint for application integration
Automated click tracking, open tracking, bounce processing, and unsubscribes
Support for multiple mail servers, custom domains, and sender pools
Real-time webhook events for delivery statuses and bounces
📄 docker-compose.yml
Production Ready
version: '3.8'
services:
  postal-web:
    image: ghcr.io/postalserver/postal:latest
    restart: always
    ports:
      - "5000:5000"
    environment:
      - POSTAL_CONFIG_ROOT=/config
    volumes:
      - ./config:/config
  postal-smtp:
    image: ghcr.io/postalserver/postal:latest
    restart: always
    ports:
      - "25:25"
    command: postal smtp-server

🚀 5-Minute Deployment Guide

  1. 1Spin up a 2GB+ VPS with clean reverse DNS (Hetzner CX22 or DigitalOcean).
  2. 2Install Postal CLI helper and generate TLS certificates via Let's Encrypt.
  3. 3Configure DNS records: MX, SPF (v=spf1 ...), DKIM public key, and DMARC policy.
  4. 4Access Postal web console on port 5000 to create mail servers and generate API keys.
  5. 5Point your application's SMTP or HTTP mail client to your Postal VPS.

Recommended Cloud VPS for Postal

Compare all VPS hosts →
Hetzner Cloud€3.79 / month

CX22 (2 vCPU, 4GB RAM, 40GB NVMe)

Clean IP reputation and customizable reverse DNS (rDNS) for high deliverability.

Deploy on Hetzner →
DigitalOcean$12.00 / month

Basic Droplet (2 vCPU, 2GB RAM, 60GB SSD)

Reliable global network with automated floating IPs and SMTP port unblocking on request.

Claim $200 DO Credit →

Stalwart Mail Server

AGPL-3.0⭐ 7.8k+

Ultra-fast, secure, all-in-one modern mail server written in Rust with JMAP, IMAP, and SMTP support.

Min RAM512 MB
Min CPU1 vCPU
GitHub Repo ↗

✅ Advantages

  • Extremely low memory and CPU footprint compared to Java or Python mail servers
  • Native JMAP protocol support alongside classic IMAP/SMTP
  • Modern unified configuration without wrestling postfix + dovecot + rspamd

⚠️ Trade-offs / Limitations

  • Newer codebase compared to 20-year-old Postfix/Dovecot stacks

Core Features

All-in-one architecture: SMTP, JMAP, IMAP4, LMTP, and built-in web management console
Automated Let's Encrypt ACME TLS certificates and integrated DMARC, DKIM, SPF, ARC validation
Built-in anti-spam filter engine, DNSBL checks, and rate-limiting
Zero-overhead Rust binary using less than 100MB of RAM at idle
Integrated full-text search with multilingual support and SQLite / RocksDB backend
📄 docker-compose.yml
Production Ready
version: '3.8'
services:
  stalwart-mail:
    image: stalwartlabs/mail-server:latest
    restart: always
    ports:
      - "25:25"
      - "465:465"
      - "587:587"
      - "993:993"
      - "8080:8080"
    volumes:
      - stalwart_data:/opt/stalwart-mail
volumes:
  stalwart_data:

🚀 5-Minute Deployment Guide

  1. 1Provision a lightweight VPS (Hetzner CX22 or Vultr 1GB Cloud Compute).
  2. 2Start Stalwart Mail Server with docker compose up -d.
  3. 3Open web administrator at http://your-server-ip:8080 to complete the setup wizard.
  4. 4Configure domain DNS records (SPF, DKIM, DMARC, MX) as displayed in the admin panel.
  5. 5Create email accounts or generate transactional SMTP relay credentials.

Recommended Cloud VPS for Stalwart Mail Server

Compare all VPS hosts →
Hetzner Cloud€3.79 / month

CX22 (2 vCPU, 4GB RAM, 40GB NVMe)

High performance Rust execution with low memory consumption and high NVMe IOPS.

Deploy on Hetzner →

Quick Specification Matrix

ToolLicenseMin RAMMin CPUGitHub RepoPrimary Advantage
SendGrid, Mailgun & Postmark (Proprietary)Proprietary ClosedManaged CloudManaged CloudN/ATurnkey onboarding with vendor lock-in & paywalls
PostalGPL-3.02 GB2 vCPUpostalserver/postalDrop-in transactional email replacement for SendGrid, Postmark, and Mailgun
Stalwart Mail ServerAGPL-3.0512 MB1 vCPUstalwartlabs/mail-serverExtremely low memory and CPU footprint compared to Java or Python mail servers
Starter Stack Pack — $29

Skip the setup: get the production-ready stack

Don't stitch together configs from five different READMEs. Get all 5 production-hardened Docker Compose stacks — Postgres, Redis, SSL auto-renewal, and backup scripts — ready to deploy in minutes.

n8nVisual workflow automation
📊UmamiPrivacy-first web analytics
🛡️Uptime KumaUptime monitoring & alerts
🔐VaultwardenBitwarden-compatible vault
☁️NextcloudDropbox/Drive replacement
Get the Stack Pack — $29 →

One-time purchase · Instant download · Production-ready

esc
navigate open