How SPF, DKIM, and DMARC Work Together

SPF, DKIM, and DMARC answer related but different questions about an email. SPF checks whether the connecting mail server is authorized to send for a domain, while DKIM verifies a cryptographic signature associated with a signing domain. DMARC checks whether at least one passing result also aligns with the domain in the visible From address. A message does not need both SPF and DKIM to pass for DMARC to pass.
The distinction matters because an email can pass a technical check for a domain unrelated to the address shown to the reader. Conversely, a legitimate forwarded message can fail one check while another aligned mechanism still succeeds. DMARC also lets domain owners state how receivers should handle messages that fail the check and request reports on mail using their domains.
Identify the Domains Used by Each Check
An email has a visible author address in its From header, such as news@example.com. The domain after the @ sign is the domain DMARC seeks to validate. SMTP delivery also uses an envelope sender address, supplied in the MAIL FROM command and used for delivery error notifications. Its domain may be bounce.example.com, example.com, or a service provider's domain; it need not match the From domain.
DKIM introduces another identity: the signing domain identified by the d tag in a DKIM-Signature header field. A provider may sign for its own domain or for a customer domain, depending on configuration. When you read authentication results, note the specific domain tied to each pass or fail. An SPF pass alone is incomplete information for DMARC; you also need to know whether the authenticated domain aligns with the From domain.
What SPF Authorizes
SPF checks the connecting server's IP address against a domain's authorization policy in DNS. For a message with a nonempty envelope sender, DMARC uses SPF's result for the MAIL FROM identity; a separate pass for the server's HELO or EHLO greeting does not replace that MAIL FROM result. If the domain's SPF policy authorizes the connecting server, SPF can pass for that domain. A service could legitimately send with its own envelope domain while displaying a different customer's From domain.
SPF evaluates the server that connects directly to the receiver. If a forwarding service sends a message onward from its own IP while retaining the original envelope sender, the final receiver may see an IP outside that domain's authorization. That can cause SPF to fail even though the original sender was authorized. SPF checks the server's authorization to send for a domain; it does not identify the person who wrote the message or examine its content for threats.
What DKIM Signs
DKIM uses a signature added by a sending system and a public key published in DNS. A receiver uses that key to verify the signed portions of the message for the signing domain. A valid signature associates the message with that domain and helps detect changes to covered content. It does not by itself establish that the signing domain matches the From domain or that the named person sent the message.
A message may have more than one DKIM signature. DMARC can use any valid signature whose signing domain aligns with the From domain. An intermediary that alters signed content can break a signature, while a signature over unchanged content may remain valid after forwarding even when SPF no longer passes. The two checks can therefore produce different results for the same legitimate message.
How DMARC Combines Authentication and Alignment
DMARC compares the From domain with domains that passed SPF or DKIM. A message passes DMARC if SPF or DKIM passes for an aligned domain. If neither check meets both conditions, the message fails DMARC. Passing SPF and DKIM for an unrelated provider domain is insufficient because those results do not validate the domain displayed in From.
Strict alignment requires an exact domain match. Relaxed alignment allows domains that share an organizational domain, so bounce.example.com can align with example.com when example.com is their organizational domain. The organizational domain marks the common administrative boundary used for this comparison; similar spelling is not enough. Domain owners can select separate alignment modes for SPF and DKIM.
These rules matter when a business uses a third-party mailer. If the provider retains its own unrelated envelope domain, its SPF pass does not authenticate the customer's From domain for DMARC. The customer can instead configure the provider to add a DKIM signature using an aligned customer domain. Strict mode requires that signing domain to match the From domain exactly, so check which domains each authorized service uses before changing alignment settings.
Three Scenarios Using the Same From Domain
Consider a hypothetical message with From: updates@example.com, an envelope sender at bounce.example.com, and a valid DKIM signature with d=example.com. Assume example.com is the organizational domain and a valid DMARC policy applies. If SPF passes for bounce.example.com, that result aligns in relaxed mode but not strict mode. The valid DKIM signature matches example.com exactly, so DMARC passes in either mode through DKIM.
Now keep the same From address but change both authenticated domains to mailer.example.net. Even if SPF and DKIM both pass, neither domain aligns with example.com, so DMARC fails. Successful authentication of the provider's domain cannot substitute for authentication of the domain in From.
Finally, suppose forwarding causes SPF to fail but the original DKIM signature for example.com remains valid. DMARC still passes through DKIM. If the intermediary also changes signed content enough to invalidate that signature and no other aligned check passes, DMARC fails. The result depends on the received message and its delivery path, not simply on whether the original sender enabled both mechanisms.
DMARC Policies, Reports, and Delivery Decisions
A domain owner publishes a DMARC policy in DNS. The value p=none requests no particular handling of failures, p=quarantine asks receivers to treat them as suspicious, and p=reject requests rejection. Aggregate reports summarize authentication results across sending sources, including messages that pass as well as those that fail. They can reveal legitimate services that lack alignment before a domain owner adopts a stricter policy.
The receiver still makes the delivery decision using its own filtering and other evidence. Passing DMARC does not certify harmless content or guarantee inbox placement, while legitimate indirect mail can fail after forwarding or mailing-list changes. Before tightening policy, identify authorized senders and examine how their messages reach recipients. A domain-wide change based on one bounced message can disrupt other legitimate mail.
Reports describe patterns across many messages, while an individual message's authentication results describe a particular receiver's evaluation. For that message, compare the From domain, the envelope domain, and each relevant DKIM signing domain with the recorded results. Use authentication results recorded by your receiving service or by another system that service trusts. An authentication header supplied by an untrusted sender can be forged.







