If you send email directly from your VPS (Postfix, Exim, Mailcow, a web app, etc.), you must set up the records below.
Outgoing email (SMTP, port 25) stays disabled on your VPS until all four items below are set up correctly.
Once all conditions are met, outgoing email is enabled automatically. You can check the current status in the Client Portal -> Networks page.
In the examples:
example.com - your domainmail.example.com - your mail server's hostname203.0.113.10 - your VPS IP addressrDNS maps your IP back to a hostname. Receiving servers reject or spam-flag mail from IPs without a matching rDNS.
A record at your DNS provider:Amail203.0.113.10mail.example.com in the Client Portal under your VPS.myhostname = mail.example.com).All three must match: A record, rDNS and HELO hostname. If your VPS also sends over IPv6, set an AAAA record and IPv6 rDNS too.
SPF lists which servers may send mail for your domain.
TXT@v=spf1 ip4:203.0.113.10 -all (replace 203.0.113.10 with your VPS IP address) v=spf1 ip4:203.0.113.10 include:other-service.com -all
Only one SPF record is allowed per domain. Two SPF records break both.
DKIM signs every outgoing message, so receivers can verify it was not forged or modified.
opendkim-genkey -b 2048 -d example.com -s default
cat default.txtTXTdefault._domainkeyv=DKIM1; k=rsa; p=MIIBIjANBgkqh... (the content of default.txt)default.private).Some DNS providers add extra quotation marks or backslashes to the value, remove them. Some ask only for default._domainkey as the hostname, without the domain.
Never share the private key. Only the public key goes into DNS.
DMARC tells receivers what to do with mail that fails SPF / DKIM.
TXT_dmarcv=DMARC1; p=none; sp=none; adkim=r; aspf=r;p=none is a safe start: it does not affect delivery. Once everything passes, you can switch to p=quarantine or p=reject.
DNS changes may take a few minutes to a few hours to propagate.
dig +short -x 203.0.113.10
dig +short TXT example.com
dig +short TXT default._domainkey.example.com
dig +short TXT _dmarc.example.comSend a test email to mail-tester.com - aim for a 10/10 score.