Skip to content

themadorg/madmail

Repository files navigation

Madmail logo

Madmail-V2

A rust-based mail relay server for Delta Chat, encrypted, federated, one binary. batteries included.

Quick Setup · Features · Documentation · Deployment

Madmail is a server relay for the Delta Chat app, users message through the Chatmail protocol, while Madmail handles delivery, storage, federation, and real-time services on the server side.

A Rust rewrite of Madmail v1: SMTP, IMAP, encryption enforcement, and real-time relay built in.

Quick Setup

Download the release binary for your architecture, then install and start the service:

ARCH=$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/')
curl -fsSL "https://github.com/themadorg/madmail/releases/latest/download/madmail-linux-${ARCH}" \
  -o madmail
chmod +x madmail

With a public IP (no domain)

Trusted TLS via Let's Encrypt IP certificate (~6-day renewal, port 80 required):

sudo ./madmail install --simple --ip YOUR_IP \
  --auto-ip-cert \
  --acme-email you@example.com \
  --lang en
sudo systemctl enable madmail
sudo systemctl start madmail

Replace YOUR_IP with your server's public IPv4 or IPv6 address.

Self-signed TLS (testing / internal — omit --auto-ip-cert):

sudo ./madmail install --simple --ip YOUR_IP --lang en
sudo systemctl enable madmail
sudo systemctl start madmail

With a domain

Standard Let's Encrypt certificate (90-day renewal, DNS must point to your server):

sudo ./madmail install --simple --domain mail.example.org \
  --acme-email you@example.com \
  --lang en
sudo systemctl enable madmail
sudo systemctl start madmail

Replace mail.example.org with your hostname and you@example.com with a valid contact email.

More detail:

Documentation

Documentation is organized by audience and purpose.

For Server Operators and End Users

  • User & Operator Guide — Practical, human-friendly documentation covering accounts & registration, privacy model, federation, calls (TURN/Iroh), administration, deployment scenarios, and troubleshooting.

For Developers and Contributors

Quick References

Documentation lives in the repository alongside the source code.

Credits

Madmail v2 stands on many open-source projects.

During how we built Madmail v2, dozens of those trees were used as context while implementing the Rust server, for behavior parity with Madmail v1, protocol study, client E2E testing, TLS/ACME patterns, and real-time relay integration. What each repository contributed (and related notes) is in Context & reference projects.

This codebase was also developed with Cursor (coding agent) and Gemini 3.1 Pro (Google AI Studio) for planning and implementation assistance. See AI-assisted development for how those tools fit into the workflow (more detail to be added there).

Disclaimer

The product vision, architecture, phase plan, and acceptance criteria were defined and reviewed by humans. Most of the Rust (and related) source in this repository was written with AI assistance under that direction, not as an unattended dump of generated code, but as an iterative, human-guided process.

Use at your own risk. Madmail v2 is AGPL software under active development; run it on production systems only after you have validated it for your threat model and workload.

We always welcome criticism, bug reports, and discussion, please use GitHub Discussions.

Resources


License

AGPL-3.0-or-later

About

Bringing the madness to mail delivery. #deltachat

Topics

Resources

License

Stars

178 stars

Watchers

3 watching

Forks

Packages

 
 
 

Contributors