DEV Community

Elder Fernandes
Elder Fernandes

Posted on Originally published at selfhoststack-8z4.pages.dev

Self-Hosted Email in 2026: Ditch Mailchimp & SendGrid with Listmonk + Stalwart

If you run a SaaS, newsletter, or growing e-commerce project, you already know the SaaS email tax:

  • Mailchimp: Jumps from $20/mo to $350+/mo once your subscriber list crosses 50,000 contacts—even if you only send one monthly newsletter.
  • SendGrid / Mailgun / Postmark: Charge aggressive tier rates for transactional receipts, password resets, and user alerts, with sudden pricing hikes on volume.

In 2026, self-hosting your email marketing engine and transactional relay is easier and more reliable than ever. With Listmonk (for newsletters & campaign analytics) and Stalwart (or Postal/Mailpit for mail routing), you can send millions of emails effortlessly on a standard $4/mo Hetzner VPS or DigitalOcean Droplet.

Here is our production blueprint for replacing Mailchimp, SendGrid, and Substack with open-source software.


The Architecture: Why Listmonk + Stalwart?

1. Listmonk (High-Performance Newsletter & Campaign Engine)

  • Built in Go & PostgreSQL: Blazingly fast, sending over 10,000 emails per minute on a single CPU core.
  • Privacy First: Self-hosted subscriber lists with zero third-party tracking cookies or external data leaks.
  • Dynamic Templating & REST API: Full programmatic automation for transactional notifications or RSS-to-email digests.
  • Memory Footprint: Less than 60 MB RAM.

2. Stalwart All-in-One Mail Server

  • Rust-powered Modern Architecture: Implements JMAP, IMAP4, POP3, and SMTP with native support for SPF, DKIM, DMARC, ARC, and Sieve filtering.
  • Zero Overhead: Replaces legacy Postfix + Dovecot + SpamAssassin setups with a single memory-safe binary.

Production Docker Compose Blueprint

Below is a complete, production-ready docker-compose.yml to spin up Listmonk with PostgreSQL on Docker:

version: '3.8'

services:
  listmonk-db:
    image: postgres:16-alpine
    container_name: listmonk-db
    restart: unless-stopped
    environment:
      POSTGRES_USER: listmonk
      POSTGRES_PASSWORD: listmonk_super_secure_pass_2026
      POSTGRES_DB: listmonk
    volumes:
      - listmonk_db_data:/var/lib/postgresql/data
    networks:
      - internal-net

  listmonk:
    image: listmonk/listmonk:latest
    container_name: listmonk-app
    restart: unless-stopped
    ports:
      - "9000:9000"
    environment:
      - LISTMONK_db__host=listmonk-db
      - LISTMONK_db__port=5432
      - LISTMONK_db__user=listmonk
      - LISTMONK_db__password=listmonk_super_secure_pass_2026
      - LISTMONK_db__database=listmonk
      - LISTMONK_db__ssl_mode=disable
      - LISTMONK_app__address=0.0.0.0:9000
    depends_on:
      - listmonk-db
    networks:
      - internal-net

networks:
  internal-net:
    driver: bridge

volumes:
  listmonk_db_data:
Enter fullscreen mode Exit fullscreen mode

Initial DB Setup Step

Before starting the Listmonk web app for the first time, generate the database tables:

docker compose run --rm listmonk ./listmonk --install --yes
docker compose up -d
Enter fullscreen mode Exit fullscreen mode

Your Listmonk admin panel is immediately accessible at http://your-server-ip:9000 (default login: admin / listmonk).


Ensuring 10/10 Email Deliverability: DNS Checklist

When sending emails from your own infrastructure or combining Listmonk with an SMTP relay (like Amazon SES, Postmark, or Stalwart), configure these DNS records:

  1. SPF (Sender Policy Framework):
   v=spf1 include:_spf.yourrelay.com ~all
Enter fullscreen mode Exit fullscreen mode
  1. DKIM (DomainKeys Identified Mail): 2048-bit cryptographic key signing header.
  2. DMARC:
   v=DMARC1; p=quarantine; rua=mailto:dmarc-reports@yourdomain.com; pct=100
Enter fullscreen mode Exit fullscreen mode
  1. Custom Tracking Subdomain: Set up links.yourdomain.com pointing to Listmonk via Caddy/Traefik reverse proxy to avoid spam-filter link reputation penalties.

Cost Comparison: Annual Savings

Metric / Scale Mailchimp / SendGrid SaaS Self-Hosted Listmonk + Hetzner VPS Annual Savings
25,000 Subscribers ~$350/mo ($4,200/yr) €3.79/mo (~$49/yr) $4,151 / year
100,000 Subscribers ~$750/mo ($9,000/yr) €7.58/mo (~$98/yr) $8,902 / year
500,000 Emails/mo ~$400/mo ($4,800/yr) Amazon SES ($50) + VPS ($5) $4,140 / year

Discover More Open-Source Stacks

Explore verified deployment guides, hardware requirements, and interactive Docker Compose configs for 80+ software categories on SelfHostStack:

Top comments (0)