Find cheap domain names for your website - namesilo.com
Namesilo Blog
Blog
DNS13 min

Outbound vs Inbound Mail DNS: Different Records, Different Risks

NS
NameSilo Staff

11/20/2025
Share
Email infrastructure relies on numerous DNS records serving distinct purposes. Understanding these records requires recognizing that email operates bidirectionally: your organization sends email (outbound) and receives email (inbound). Each direction uses different DNS records, faces different security threats, and requires different configuration strategies. Confusion between outbound and inbound mail DNS leads to misconfiguration, delivery failures, and security vulnerabilities.
Outbound mail DNS primarily concerns authentication, proving to receiving servers that your emails are legitimate. SPF, DKIM, DMARC, and BIMI records tell the world how to validate messages claiming to come from your domain. Inbound mail DNS focuses on routing and security, telling senders where to deliver mail for your domain and what security standards you require. MX records, MTA-STS, TLS-RPT, DANE, and reverse DNS entries manage inbound mail flow. When you configure email services for your domain, properly setting up both inbound and outbound DNS creates reliable, secure email infrastructure.

The Fundamental Direction Split in Mail DNS

Email systems distinguish between:
Outbound mail flow: Your mail servers sending email to other organizations. The challenge is convincing receiving servers that your messages are authentic, not spam or phishing.
Inbound mail flow: Other organizations' mail servers sending email to you. The challenge is routing mail to the correct servers and ensuring secure transmission.
This distinction affects every aspect of mail DNS:
  • SPF authenticates outbound mail by declaring which IPs can send for your domain
  • MX records route inbound mail by declaring which servers receive for your domain
  • DKIM signs outbound mail with cryptographic signatures
  • MTA-STS protects inbound mail by requiring TLS encryption
  • DMARC validates outbound mail using SPF and DKIM results
  • TLS-RPT reports on inbound mail delivery security
Understanding this split prevents common mistakes like configuring SPF records but forgetting MX records, or setting up elaborate outbound authentication while leaving inbound mail unprotected.

Outbound Mail DNS: Authentication Records

Organizations sending email need DNS records proving message authenticity. Without these, receiving servers classify messages as spam or reject them entirely.

SPF (Sender Policy Framework)

SPF records declare which mail servers are authorized to send email for your domain. The record is a TXT record at the domain root:
example.com. IN TXT "v=spf1 ip4:192.0.2.10 include:_spf.google.com -all"
This record means:
  • v=spf1: This is an SPF record
  • ip4:192.0.2.10: Mail from IP 192.0.2.10 is authorized
  • include:_spf.google.com: Check Google's SPF record for additional authorized IPs
  • -all: Reject mail from any other IPs
SPF protects receiving servers from accepting forged email claiming to come from your domain. When your mail server sends a message, the receiving server checks your SPF record to verify the sending IP is authorized.
Common SPF failures:
  • Too permissive: Using +all or ?all provides no protection, allowing anyone to send as your domain
  • Too restrictive: Forgetting to include all legitimate mail sources causes delivery failures
  • Too many lookups: SPF limits DNS lookups to 10. Complex includes can exceed this, causing SPF failures
  • Forgetting subdomains: SPF does not automatically apply to subdomains. If you send from mail.example.com, that subdomain needs its own SPF record
SPF risks and failure modes:
When SPF fails, receiving servers may:
  • Deliver to spam folders instead of inbox
  • Reject messages entirely
  • Apply stricter filtering to messages
For senders, SPF failure means deliverability problems. For domains not sending mail, lack of SPF records allows spammers to forge your domain in email sender addresses. A restrictive SPF record like v=spf1 -all tells receivers to reject all mail claiming to come from your domain, protecting against forgery even if you never send email.

DKIM (DomainKeys Identified Mail)

DKIM adds cryptographic signatures to outbound email. Your mail server signs messages using a private key, and receiving servers verify signatures using public keys published in DNS.
A DKIM public key appears as a TXT record at a selector subdomain:
selector._domainkey.example.com. IN TXT "v=DKIM1; k=rsa; p=MIGfMA0GCS..."

Components:
  • selector: A label identifying which key pair signed the message (you can have multiple)
  • _domainkey: Standard subdomain for DKIM records
  • v=DKIM1: DKIM version
  • k=rsa: Key type (typically RSA)
  • p=...: Base64-encoded public key
DKIM protects message integrity. Even if SPF passes, message content could be modified in transit. DKIM signatures break if content changes, proving tampering occurred.
DKIM best practices:
  • Use 2048-bit RSA keys for strong security
  • Rotate keys periodically (annually or after suspected compromise)
  • Maintain multiple selectors for zero-downtime rotation
  • Sign critical headers that spammers might forge (From, Subject, Date)
  • Sign body content to prevent message tampering
