Sub topic 8
Sending infrastructure: reverse DNS, TLS, and message format
This chapter assumes you know how SMTP delivery works, can read DNS records, and have followed the SPF, DKIM, and DMARC chapters. Those records prove who a message claims to be. This chapter covers the plumbing under them: the server's network identity, the connection's encryption, and the structure of the message.
Reverse DNS (PTR records)
Forward DNS maps a name to an IP address. Reverse DNS maps an IP address back to a name through a PTR record. Gmail expects every sending IP to have valid forward and reverse DNS. The check is usually called forward-confirmed reverse DNS (FCrDNS):
- Look up the PTR record for the sending IP. It returns a hostname, such as
mta1.example.com. - Look up that hostname's A record. It must return the same IP.
Only the owner of the IP block can set the PTR record. That is normally your ESP or hosting provider, not you. If you send from your own IPs, request the PTR through the provider's portal or support.
dig +short -x 203.0.113.25
dig +short A mta1.example.comThe first command should print mta1.example.com. and the second should print 203.0.113.25. A mismatch, or an empty answer, is a common cause of rejections and junk placement. Generic names such as 203-0-113-25.dyn.isp.example suggest a residential or dynamic address and score badly.
TLS in transit
The providers expect mail to travel over an encrypted connection. Your sending server should offer STARTTLS, which upgrades a plain SMTP session to TLS, and should use it with every receiver that supports it. Use a certificate that is valid and not expired. Most ESPs do this by default. If you run your own MTA, check that opportunistic TLS is enabled in its outbound configuration.
You can test what a receiving server offers:
openssl s_client -starttls smtp -connect mx.example.net:25 -briefThis shows the negotiated TLS version and the certificate chain. It tests the receiver's side. To verify your own outbound TLS, read the Received headers of a delivered test message. Gmail's Received headers include ESMTPS and a cipher when the hop was encrypted.
Message format
Messages must follow the Internet Message Format, RFC 5322. Malformed headers can fail authentication or look suspicious to filters. Common requirements:
- Exactly one
Fromheader, with a real, valid address. - A
Dateheader in correct format. - A unique
Message-IDfor each message, with a domain you control. - Correct MIME structure. If you send HTML, include a matching
text/plainalternative. - No forged
Fromfor a domain you don't control, especiallygmail.com. Gmail's domain publishes a DMARC policy, and spoofed messages are rejected or quarantined.
From: Example News <[email protected]>
To: [email protected]
Date: Thu, 26 Nov 2026 13:56:00 +0000
Message-ID: <[email protected]>
Subject: Our November update
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8How the checks fit together
Quick reference
| Check | What the receiver wants | How you verify |
|---|---|---|
| Reverse DNS | PTR resolves to a hostname whose A record returns the same IP | `dig -x`, then `dig A` |
| TLS | Encrypted SMTP with a valid certificate | `Received` headers show `ESMTPS` |
| Format | Valid RFC 5322 headers and MIME | Send a test message and inspect its raw headers |
Exercise
A receiver rejects your campaign. dig +short -x 203.0.113.25 returns mta1.example.com., but dig +short A mta1.example.com returns 203.0.113.99. What is wrong, and who can fix it?
Show answer
Forward-confirmed reverse DNS fails because the hostname's A record points to a different IP than the one sending. You fix the A record in your own DNS zone so it returns 203.0.113.25. If the PTR itself names the wrong host, the owner of the IP block, usually your ESP or hosting provider, must change it.