How to Configure Reverse DNS for SMTP Delivery: Best Practices for Email Server Setup


3 views

When setting up an SMTP server for transactional emails, reverse DNS configuration is often overlooked despite being a fundamental requirement for proper email delivery. Many mail servers perform reverse DNS lookups as part of their spam filtering process, and mismatched records can result in emails being delayed or rejected.

In your case, you have:

Hostname: prod01.bidrodeo.com
IP address: 97.107.134.38
Current PTR record: 97.107.134.38 → prod01.bidrodeo.com
Email domain: bidrodeo.com

This configuration creates a mismatch between your reverse DNS and email domain, which can trigger spam filters.

For optimal email delivery, your PTR record should match your email domain. Here's how to set it up correctly:

# Correct PTR record configuration
38.134.107.97.in-addr.arpa. IN PTR mail.bidrodeo.com

Along with proper PTR records, ensure you have these DNS records configured:

# SPF record
bidrodeo.com. IN TXT "v=spf1 a:prod01.bidrodeo.com -all"

# DKIM record (example)
default._domainkey.bidrodeo.com. IN TXT "v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC..."

# DMARC record
_dmarc.bidrodeo.com. IN TXT "v=DMARC1; p=none; rua=mailto:postmaster@bidrodeo.com"

Use these command-line tools to test your setup:

# Check reverse DNS
dig -x 97.107.134.38

# Verify email server configuration
telnet mail.bidrodeo.com 25
HELO bidrodeo.com

For Postfix, add these settings to main.cf:

# /etc/postfix/main.cf
myhostname = mail.bidrodeo.com
mydomain = bidrodeo.com
myorigin = $mydomain
inet_interfaces = all
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain

If emails are still being rejected, check:

  • PTR and forward DNS records match (forward-confirmed reverse DNS)
  • Your server's hostname properly identifies itself during SMTP sessions
  • No open relay configuration
  • Proper TLS certificates for encrypted connections

When your mail server's hostname (prod01.bidrodeo.com) differs from your email domain (bidrodeo.com), you're facing a common SMTP deliverability challenge. Major email providers like Gmail, Outlook, and Yahoo perform strict rDNS checks where the PTR record should ideally match:

# Current problematic setup:
$ host prod01.bidrodeo.com
prod01.bidrodeo.com has address 97.107.134.38

$ host 97.107.134.38
38.134.107.97.in-addr.arpa domain name pointer prod01.bidrodeo.com

For optimal email delivery, your PTR should resolve to a hostname that matches your envelope sender domain. Here's the correct approach:

# Proper rDNS configuration:
$ host 97.107.134.38
38.134.107.97.in-addr.arpa domain name pointer mail.bidrodeo.com

Then set up matching A and MX records:

# DNS zone file entries:
mail.bidrodeo.com.    IN  A     97.107.134.38
bidrodeo.com.         IN  MX 10 mail.bidrodeo.com.

For Linux servers running Postfix, ensure these parameters in main.cf:

# /etc/postfix/main.cf
myhostname = mail.bidrodeo.com
mydomain = bidrodeo.com
myorigin = $mydomain
smtpd_banner = $myhostname ESMTP $mail_name

Test your configuration with these diagnostic tools:

# Check your server's HELO identification
telnet mail.bidrodeo.com 25
EHLO example.com

# Verify rDNS consistency
dig +short -x 97.107.134.38
dig +short mail.bidrodeo.com

Complement your rDNS setup with proper authentication records:

# SPF record example
bidrodeo.com.  IN  TXT  "v=spf1 mx a:mail.bidrodeo.com -all"

# DKIM selector configuration
default._domainkey.bidrodeo.com. IN TXT "v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQE..."

If using AWS EC2, Google Cloud, or Azure:

# AWS CLI example to check if Elastic IP allows PTR updates
aws ec2 describe-addresses --public-ips 97.107.134.38
# Then open a support ticket for rDNS delegation

For Linode/DigitalOcean, use their DNS manager to request PTR updates through their control panel.