DKIM failure modes:
DKIM failures occur when:
  • Private and public keys don't match (common after key rotation mistakes)
  • DNS record is missing or misconfigured
  • Message modifications break signatures
  • Key is too short and considered insecure
Unlike SPF, DKIM failures typically don't cause immediate delivery failures. However, they prevent DMARC from passing, which can lead to rejection.

DMARC (Domain-based Message Authentication, Reporting and Conformance)

DMARC builds on SPF and DKIM, instructing receiving servers what to do when authentication fails. A DMARC record is a TXT record at _dmarc.example.com:
_dmarc.example.com. IN TXT "v=DMARC1; p=reject; rua=mailto:[email protected]; ruf=mailto:[email protected]; pct=100"
Components:
  • v=DMARC1: DMARC version
  • p=reject: Policy for failed messages (none, quarantine, or reject)
  • rua=: Aggregate report destination
  • ruf=: Forensic report destination
  • pct=100: Percentage of messages to which policy applies
DMARC policies:
  • none: Monitor only, don't affect delivery (for initial deployment)
  • quarantine: Treat failed messages as suspicious (usually spam folder)
  • reject: Refuse delivery of failed messages
DMARC deployment strategy:
  1. Start with p=none to monitor without affecting delivery
  1. Analyze reports to identify legitimate sources failing authentication
  1. Fix SPF/DKIM configurations for legitimate sources
  1. Move to p=quarantine after most legitimate mail passes
  1. Progress to p=reject for maximum protection
DMARC alignment:
DMARC requires "alignment" between authenticated domains and message From domain:
  • SPF alignment: Envelope sender domain must match From header domain
  • DKIM alignment: DKIM signature domain must match From header domain
  • Relaxed vs strict: Relaxed allows subdomain matches, strict requires exact matches
This prevents sophisticated attacks where attackers authenticate as one domain but display a different domain in the From header.
DMARC failure risks:
Misconfigured DMARC can:
  • Block all legitimate email if policy is too strict before fixing authentication
  • Allow forgery if policy remains at p=none indefinitely
  • Create delivery issues for legitimate forwarding services that break SPF/DKIM

BIMI (Brand Indicators for Message Identification)

BIMI allows verified brands to display logos in email clients next to authenticated messages. A BIMI record is a TXT record at default._bimi.example.com:
default._bimi.example.com. IN TXT "v=BIMI1; l=https://example.com/logo.svg; a=https://example.com/vmc.pem"
Components:
  • v=BIMI1: BIMI version
  • l=: Logo location (SVG format)
  • a=: Verified Mark Certificate location (for trademark verification)
BIMI requirements:
  • DMARC policy of quarantine or reject
  • Verified Mark Certificate from authorized certificate authority
  • Logo in strict SVG profile
  • Proper SPF and DKIM authentication
BIMI adoption remains limited, with support primarily in major email clients. However, for brands where visual identity matters, BIMI provides verified logo display that phishing attempts cannot replicate.

Inbound Mail DNS: Routing and Security Records

While outbound DNS proves your legitimacy when sending, inbound DNS tells others how to reach you and what security standards to enforce.

MX (Mail Exchanger) Records

MX records declare which servers accept email for your domain. These are the fundamental routing records for inbound mail:
example.com. IN MX 10 mail1.example.com.
example.com. IN MX 20 mail2.example.com.

Components:
  • Priority number (10, 20): Lower numbers have higher priority
  • Hostname of mail server
When someone sends email to [email protected], their mail server queries your MX records, finds mail1.example.com, resolves its IP address, and delivers the message there. If mail1 is unavailable, the sender tries mail2.
MX record best practices:
  • Use at least two MX records for redundancy
  • Ensure hostnames in MX records resolve to A/AAAA records
  • Never point MX records directly to IP addresses (while technically possible, it breaks many systems)
  • Avoid CNAME targets for MX hostnames (causes lookup complexity)
  • Set appropriate priorities reflecting your preferred delivery order
MX failure modes:
MX failures cause immediate delivery problems:
  • Missing MX records: Mail cannot be delivered at all
  • Incorrect hostnames: DNS lookups fail, mail bounces
  • All servers unreachable: Senders queue mail for retry but eventually bounce
  • Priority misconfiguration: Mail routes to backup servers even when primary servers are healthy
For organizations managing domains across multiple registrars, ensuring MX records are properly configured when you register a domain prevents email setup delays.

