The receiving mail server writes its verdict into the message itself, in a header line called Authentication-Results. The standard behind it says the field indicates "the results of message authentication efforts".1 You read that line to see what the receiver decided.
Opening the full header
Headers are the lines above the message body that most mail programs hide. Every program names the command differently.
Gmail's help page gives these steps: open the email, click More next to Reply, choose Show original, and then use Copy to clipboard if you want a copy.2 The same page lists commands for other programs, such as View Message Source, View Full Headers or Properties, depending on the program.2 Check your own program's help if it isn't listed.
Finding the line
Search the header text for "Authentication-Results". It starts with the name of the server that did the checking, then a list of results separated by semicolons.1
The standard's examples are short. One reads:1
Authentication-Results: example.com; spf=pass smtp.mailfrom=example.net
Another shows a DKIM result:1
dkim=pass (good signature) header.d=example.com
Each result has a method name, an equals sign and an outcome. After that come properties that say which domain was checked.
What the pieces tell you
- spf=pass means the sending server was on the domain's list. Other outcomes include fail, softfail, neutral and permerror, explained in the SPF page.
- dkim=pass means a signature verified. The
header.dpart names the signing domain, which is thed=value from the signature.1 - spf=fail means the receiver found the sending server wasn't authorised for the domain it checked. The standard's examples show this result with a
smtp.mailfromproperty naming that domain.1 - dmarc=pass or dmarc=fail shows up on receivers that check DMARC. DMARC depends on whether the domains line up.3
The domains named in each result are the thing to compare. The smtp.mailfrom property shows the domain SPF checked, and header.d shows the one DKIM checked. Neither has to be the address in the From line. A message can show spf=pass for one domain and dkim=pass for another, yet still fail DMARC if neither matches the visible From domain. Alignment, described in the DMARC explainer, is the reason.
Cautions when reading it
Not every receiver adds this line, and different receivers word it differently. The standard is a specification that servers can follow, so layout varies.1
Messages can pick up several of these lines as they travel. Trust the one written by your own receiving server, which is usually at the top, and not lines that arrived with the message.
A fail doesn't always mean fraud. A forwarded message or a service you forgot to add to your SPF record can fail honestly. Compare against what's published by looking up the records. If something needs changing, adding records at your DNS host covers the steps.