SYNTH MAIL

DNS records

Other mail servers decide whether to trust your mail by looking at DNS. Here is every record Synth Mail uses, with example.com as the domain, mail.example.com as the server and 203.0.113.10 as its public address.

Required

RecordNameValueWhy
Amail.example.com203.0.113.10the server's name; the HTTPS certificate is issued on it
PTR203.0.113.10mail.example.comreverse DNS, set in your provider's panel; without it Gmail and Outlook reject mail
MXexample.com10 mail.example.comwhere other servers deliver mail for @example.com
TXT (SPF)example.comv=spf1 ip4:203.0.113.10 -allonly this address sends mail for the domain
TXT (DKIM)mail._domainkey.example.comv=DKIM1; k=rsa; p=...the public key; outgoing mail carries a signature checked against it
TXT (DMARC)_dmarc.example.comv=DMARC1; p=none; rua=mailto:postmaster@example.comwhat receivers do when SPF and DKIM fail, and where to send reports

DKIM

The key is created on the first start and kept in the data volume (/app/data/dkim-keys). The start log prints the record:

DKIM DNS record — TXT mail._domainkey.example.com: v=DKIM1; k=rsa; p=MIIBIjANBgkq...

Keep the data volume in your backups: a lost key means a new key and a new DNS record. With several domains in MAIL_DOMAINS the same key signs mail of each — publish the same value under mail._domainkey.<domain> of every domain.

DMARC

Start with p=none: receivers only send reports to postmaster@ and change nothing. When "Show original" in Gmail shows DMARC: PASS for a couple of weeks, tighten it to p=quarantine (failed mail goes to spam) and later to p=reject. postmaster@ and abuse@ exist in every domain of the server from the first start.

MTA-STS tells other servers to deliver to you only over a verified TLS connection; TLS-RPT asks them to report problems.

RecordNameValue
A or CNAMEmta-sts.example.comthe server (same as mail.example.com)
TXT_mta-sts.example.comv=STSv1; id=20261116 (change id whenever the policy changes)
TXT_smtp._tls.example.comv=TLSRPTv1; rua=mailto:postmaster@example.com

Synth Mail serves the policy at https://mta-sts.example.com/.well-known/mta-sts.txt. mta-sts.example.com needs an HTTPS certificate on that name: the install compose file issues one only for MAIL_HOSTNAME, so add the name to the lego command (--domains "$$MAIL_HOSTNAME" --domains mta-sts.example.com) or serve it through your own reverse proxy. Mode: MAIL_MTA_STS_MODE — start with testing, switch to enforce when the reports are clean (Configuration).

Several domains

Every domain in MAIL_DOMAINS needs its own MX, SPF, DKIM and DMARC records — all pointing at the same server. The A and PTR records exist once, for mail.example.com.

Check

dig +short MX example.com
dig +short TXT example.com
dig +short TXT mail._domainkey.example.com
dig +short TXT _dmarc.example.com
dig +short -x 203.0.113.10