Skip to content

CinderHillsDev/dispatch-platform

Repository files navigation

Dispatch SMTP Relay

Self-hosted .NET email relay - forward mail from your apps to any cloud provider

Build Platform

Point your applications and devices at Dispatch over SMTP (the standard ports 25 and 587 by default - it falls back to 2525 only if 25 is already taken) or a Mailgun-compatible HTTP API. Dispatch queues every message durably and forwards it to a dozen providers - Mailgun, SendGrid, Amazon SES, Postmark, Resend, SparkPost, SMTP2GO, Maileroo, Bird, Azure Communication Services - or any SMTP smart host, with a live web dashboard to monitor, configure, and troubleshoot everything.

Dispatch Dashboard Screenshot


Why Dispatch?

Most applications need to send email. Wiring every app directly to a cloud provider means scattered credentials, no central log, and no fallback when a provider has an outage. Dispatch sits in the middle:

Your apps / devices  →  Dispatch SMTP (port 25/587)   ─┐
                                                         ├→  Mailgun / SendGrid / Azure / SMTP …
Your apps / scripts  →  Dispatch API  (port 8025)      ─┘
         ↑                       ↕
    202 / 250 OK instantly   spool directory
    (before any DB or        (durable in-flight queue)
     network call)                  ↕
                              relay_log in PostgreSQL
                              (after-the-fact history)
                                    ↕
                             Web UI (port 8420)
                         Configure · Monitor · Debug
  • 250 OK before anything else - Dispatch writes the message to a local spool file and acknowledges the sender immediately. PostgreSQL is written to only after the provider accepts the message.
  • The spool directory is the queue - .eml files survive restarts, crashes, and database outages. If PostgreSQL is down, mail still flows.
  • One place for credentials - rotate an API key once, not in every app.
  • Test before you commit - verify provider credentials with a live relay log, or capture mail to the Local Inbox without delivering anything.

Features

  • Two ways in - SMTP (STARTTLS, optional AUTH) and a Mailgun-compatible HTTP/HTTPS API with per-key tokens.
  • A dozen providers - Mailgun, SendGrid, Amazon SES, Postmark, Resend, SparkPost, SMTP2GO, Maileroo, Bird, Azure Communication Services, generic SMTP - plus Local capture mode. CC/BCC, attachments, and custom headers everywhere.
  • Local Inbox - a built-in mail trap: capture and inspect what your app sends, without delivering anything. Great for development and CI.
  • Durable spool - instant 250 OK, auto-retry with back-off, retry-from-UI for failures.
  • Smart routing - send by sender/recipient domain to different relays, with a catch-all default and a simulate tool.
  • Live dashboard - real-time counters, a searchable message log with sandboxed HTML preview, reports, and one-click provider testing.
  • Secure by default - HTTPS-only dashboard, a shared TLS cert for SMTP + the API, bcrypt-hashed passwords & API keys, encrypted secrets at rest, CIDR allow-lists so it's never an open relay.
  • Privacy first - no call home - no telemetry, no analytics, no usage stats, no automatic update pings. The only outbound connections are to the mail providers you configure; updates are applied from a signed package you upload yourself.
  • Observability - unauthenticated /health and Prometheus /metrics (dashboard-port, allow-list-gated).
  • Deploy anywhere - Windows & Linux installers (bundled PostgreSQL), a multi-arch Docker image, or a ready-to-import virtual appliance for Hyper-V, VMware, KVM & Proxmox.

Quickstart

The fastest way to try Dispatch is Docker Compose - it brings up Dispatch and its database together:

git clone https://github.com/CinderHillsDev/dispatch-platform.git
cd dispatch-platform
docker compose up -d --build
# dashboard → https://localhost:8420  (self-signed cert; default login password in docker-compose.yml)

Then open https://localhost:8420, set the admin password, add a relay, and point your apps at localhost:25 (SMTP) or localhost:8025 (HTTP API).

Tip: Dispatch listens on the standard SMTP ports 25 and 587. Install it on a host with no other SMTP software (Postfix, Sendmail, Exim, …) so those ports are free - otherwise Dispatch falls back to 2525.

➡️ Full guide: Quickstart · How it works

One-click cloud deploy

Deploy to Azure

Spins up an Ubuntu VM and installs Dispatch + PostgreSQL via cloud-init - no Marketplace account needed. See deploy/azure/.

Documentation

Everything lives on the docs site: https://docs.dispatchrelay.app/

Deployment Docker, Linux, Windows, and the virtual appliance
Relay providers Per-provider setup and settings
Sending mail SMTP, HTTP API, Local Inbox, message features
Routing Route by sender/recipient domain
Configuration Settings model + full config-key reference
Security Auth, access control, encryption, TLS
API reference The HTTP ingestion API

Security

Safe by default: the dashboard is HTTPS-only, secrets are encrypted at rest (AES-256-GCM with a portable, access-restricted key file on every platform - so a database backup can be restored on another machine by also restoring the key file), passwords and API keys are bcrypt-hashed, and SMTP + the API are closed to anything outside private ranges so a fresh install is never an open relay.

Privacy first - no call home. Dispatch never phones home: no telemetry, no analytics, no usage stats, and no automatic update polling. The only outbound connections it makes are to the mail providers you configure; updates are applied only from a signed package you upload yourself. Nothing about your install or your mail is sent to us or any third party.

Full details: Security docs. Please report vulnerabilities privately by email to security@dispatchrelay.app rather than in public.

Building from source

Prerequisites: the .NET 10 SDK, Node.js 20+, and Docker (for PostgreSQL).

git clone https://github.com/CinderHillsDev/dispatch-platform.git
cd dispatch-platform
docker compose up -d                       # PostgreSQL; schema auto-created on first run
cd src/Dispatch.UI && npm install && npm run build && cd ../..
rm -rf src/Dispatch.Web/wwwroot && mkdir -p src/Dispatch.Web/wwwroot
cp -r src/Dispatch.UI/dist/* src/Dispatch.Web/wwwroot/
ASPNETCORE_ENVIRONMENT=Development dotnet run --project src/Dispatch.Service

appsettings.Development.json (git-ignored) needs at least the PostgreSQL connection string and an AdminPassword. Tests: dotnet test (Data integration tests run only when DISPATCH_TEST_SQL is set, auto-skipped otherwise). The documentation site lives in its own repo (dispatch-docs, published at docs.dispatchrelay.app); the marketing site is dispatch-website.

Adding a provider

Implement IRelayProvider in Dispatch.Providers (see SendGridProvider.cs), wire it into RelayProviderFactory, then add the UI fields and tests.

Contributing

Contributions are welcome - bug reports, features, providers, docs, and tests. See CONTRIBUTING.md for the dev setup, how to run the tests, and the PR flow. Please report security issues privately per SECURITY.md.

Licence

Dispatch is free and open source software, released under the Apache License 2.0. © 2026 CinderHills. You are free to use, modify, and redistribute it, including commercially; no license key is required to run it.

About

Open-source .NET SMTP relay — forward mail from your apps to any cloud provider (Mailgun, SendGrid, Azure, generic SMTP) with a live web dashboard.

Resources

License

Contributing

Security policy

Stars

1 star

Watchers

1 watching

Forks

Packages

 
 
 

Contributors