MTA-STS (Mail Transfer Agent Strict Transport Security)

MTA-STS forces mail delivery over TLS, preventing downgrade attacks where attackers intercept mail by exploiting opportunistic TLS.
MTA-STS requires two components:
DNS record at _mta-sts.example.com:
_mta-sts.example.com. IN TXT "v=STSv1; id=20240101T000000"

Policy file at https://mta-sts.example.com/.well-known/mta-sts.txt:
version: STSv1
mode: enforce
mx: mail1.example.com
mx: mail2.example.com
max_age: 86400
The DNS record indicates MTA-STS is active. Sending servers fetch the policy file via HTTPS, learning:
  • mode: Testing, enforce, or none
  • mx: Which hostnames are valid MX servers
  • max_age: How long to cache the policy
MTA-STS protection:
Without MTA-STS, mail delivery attempts TLS but falls back to unencrypted if TLS fails. Attackers can force this fallback, intercepting messages. MTA-STS requires TLS, causing delivery to fail rather than fall back to unencrypted transmission.
MTA-STS deployment:
  1. Deploy policy in testing mode to monitor compatibility
  1. Ensure all MX servers have valid SSL certificates covering their hostnames
  1. Verify HTTPS hosting for policy file is stable
  1. Switch to enforce mode after testing confirms deliverability
  1. Monitor TLS-RPT reports (covered next) for issues
MTA-STS challenges:
  • Requires HTTPS hosting for policy file (separate from mail servers)
  • All MX servers must support TLS with valid certificates
  • Policy updates require changing id field to force refetch
  • Not universally supported by all mail servers

TLS-RPT (TLS Reporting)

TLS-RPT provides feedback about TLS issues encountered when delivering mail to your domain. Sending servers report connection problems, helping you identify TLS configuration issues.
A TLS-RPT record is a TXT record at _smtp._tls.example.com:
_smtp._tls.example.com. IN TXT "v=TLSRPTv1; rua=mailto:[email protected]"

Sending servers email JSON reports to the specified address detailing:
  • Successful TLS connections
  • TLS failures (certificate errors, protocol issues, policy violations)
  • MTA-STS policy validation results
Using TLS-RPT data:
Reports reveal:
  • Certificate expiration issues before they cause widespread problems
  • MTA-STS policy problems preventing delivery
  • Sending servers with outdated TLS implementations
  • Geographic patterns in TLS support
This visibility helps maintain reliable encrypted mail delivery.

DANE and TLSA Records

DANE (DNS-based Authentication of Named Entities) uses DNSSEC to publish TLS certificate fingerprints in DNS. TLSA records declare which certificates mail servers should present:
_25._tcp.mail.example.com. IN TLSA 3 1 1 ABC123...
Components:
  • _25._tcp: Port 25 (SMTP) over TCP
  • Hostname: mail.example.com
  • Certificate usage, selector, and matching type
  • Certificate fingerprint
DANE provides an alternative to certificate authorities for validating TLS certificates. If your DNS is signed with DNSSEC, DANE allows sending servers to verify your mail server's certificate against the published TLSA record rather than trusting CAs.
DANE requirements:
  • DNSSEC-signed DNS zones
  • Stable certificate fingerprints (automated certificate rotation requires TLSA updates)
  • Sending server DANE support (limited adoption)
DANE benefits:
  • Eliminates CA compromise risks
  • Enables self-signed certificates (if acceptable in your environment)
  • Provides cryptographic binding between DNS and TLS
DANE limitations:
  • DNSSEC deployment remains incomplete globally
  • Few mail servers implement DANE validation
  • Certificate rotation complexity increases
  • Misconfiguration can cause complete delivery failure

Reverse DNS (PTR Records)

Reverse DNS maps IP addresses back to hostnames. For mail servers, reverse DNS helps receiving servers verify sending server identity:
10.2.0.192.in-addr.arpa. IN PTR mail.example.com.

This PTR record says that IP 192.0.2.10 resolves to mail.example.com.
Reverse DNS requirements for mail:
  • Sending mail server IP must have PTR record
  • PTR record should resolve to hostname matching A record (forward-confirmed reverse DNS)
  • Many receiving servers reject mail from IPs without valid reverse DNS
Common reverse DNS issues:
  • ISPs or hosting providers control reverse DNS, not domain owners
  • Dynamic IPs or cloud environments complicate PTR record management
  • Multiple domains sending from the same IP create PTR ambiguity
For organizations running mail infrastructure on hosting platforms, coordinate with providers to ensure proper reverse DNS configuration.

Putting It Together: Mail Flow Design

