Skip to content
NimbusVPS
Networking

Reverse DNS and mail deliverability

PTR, SPF, DKIM and DMARC are the four records that decide whether your mail arrives. How to set each one, verify it, and warm a new IP without being filtered.

8 min readUpdated

Running your own mail server on a VPS is entirely achievable. It fails for one of four reasons, and all four are configuration rather than luck.

1. Reverse DNS (PTR)

Set it in the NimbusVPS control panel. It must match the hostname your server presents in SMTP HELO, and that hostname must resolve forward to the same IP.

# Verify the round trip
dig -x YOUR_IPV4 +short          # → mail.example.com
dig mail.example.com +short      # → YOUR_IPV4

If those two do not agree, a large share of receivers reject before you send a byte. Set PTR for IPv6 as well if the server has IPv6 enabled — many people set only IPv4 and are confused when delivery is intermittent.

2. SPF

example.com.  IN TXT  "v=spf1 mx a ip4:YOUR_IPV4 ip6:YOUR_IPV6 -all"

-all is a hard fail and is what you want once you are confident the record is complete. Start with ~all for a week if you are unsure.

3. DKIM

apt -y install opendkim opendkim-tools
mkdir -p /etc/opendkim/keys/example.com
opendkim-genkey -s mail -d example.com \
  -D /etc/opendkim/keys/example.com
chown -R opendkim:opendkim /etc/opendkim/keys
cat /etc/opendkim/keys/example.com/mail.txt

Publish the printed record as mail._domainkey.example.com.

4. DMARC

_dmarc.example.com. IN TXT "v=DMARC1; p=quarantine; rua=mailto:[email protected]; pct=100"

Start at p=none and read the aggregate reports for a fortnight before moving to quarantine and then reject. Going straight to reject with a misconfigured SPF record is how people silently lose their own mail.

Test before you trust

  • mail-tester.com — send it a message, aim for 10/10.
  • MXToolbox — check blacklists and record syntax.
  • Send to a Gmail address and read "Show original" for the SPF, DKIM and DMARC verdicts.

About IP reputation

IP reputation changes over time and differs by recipient. Check the assigned address, configure authentication correctly and send only solicited mail. NimbusVPS does not guarantee a particular blocklist status, inbox placement or recipient acceptance.

Choose your server and see the total.

Choose your location, resources and term. Pay in crypto after reviewing the total; payment is verified automatically before your VPS is prepared.

Minimum 3-month VPS term · No ID upload in checkout · 7-day refund policy with exclusions