# DNS for self-hosting OpenMail Replace `example.com` with your domain and `` with the server's address. OpenMail leans on Mox's `dkim`/`spf`/`dmarc`/`dane`/`mtasts` packages, but the DNS records below are operational and must be published by you. ## Inbound (receive) — required for milestone 2 ``` ; route mail for the domain to this server example.com. MX 10 mail.example.com. mail.example.com. A mail.example.com. AAAA ; if available ; reverse DNS (PTR) — set at your VPS provider, must resolve mail.example.com -> mail.example.com ``` ## Outbound (send) — deliverability, milestone 3/5 ``` ; SPF — authorize this server to send for the domain example.com. TXT "v=spf1 ip4: -all" ; DKIM — publish the public key for the selector OpenMail signs with ._domainkey.example.com. TXT "v=DKIM1; k=rsa; p=" ; DMARC — start at quarantine, tighten to reject after monitoring _dmarc.example.com. TXT "v=DMARC1; p=quarantine; rua=mailto:dmarc@example.com; adkim=s; aspf=s" ``` ## Secure transport — recommended (Mox supports both) ``` ; MTA-STS — publish policy + serve https://mta-sts.example.com/.well-known/mta-sts.txt _mta-sts.example.com. TXT "v=STSv1; id=20260621000000" mta-sts.example.com. A ; DANE/TLSA — pin the TLS cert for port 25 (requires DNSSEC on the zone) _25._tcp.mail.example.com. TLSA 3 1 1 ``` ## Notes - Many cloud providers block outbound port 25 by default — confirm your VPS allows it (or request an unblock) before milestone 2/5. - DANE/TLSA requires DNSSEC on the zone; skip it if your DNS host lacks DNSSEC and rely on MTA-STS instead. - Warm a new sending IP gradually; reputation is the real deliverability cost.