When a legitimate message lands in spam, adding another TXT record is rarely a reliable fix. Email authentication is a chain between DNS configuration, the service that actually sent the message, the visible From domain, and the receiving provider's policy. A useful investigation starts with a message that failed, identifies which domain each mechanism evaluated, then checks the published records for that exact identity.
SPF authorizes sending infrastructure for an envelope domain. DKIM checks a cryptographic signature associated with a signing domain and selector. DMARC evaluates whether an authenticated SPF or DKIM domain aligns with the domain a user sees in the From header, then publishes a receiver policy and optional reporting destinations. These checks complement one another; a green result for one does not automatically mean the other two passed.
Use a message sent through the real production path, then inspect its complete headers in the receiving mailbox's “show original” or equivalent view. Find the trusted Authentication-Results header added by the receiver. Record the reported SPF result and identity, DKIM result and header.d/selector, and DMARC result and header.from. Do not trust a similarly named header inserted earlier by an untrusted sender. Message headers can contain private addresses and routing details, so redact those before sharing them in tickets or public forums.
The identities matter. SPF usually evaluates the SMTP MAIL FROM domain, or the HELO/EHLO identity in some cases. The visible From address may be different. DKIM uses the signing domain in d= and selector in s=. DMARC compares these authenticated domains with the visible From domain under its alignment rules. A technically valid signature from an unrelated provider domain might not align with your From domain.
Run queries from a terminal using a trusted resolver. Replace example.com with a domain you administer. SPF is published as a TXT record at the envelope domain. DMARC is queried at _dmarc plus the organizational domain. DKIM is queried at <selector>._domainkey.<signing-domain> using the selector shown in the message header.
dig +short TXT example.com
dig +short TXT _dmarc.example.com
dig +short TXT selector1._domainkey.example.com
If the selector is unknown, a guessed selector is not proof that DKIM is broken. Retrieve it from a real signed message or the sending provider's configuration. Check authoritative DNS as well as a public recursive resolver when investigating propagation. Compare TTL and nameserver answers; a correct record at one authoritative provider does not help if the domain's delegation points elsewhere.
There should be one SPF policy record for a given domain. Multiple v=spf1 records cause evaluation errors at many receivers. Confirm every service that sends mail for that domain, including web applications, ticket systems, marketing platforms, invoice providers, and internal relays. Remove services that no longer send, but do not delete an include until the service owner confirms it is unused.
RFC 7208 limits SPF evaluation to ten DNS-query-causing terms. include, a, mx, ptr, exists, and redirect can consume this budget. Nested includes count as the receiver evaluates them, so a short-looking record can exceed the limit. The ip4 and ip6 mechanisms do not consume this DNS-term limit, though maintaining long static address lists can create other operational problems. Avoid +all; it authorizes every sender. Understand the consequences before changing a qualifier from ~all to -all, because legitimate unlisted senders may then fail.
When SPF returns permerror, inspect duplicate records, syntax, and lookup depth. When it returns softfail or fail, compare the connecting sender's identity with the actual authorized senders. Do not “fix” an alignment failure by indiscriminately adding the visible From domain's SPF record; DMARC alignment and SPF authorization are related but distinct checks.
Use s= and d= from the DKIM-Signature header to form the DNS name. For example, s=mail2026 and d=example.com point to mail2026._domainkey.example.com. A missing TXT answer can indicate a typo, wrong DNS zone, incomplete delegation, or a provider rotation that was not published. A key can be present yet the signature fail because a gateway modified signed headers or the message body after signing. Check the receiving provider's reported reason and compare results across the sender and receiver paths.
When rotating keys, publish the new selector first, verify it from public resolvers, switch signing to the new key, then retain the old public key long enough for messages already in transit and delayed retries. Remove an old selector only after the sending provider's documented overlap window and your own mail-flow evidence show it is no longer needed. Never publish a private signing key in DNS, a support ticket, or a repository.
Start by verifying that every legitimate stream uses an aligned SPF or DKIM identity. A monitoring policy with aggregate reporting can reveal senders the team did not know existed. Reports describe observed flows; they do not certify that a domain is safe or that every message is legitimate. Decide who will receive reports, how long they will be retained, and whether an external processor may handle the data. Aggregate reports can include source IPs and sender-domain information, so treat them as operational data.
Move to quarantine or reject only after the inventory and remediation process is complete. Test delegated subdomains and third-party senders, review a representative reporting period, and define how rollback works. DMARC policy is a receiver instruction, not a guarantee of delivery or a complete anti-phishing system. Receivers retain their own filtering decisions.
This sequence prevents a common operational mistake: changing several records at once, then not knowing which change affected delivery. Keep the previous record values and planned rollback in the change ticket. Make changes through the authoritative DNS control plane, not by copying a record from an unrelated domain or an online checker.
Editorial status: Owner authorized publication without an individual reviewer. DNS examples use documentation domains.