explaingit

mjl-/mox

5,684GoAudience · ops devopsComplexity · 4/5LicenseSetup · hard

TLDR

Mox is an all-in-one email server you self-host on your own machine, bundling everything needed to send and receive email on a personal domain with a single command and automatic setup guidance.

Mindmap

mindmap
  root((mox))
    What it does
      Self-hosted email server
      Single-binary setup
      Auto TLS via LetsEncrypt
    Protocols
      SMTP send and receive
      IMAP for clients
      HTTP API
    Features
      Bayesian spam filter
      Webmail built-in
      SPF DKIM DMARC
    Audience
      Self-hosters
      Sysadmins
      Privacy-focused users
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Run your own email server for a personal domain without paying a third-party provider, using one quickstart command to get started.

USE CASE 2

Connect standard email clients like Thunderbird or iOS Mail to your self-hosted inbox via IMAP.

USE CASE 3

Send transactional email like order confirmations or password resets from your application using the built-in HTTP API.

USE CASE 4

Use the browser-based webmail to read and send email without installing a separate client.

Tech stack

Go

Getting it running

Difficulty · hard Time to first run · 1day+

Requires a Linux server with a publicly routable IP, ownership of a domain, and DNS access to add SPF, DKIM, DMARC, and MX records.

Use freely for any purpose, including commercial, as long as you keep the copyright notice.

In plain English

Mox is a complete mail server you run on your own machine, designed for people who want to handle email for a personal domain without paying a third-party provider or spending weeks on configuration. It is written in Go and released under the MIT license. Setting up your own email server has historically been complicated because a working mail setup requires many separate pieces: a program that receives incoming messages, another that lets email clients read those messages, spam filtering, and several layers of authentication that other mail providers check before accepting your messages. Mox bundles all of that into a single program. Running one quickstart command generates the configuration files and prints out exactly which DNS records you need to add to your domain, then mox handles the rest. On the feature side, mox supports the standard protocols email clients use, including SMTP for sending and receiving and IMAP for letting apps like Thunderbird or iOS Mail connect to your inbox. It includes a browser-based webmail so you can read email without any separate client. For spam protection, it combines bayesian filtering (a statistical approach that learns from the mail you mark as junk) with reputation tracking per sender address, and it can slow down suspicious senders automatically. TLS certificates are obtained and renewed automatically through Let's Encrypt. The web admin interface walks you through domain and account setup and shows you what DNS records are needed for SPF, DKIM, and DMARC, which are the three authentication standards other mail servers use to verify that messages from your domain are legitimate. There is also a simple HTTP API for applications that need to send transactional email like order confirmations or password resets. Mox runs on Linux and other Unix systems. The repository includes a local test mode so developers can try the mail server on their own computer without a real domain. The project has received funding from NLnet and the European Commission and is actively maintained.

Copy-paste prompts

Prompt 1
Walk me through running mox quickstart for my domain and explain each DNS record it tells me to add, and why.
Prompt 2
How do I add a new email account to my mox server and generate an app password for use with Thunderbird?
Prompt 3
Show me how to call the mox HTTP API from a Python script to send a transactional email when a user signs up.
Prompt 4
How does mox's bayesian spam filter learn from the mail I mark as junk, and how do I retrain it if it starts making mistakes?
Prompt 5
I want to test mox locally without a real domain, walk me through using the local test mode.
Open on GitHub → Explain another repo

← mjl- on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.