Skip to content

PTR and forward-confirmed reverse DNS

Reverse DNS is set at the IP provider, not just in your normal DNS zone.

The PTR record need not be DNSSEC-signed for RateMyMail's general DNSSEC status or SMTP DANE. Reverse DNS, including forward confirmation, is assessed separately; DANE concerns DNSSEC-secured MX/TLSA publication.

Setup

Prepare your values and Debian packages. Replace the example domain and IP.

Ask the IP provider to set the PTR of your actual sending IP to MAILHOST. Publish MAILHOST as an A record for the same IP at the DNS provider. Use AAAA only for an actually reachable IPv6 sending route. Print the required values:

. /root/mailserver.env
printf 'PTR for %s -> %s.\nA for %s -> %s\n' "$PUBLIC_IPV4" "$MAILHOST" "$MAILHOST" "$PUBLIC_IPV4"

Test

set -euo pipefail
. /root/mailserver.env
python3 - <<'PY'
import dns.resolver, dns.reversename, os
ip, host = os.environ["PUBLIC_IPV4"], os.environ["MAILHOST"]
ptr = [str(r.target).rstrip(".") for r in dns.resolver.resolve(dns.reversename.from_address(ip), "PTR")]
assert host in ptr, ("PTR does not match", ptr)
forward = [r.address for r in dns.resolver.resolve(host, "A")]
assert ip in forward, ("PTR hostname does not resolve to the sending IP address", forward)
print("PASS: PTR and forward lookup confirm the same IP address.")
PY

A matching PTR is not cryptographic identity evidence. Publication cannot be automated without access to your IP provider.