# Mox — Modern Full-Featured Self-Hosted Mail Server > A secure, low-maintenance mail server written in Go that handles SMTP, IMAP, SPF, DKIM, DMARC, and automatic TLS in a single binary, designed to make self-hosting email practical. ## Install Save as a script file and run: # Mox — Modern Full-Featured Self-Hosted Mail Server ## Quick Use ```bash # Download and set up mox useradd -m -s /bin/bash mox cd /home/mox curl -OL https://beta.gobuilds.org/github.com/mjl-/mox@latest/linux-amd64-latest/mox chmod +x mox ./mox quickstart you@yourdomain.com # Follow DNS record instructions from output ``` ## Introduction Mox is a modern, self-hosted mail server that bundles all essential email protocols and security features into a single Go binary. It reduces the operational complexity of running your own mail infrastructure by handling SMTP, IMAP, SPF, DKIM, DMARC, MTA-STS, and automatic TLS out of the box. ## What Mox Does - Sends and receives email via SMTP with automatic TLS certificate management - Provides IMAP4 access for reading mail from any email client - Implements SPF, DKIM signing, and DMARC policy enforcement - Includes a built-in webmail interface for browser-based access - Offers automatic junk mail filtering with Bayesian classification ## Architecture Overview Mox is a single Go binary that runs all mail services in one process. It stores messages in its own database format on the filesystem, with per-account directories. The server manages its own TLS certificates via ACME (Let's Encrypt), handles DNS-based authentication (SPF, DKIM, DMARC), and implements JMAP alongside IMAP for modern client support. ## Self-Hosting & Configuration - Run the quickstart command to generate configuration and DNS record instructions - Requires a VPS with a public IP, reverse DNS configured, and ports 25, 443, 993 open - Configuration lives in mox.conf and domains.conf files (auto-generated on quickstart) - Automatic daily backups can be configured to a local directory or remote storage - Add accounts via CLI commands; each account gets isolated storage ## Key Features - Single binary deployment with no external database dependency - Built-in webmail UI with HTML and plain-text message rendering - Automatic ACME TLS certificate provisioning and renewal - Reputation-based rate limiting for outbound delivery - DANE and MTA-STS enforcement for secure transport between mail servers ## Comparison with Similar Tools - **Mail-in-a-Box** — Bundles multiple packages (Postfix, Dovecot, Roundcube) with a setup script; mox is a single binary with fewer moving parts - **Maddy** — Similar single-binary approach; mox adds built-in webmail and more complete MTA-STS/DANE support - **Stalwart Mail** — Rust-based alternative with JMAP focus; mox offers a simpler quickstart experience and Go ecosystem familiarity - **iRedMail** — Install script for traditional mail stack; mox avoids the complexity of managing Postfix, Dovecot, and ClamAV separately ## FAQ **Q: Will my emails end up in spam?** A: Mox implements all modern authentication standards (SPF, DKIM, DMARC, MTA-STS). Following the DNS setup instructions and using a VPS with clean IP reputation gives good deliverability. **Q: Can mox handle multiple domains?** A: Yes, add domains via the admin interface or CLI. Each domain gets its own DKIM keys and DMARC policy. **Q: How does the junk filter work?** A: Mox uses per-account Bayesian filtering that learns from messages you mark as junk or not-junk, combined with reputation tracking of sending IPs. **Q: What are the hardware requirements?** A: Mox is lightweight. A VPS with 512MB RAM and 10GB storage is sufficient for personal use with a few accounts. ## Sources - https://github.com/mjl-/mox - https://www.xmox.nl --- Source: https://tokrepo.com/en/workflows/asset-3f680194 Author: Script Depot