6 self-hosted options
Self-hosted alternatives to Mailgun
The best open-source alternative to Mailgun is Postal (MIT, 16,893 GitHub stars, Docker image). Stalwart Mail Server stands out for the most commits in the last 12 months (715), and Maddy Mail Server follows.
Forward Email is also listed but is source-available, so it comes after the open-source picks.
About Mailgun: An email API for sending, receiving and tracking transactional mail.
Updated · data from GitHub, refreshed daily
Top picks
- Rank 1:
Postal
postalserver/postal
Complete and fully featured mail server for use by websites & web servers.
Active · last commit Oct 20, 2026
Email ServersRubyDockerStands out for the most GitHub stars.
- Rank 2:
Stalwart Mail Server
stalwartlabs/stalwart
All-in-one mail server with JMAP, IMAP4, and SMTP support and a wide range of modern features.
Active · last commit Oct 20, 2026
Email ServersRustDockerStands out for the most commits in the last 12 months (715).
- Rank 3:
Maddy Mail Server
foxcpp/maddy
All-in-one mail server that implements SMTP (both MTA and MX) and IMAP. Replaces Postfix, Dovecot, OpenDKIM, OpenSPF, OpenDMARC with single daemon.
Active · last commit Oct 20, 2026
Email ServersGo
At a glance
Mailgun alternatives compared
Open-source apps come first, then source-available ones and apps whose license appsgit could not verify; within each group, projects with at least 12 commits in the last 12 months come before less active or archived ones, then by GitHub stars.
| App | Stands out for | License | GitHub stars | Commits (12 mo) | Last commit | Docker image |
|---|---|---|---|---|---|---|
| Postal | the most GitHub stars | MIT | 16,893 | 18 | Oct 20, 2026 | Yes |
| Stalwart Mail Server | the most commits in the last 12 months (715) | AGPL-3.0 | 15,298 | 715 | Oct 20, 2026 | Yes |
| Maddy Mail Server | – | GPL-3.0 | 6,115 | 90 | Oct 20, 2026 | No |
| Mox | a permissive MIT license | MIT | 5,918 | 96 | Oct 9, 2026 | No |
| Haraka | its JavaScript codebase | MIT | 5,627 | 90 | Oct 17, 2026 | No |
| Forward Email | – | source-available, BSL 1.1 (a few files MPL-2.0) | 1,691 | 1,461 | Oct 26, 2026 | Yes |
Full list
All 6 Mailgun alternatives
Open any app for live stats, license details and a deploy option.
- 1
Postal
Complete and fully featured mail server for use by websites & web servers.
Email ServersDockerStands out for the most GitHub stars. Postal has 16,893 GitHub stars, uses the MIT license, ships a Docker image and had 18 commits in the last year.
- 2
Stalwart Mail Server
All-in-one mail server with JMAP, IMAP4, and SMTP support and a wide range of modern features.
Email ServersDockerStands out for the most commits in the last 12 months (715). Stalwart Mail Server has 15,298 GitHub stars, uses the AGPL-3.0 license, ships a Docker image and had 715 commits in the last year.
- 3
Maddy Mail Server
All-in-one mail server that implements SMTP (both MTA and MX) and IMAP. Replaces Postfix, Dovecot, OpenDKIM, OpenSPF, OpenDMARC with single daemon.
Email ServersMaddy Mail Server has 6,115 GitHub stars, uses the GPL-3.0 license and had 90 commits in the last year.
- 4
Mox
Complete e-mail solution with IMAP4, SMTP, SPF, DKIM, DMARC, MTA-STS, DANE and DNSSEC, reputation-based and content-based junk filtering, Internationalization (IDNA), automatic TLS with ACME and…
Email ServersStands out for a permissive MIT license. Mox has 5,918 GitHub stars, uses the MIT license and had 96 commits in the last year.
- 5
Haraka
Fast, highly extensible, and event driven SMTP server.
Email ServersStands out for its JavaScript codebase. Haraka has 5,627 GitHub stars, uses the MIT license and had 90 commits in the last year.
- 6
Forward Email
Privacy-focused encrypted email for everyone. All-in-one alternative to Gmail + Mailchimp + Sendgrid.
Source-availableEmail ServersDockerForward Email has 1,691 GitHub stars, is source-available under the BSL 1.1 (a few files MPL-2.0) (not an open-source license), ships a Docker image and had 1,461 commits in the last year.
Is there a free alternative to Mailgun?
Yes. 5 of the 6 apps on this page are open source; 1 is source-available. The open-source ones are free to self-host without per-user fees; source-available licenses add conditions such as user caps or limits on hosted use, so read them before you commit.
Can I self-host an alternative to Mailgun with Docker?
Yes. 3 of the 6 apps here publish a Docker image, including Postal, Stalwart Mail Server and Forward Email (source-available), so you can run them on a home server or VPS with Docker Compose.
Which Mailgun alternative is the most actively developed?
Forward Email (source-available) (source-available, BSL 1.1 (a few files MPL-2.0)), with 1,461 commits in the last 12 months. Activity is a good sign that bugs and security issues get fixed.
How is this list ranked?
Open-source apps come first, then source-available ones and apps whose license appsgit could not verify; within each group, projects with at least 12 commits in the last 12 months come before less active or archived ones, then by GitHub stars.