Read the manual.
Documentation
How email works, why mail servers are so easy to get wrong, and how to install and run REST Mail.
Email, explained
A guide to how email actually works: the protocols, the security layers on top of them, and the mistakes that turn a mail server into someone else's spam machine. It is useful whatever server you run. Every claim in it has a source.
Start at the front page, or go straight to a chapter:
How email works
- The journey of a message: What happens between pressing Send and the message arriving, hop by hop, and who is responsible for it at each step.
- DNS for email: How a server finds where to deliver mail, the records every mail domain publishes, and the DNS mistakes that send mail nowhere.
- SMTP as a conversation: The commands and replies two mail servers exchange, line by line, what the reply codes mean, and how to hold the conversation yourself.
- The message itself: What an email is made of: the envelope that routes it, the header the reader sees, and the MIME parts that carry text, HTML and attachments.
- Bounces, queues and retries: What a mail server does when delivery fails: how long it keeps trying, how it tells the sender, and how bounces themselves become abuse.
- Reading mail: POP3, IMAP, JMAP and Sieve: How mail apps get mail out of the server, why there are three protocols for it, and how Sieve rules sort mail before anyone reads it.
- Finding the server: autoconfig, Autodiscover and SRV: How a mail app turns an email address into server names, ports and security settings, and why a wrong answer here can send passwords in the clear.
The security layers, one at a time
- Encryption in transit: STARTTLS and implicit TLS: How mail is encrypted between servers and apps, why the way it was added leaves it open to downgrade, and what to do about it.
- MTA-STS, TLS-RPT, DANE and DNSSEC: How a domain tells senders "always use TLS, and only with these servers", the two standards that do it, and the reports that say when it fails.
- Who may send: SMTP AUTH, SASL and app passwords: Why a mail server needs two front doors, how sign-in works over SMTP, and what limits keep one stolen password from becoming a spam machine.
- SPF: which servers may send for a domain: How SPF lets a domain list the servers allowed to send its mail, how a receiver checks it, the 10-lookup limit, and why forwarding breaks it.
- DKIM: signing the message itself: How DKIM signatures prove a message came from a domain and was not changed, how keys and selectors work, and the ordinary things that break a signature.
- DMARC: protecting the From line: How DMARC ties SPF and DKIM to the address the reader sees, what p=none, quarantine and reject do, the reports, and why p=reject and mailing lists do not mix.
- ARC: authentication that survives forwarding: How a forwarder or mailing list can record what a message's authentication looked like when it arrived, and why a receiver still has to decide whom to believe.
- Spam defences: blocklists, greylisting, limits and filters: The layers a receiving server uses to keep spam out, from cheap checks on the connection to expensive ones on the content, and what each costs legitimate senders.
- Bulk mail: List-Unsubscribe and the 2024 sender rules: What the large mailbox providers now require of anyone sending in volume, and how one-click unsubscribe works.
How it goes wrong
- The open relay and the spam machine: How a mail server ends up sending strangers' spam, the four mistakes behind it, what it costs, and how to check your own.
- The black hole: how mail is silently lost: The places a message can disappear without a bounce or an error, why silent loss is worse than any failure you can see, and how to find where it went.
- Why the security layers are so hard to get right: Each protection was added on its own, decades apart, by different people, in different places. Here is everything one domain needs, and why mistakes go unnoticed.
- Deliverability: reputation, warm-up, and why big providers distrust small servers: Why a correctly configured server's mail can still land in spam, how mailbox providers judge a sender, and what a new server can do about it.
The landscape, and where REST Mail fits
- The servers compared: Postfix, Exim, Dovecot, Stalwart, and the hosted services: The jobs a mail server does, the programs that do them, from the classic one-job daemons to all-in-one servers and hosted services, and what each does well.
- Containers and bundles: what packaging solves, and what stays the same: How docker-mailserver, mailcow, Mailu, Mail-in-a-Box, iRedMail and kubernetes-mail-server package the classic stack, what that makes easier, and what is still inside.
- Efforts to modernise email: JMAP, end-to-end encryption, and others: Forty years of attempts to improve email, from new standards inside the system to proposals to replace it, what each solved, where each stands today, and how they relate to REST Mail.
- What REST Mail does differently: One server with a REST API at its centre, protocol gateways in front of it, safe behaviour that is not a setting, and full compatibility with every other mail server and app.
- RESTMAIL: delivery between servers over HTTPS: How two REST Mail servers find out about each other and deliver over HTTPS instead of SMTP, what that gains, and why it always falls back to ordinary SMTP for everyone else.
- Migrating step by step, without breaking anything: How to move a domain's mail from one server to another while mail keeps flowing, in an order where every step can be undone.
- Solved, solving, still open: Every problem in this guide in one table, how far email as a whole has got with it, and where REST Mail stands, with the issue for each gap.
Reference
- Glossary: Every term this guide uses, in a sentence, with the chapter that explains it.
- Check your own server: a checklist: The checks to run on any mail server, in order, with the commands to run them and the chapter that explains each.
Running REST Mail
These live with the code, on GitHub, and change with it.
- Installing: the ways to install REST Mail, and what each one needs.
- The manual: for operators and developers. Settings, endpoints and day-to-day tasks.
- Everything else: filters, DNS providers, PROXY protocol, bans, and what each document is for.