Proper email infrastructure requires coordinating all these records:
Outbound authentication stack:
  1. SPF record declaring authorized sending IPs
  1. DKIM signing with published public keys
  1. DMARC policy enforcing authentication requirements
  1. BIMI logo display (optional)
  1. Valid reverse DNS for sending IPs
Inbound routing and security stack:
  1. MX records routing mail to your servers
  1. A/AAAA records resolving MX hostnames
  1. MTA-STS policy requiring TLS
  1. TLS-RPT collecting delivery reports
  1. DANE TLSA records (optional)
  1. Valid TLS certificates on mail servers
Example complete mail DNS:
; Outbound authentication
example.com. IN TXT "v=spf1 ip4:192.0.2.10 -all"
selector._domainkey.example.com. IN TXT "v=DKIM1; k=rsa; p=MIGfMA0GCS..."
_dmarc.example.com. IN TXT "v=DMARC1; p=reject; rua=mailto:[email protected]"
; Inbound routing
example.com. IN MX 10 mail.example.com.
mail.example.com. IN A 192.0.2.10
; Inbound security
_mta-sts.example.com. IN TXT "v=STSv1; id=20240101T000000"
_smtp._tls.example.com. IN TXT "v=TLSRPTv1; rua=mailto:[email protected]"
; Reverse DNS (configured at ISP/hosting provider)
10.2.0.192.in-addr.arpa. IN PTR mail.example.com.

Failure Mode Analysis and Risk Assessment

Each record type has distinct failure modes with different impacts:
SPF failures:
  • Risk: Deliverability problems for outbound mail
  • Impact: Messages marked as spam or rejected
  • Detection: Delivery failure reports, increased spam complaints
  • Fix urgency: High for organizations sending significant mail
DKIM failures:
  • Risk: Authentication failures preventing DMARC pass
  • Impact: Reduced deliverability, especially with DMARC policy
  • Detection: DMARC reports, recipient spam classification
  • Fix urgency: Medium to high depending on DMARC policy
DMARC failures:
  • Risk: Inconsistent enforcement against forgery
  • Impact: Brand impersonation, reduced trust
  • Detection: DMARC aggregate reports
  • Fix urgency: Medium, but increases over time
MX failures:
  • Risk: Mail delivery completely broken
  • Impact: Lost email, sender bounce messages
  • Detection: Immediate and obvious
  • Fix urgency: Critical
MTA-STS failures:
  • Risk: TLS requirement breaks delivery from some senders
  • Impact: Delivery failures if certificates invalid
  • Detection: TLS-RPT reports, sender bounce messages
  • Fix urgency: High if enforce mode, medium if testing
TLS-RPT failures:
  • Risk: Missing visibility into delivery problems
  • Impact: Slower problem detection
  • Detection: Lack of expected reports
  • Fix urgency: Low
Reverse DNS failures:
  • Risk: Some receiving servers reject mail
  • Impact: Reduced deliverability
  • Detection: Delivery failures from specific receivers
  • Fix urgency: Medium

Configuration Checklists

Outbound Mail Setup Checklist

  • [ ] Create SPF record including all sending IPs
  • [ ] Generate DKIM key pair and publish public key
  • [ ] Configure mail server to sign outbound messages
  • [ ] Create DMARC record starting with p=none
  • [ ] Configure DMARC report reception
  • [ ] Monitor DMARC reports for authentication issues
  • [ ] Fix any SPF/DKIM failures for legitimate mail
  • [ ] Progress DMARC policy to quarantine then reject
  • [ ] Verify reverse DNS for all sending IPs
  • [ ] (Optional) Implement BIMI if trademark protected

Inbound Mail Setup Checklist

  • [ ] Create MX records pointing to mail servers
  • [ ] Ensure MX hostname A/AAAA records exist
  • [ ] Install valid TLS certificates on mail servers
  • [ ] Test TLS connectivity to mail servers
  • [ ] Create MTA-STS DNS record
  • [ ] Deploy MTA-STS policy file via HTTPS
  • [ ] Start MTA-STS in testing mode
  • [ ] Create TLS-RPT record
  • [ ] Monitor TLS-RPT reports
  • [ ] Progress MTA-STS to enforce mode
  • [ ] (Optional) Implement DANE if DNSSEC enabled

Combined Infrastructure Verification

  • [ ] Send test emails from your domain
  • [ ] Receive test emails at your domain
  • [ ] Verify SPF passes for outbound mail
  • [ ] Verify DKIM signatures valid
  • [ ] Check DMARC alignment
  • [ ] Confirm MX resolution works
  • [ ] Test TLS connectivity to MX servers
  • [ ] Review DMARC aggregate reports
  • [ ] Review TLS-RPT reports
  • [ ] Monitor deliverability metrics

