25 Nov 2026 · 7 min read · EN

How to read SPF, DKIM and DMARC in received email headers (cPanel runbook)

A concise runbook to test SPF, DKIM and DMARC on a real message: prepare a real send, fetch the full message source in cPanel webmail, read the Authentication-Results and headers, and act on common failures.

By Tim Gocelerus

How to read SPF, DKIM and DMARC in received email headers (cPanel runbook)

Problem

You need to prove that a real message sent from your production sending hostname reaches a recipient mailbox with SPF, DKIM and DMARC intact and aligned. This runbook walks through preparing a real test message, fetching the full source from cPanel webmail, reading the key headers and diagnosing the common causes of DMARC failures.

Before you send: prepare the exact message and path

  1. Use the exact template you will send in production (links, tracking, unsubscribe, footers). Tests with simplified samples can miss real problems. The test must prove one specific message from the exact sending system and domain you plan to use.
  2. Send from the production sending hostname and envelope (Return-Path) that your mail software will use in production. If you use a third-party sending service, send through that same service for the test.
  3. Use an account you control as the recipient so you can open the received copy (not the Sent folder) and fetch the full message source. When configuring clients or devices to send through your SMTP server, follow your client or provider instructions for SMTP submission (see RFC 6409 for the standard behaviour of submission on port 587). If you are testing from a mobile or desktop app, check whether that app forces its own SMTP relay before assuming traffic goes via your system.

Send: use submission properly

  1. Send the message from the system you intend to use. Where you control the sending MTA, use SMTP submission (port 587) with STARTTLS and SMTP AUTH when possible; this is the standard method for message submission. If you must configure an email client or device, use the incoming/outgoing settings recommended by the provider or client documentation.

Note: some mobile/desktop apps (for example, some configurations of Outlook mobile) may force outgoing mail through their own relays unless you explicitly configure custom SMTP settings. Verify your client actually uses the SMTP hostname you supplied.

Fetch the full message source in cPanel webmail

  1. Open the received message in cPanel webmail (Roundcube).
  2. Use More → View source (or Show Source) to view the full headers and body. Save or copy the full source for inspection.

If you are using a different webmail or an IMAP client, use that client’s “view source” or “show original” feature to obtain the complete raw headers and body. Consult the client’s help pages if you cannot find that option.

What to look for in the headers (key fields)

Read these header fields exactly as shown in the raw source.

  • Received: the chain of SMTP hops. Use these to confirm the message came from the host/IP you expect and to find which host performed checks.
  • Return-Path: the envelope MAIL FROM (the SPF-checked identity in many systems).
  • From: the visible RFC5322.From header — the domain DMARC uses for alignment checks.
  • DKIM-Signature: contains the d= domain (the signing domain) and the selector (s=). If DKIM is applied, a DKIM-Signature header will be present.
  • Authentication-Results: the receiving server’s authentication summary. This line is the first place to see results such as spf=pass or fail, dkim=pass or fail, and dmarc=pass or fail, often with the domains checked.
  • Received-SPF or similar headers: some receivers add these; treat them as supplemental information.

Example (illustrative) Authentication-Results header you might see:

Authentication-Results: mx.example.net;
    spf=pass smtp.mailfrom=mail.example.net;
    dkim=pass header.d=example.com;
    dmarc=pass header.from=example.com

Do not assume names or values other than what appears in your message: read the exact domains the receiver recorded.

Checking alignment (how DMARC is evaluated)

  1. From the Authentication-Results, note which domain the receiver used for SPF (often reported as smtp.mailfrom or mailfrom) and which domain is shown for DKIM (header.d=).
  2. Compare those domains to the header From domain (the visible From:). DMARC requires that either SPF or DKIM not only pass, but also be in alignment with the header From domain (exact match or match under the receiver’s relaxed rules). If neither SPF nor DKIM both pass and align, DMARC will fail.

If Authentication-Results shows dmarc=fail, inspect which of spf and dkim are pass/fail and which domains were used — the header tells you whether the failure is due to authentication failures or alignment failures.

Common failures and how to diagnose them

  1. SPF fail (or spf=pass but not aligned)
    • What to read: Authentication-Results shows spf=fail or spf=pass smtp.mailfrom=domain.
    • Likely causes: the envelope MAIL FROM domain (Return-Path) is not covered by the domain’s published SPF TXT record, or the message actually originated from an IP not listed in the SPF record.
    • How to check: confirm the Return-Path domain in the headers, then check that domain’s TXT record for an SPF value. Use DNS tools (dig/nslookup) to read the TXT record, for example:
dig +short TXT example.com
nslookup -type=TXT example.com
  • Fix: publish an SPF record that authorises the sending host/IP or include the third-party sender’s mechanism, or change the envelope domain to one covered by SPF for that sending path.
  1. DKIM fail (dkim=fail)
    • What to read: DKIM-Signature header and Authentication-Results which may report header.d and the selector s=.
    • Likely causes: the signing key deployed by the sending MTA doesn’t match the public key in DNS, the DKIM signature was broken by an intermediate rewriting step (some gateways alter headers/body), or the wrong selector/domain is being used.
    • How to check: note the selector s= and domain d= in DKIM-Signature, then fetch the matching TXT record at selector._domainkey.domain. Example (conceptual):
selector._domainkey.example.com  TXT  "v=DKIM1; p=..."
  • Fix: ensure the sending system uses the private key corresponding to the published public key, and avoid intermediaries that modify signed parts of the message.
  1. DMARC fail (dmarc=fail)
    • What to read: Authentication-Results will show which of spf/dkim passed or failed and which domains were used.
    • Likely causes: neither SPF nor DKIM both passed and aligned with the header From. This often happens when using third-party senders without proper alignment, or when a forwarding service rewrites envelope addresses.
    • How to check: confirm whether SPF or DKIM passed and whether their domains match header From. If a third party sends on your behalf, either get them to sign with your domain (DKIM) or have the envelope domain match an SPF-authorised domain that aligns with your From, or use a subdomain strategy and DMARC policy appropriate to testing.

Re-run the test and observe placement

  1. After making changes (SPF record edit, DKIM key fix, sending-system change), send the same real template again and fetch the full source. Compare Authentication-Results and Received headers before and after.
  2. Also note mailbox placement (inbox, spam, blocked) as part of the test result; authentication can pass yet deliverability still be poor for other reasons.

When to seek logs or provider help

If headers show the message was accepted by an intermediate relay you do not control, or the receiver’s Authentication-Results references a different hostname/IP than you expect, ask the relay/provider for their SMTP logs showing the MAIL FROM, helo/ehlo, DKIM signing action and the IP they used to submit. Give them the message-id and timestamps from your headers.

Gocelerus

Gocelerus is cPanel web hosting for Southeast Asia, serving Indonesia and Cambodia first.

Sources

Manage your cPanel servers from one dashboard

Connect your WHM to Gocelerus and manage PHP, SSL, and WordPress across all your cPanel accounts from one place.