Monitoring and Maintenance

Email infrastructure requires ongoing monitoring:
Daily monitoring:
  • Delivery failure spikes
  • Authentication failure increases
  • Certificate expiration warnings
Weekly monitoring:
  • DMARC aggregate report review
  • TLS-RPT report analysis
  • Deliverability trend analysis
Monthly monitoring:
  • SPF record accuracy as infrastructure changes
  • DKIM key rotation schedule adherence
  • MTA-STS policy updates if needed
Quarterly monitoring:
  • Comprehensive mail DNS audit
  • Test mail flow from diverse sources
  • Review and update documentation
Automated alerting for:
  • Certificate expiration within 30 days
  • SPF record lookup count exceeding limits
  • DMARC policy violations above threshold
  • MX record resolution failures
  • Reverse DNS mismatches

Common Pitfalls and How to Avoid Them

Pitfall 1: Configuring outbound authentication but forgetting inbound routing
Organizations focus on SPF/DKIM/DMARC to improve deliverability but forget to configure MX records, making their domain unable to receive mail.
Solution: Treat inbound and outbound as equal priorities during setup.
Pitfall 2: Overly restrictive SPF before testing
Setting v=spf1 -all before verifying all legitimate sending sources causes delivery failures.
Solution: Start permissive, monitor, then tighten restrictions.
Pitfall 3: DMARC p=reject without monitoring phase
Jumping directly to reject policy blocks legitimate mail that fails authentication.
Solution: Use p=none, analyze reports, fix issues, then progress to quarantine and reject.
Pitfall 4: Forgetting subdomains
SPF, DKIM, and DMARC don't automatically apply to subdomains. Each sending subdomain needs configuration.
Solution: Inventory all subdomains used for email and configure appropriately.
Pitfall 5: Certificate expiration on mail servers
Expired certificates break TLS, failing MTA-STS requirements and reducing deliverability.
Solution: Automate certificate renewal and monitoring.
Pitfall 6: Not updating MTA-STS policy ID
Policy changes require updating the ID field. Forgetting this means sending servers cache stale policies.
Solution: Automate policy deployment including ID updates.
Pitfall 7: DANE without understanding DNSSEC
Deploying DANE without properly secured DNSSEC can break mail delivery.
Solution: Fully implement and test DNSSEC before adding DANE.

Migration and Transition Strategies

When changing email infrastructure, careful transitions prevent disruption:
Changing mail providers:
  1. Configure new provider completely before DNS changes
  1. Add new provider's servers to SPF record
  1. Publish new DKIM keys alongside existing keys
  1. Update MX records with both old and new servers temporarily
  1. Monitor delivery to both systems
  1. Remove old servers after traffic fully migrates
  1. Clean up old SPF includes and DKIM keys
Consolidating domains:
  1. Configure forwarding from old domains to new domain
  1. Maintain mail DNS on old domains during transition
  1. Update external references to new email addresses
  1. Monitor old domains for continued usage
  1. Eventually convert old domains to forwarding-only
Implementing security standards:
  1. Start with monitoring modes (DMARC p=none, MTA-STS testing)
  1. Collect several weeks of reports
  1. Fix identified issues
  1. Progress to enforcement modes incrementally
  1. Continue monitoring for new issues

Conclusion

Email DNS operates bidirectionally, with outbound authentication records (SPF, DKIM, DMARC, BIMI) serving fundamentally different purposes than inbound routing records (MX, MTA-STS, TLS-RPT, DANE, reverse DNS). Success requires understanding each record's role, implementing both directions comprehensively, and maintaining configurations as infrastructure evolves. Organizations that systematically configure and monitor both outbound authentication and inbound security create reliable email infrastructure resistant to both deliverability problems and security threats. The complexity is significant, but the alternative, incomplete email configurations leading to delivery failures, security vulnerabilities, and brand impersonation, creates far greater problems than the investment in proper setup and maintenance.
ns
NameSilo StaffThe NameSilo staff of writers worked together on this post. It was a combination of efforts from our passionate writers that produce content to educate and provide insights for all our readers.
More articleswritten by NameSilo
Jump to
Smiling person asking you to sign up for newsletter
Namesilo Blog
Crafted with Care by Professionals

Millions of customers rely on our domains and web hosting to get their ideas online. We know what we do and like to share them with you.

This newsletter may contain advertising, deals, or affiliate links. Subscribing to a newsletter indicates your consent to our Terms of Use and Privacy Policy. You may unsubscribe from the newsletters at any time.