{"skills":[{"name":"Explain an email\u2019s authentication results","description":"Read a received message\u2019s trusted authentication results and separate what they establish from the mailbox provider\u2019s private delivery decision.","content":"# Explain an email\u2019s authentication results\n\nRead a received message\u2019s trusted authentication results and separate what they establish from the mailbox provider\u2019s private delivery decision.\n\n## When to use this skill\n\n- Someone pastes the full headers of a received message and asks what the SPF, DKIM and DMARC results mean.\n- A sender is told their mail fails DMARC at a recipient and wants to read the recipient's own verdict.\n- A message landed in spam or quarantine and someone wants to know what the authentication results do and do not explain.\n\n## When not to use it\n\n- Fixing the sending domain's SPF, DKIM or DMARC DNS records. That is configuration work that needs the DNS records and sending services, not received headers.\n- Proving why a provider filtered a message. Only the provider's own placement record or support team can say; authentication is one input among many.\n- Investigating suspected phishing or account compromise. Pass the original message to the organisation's security team or the provider's abuse process.\n\n## What you need\n\n- Original received-message headers or a redacted export that retains Authentication-Results fields.\n- The receiving provider\u2019s trusted authentication service identifier and gateway provenance, plus any explicit placement evidence.\n\n## Ask before you start\n\nIf any of these are missing or unclear, ask before doing the work.\n\n- Can you supply the full original headers of the received message (often 'Show original' or 'View source'), not a forwarded copy? Forwarding adds and loses headers.\n- Which mail system received the message, and what authentication service identifier does it stamp, often its own domain or hostname? Only results it added inside its trust boundary can be relied on.\n- Is there a placement or quarantine record from the provider, such as a message trace entry with a reason? Without one, the reason for spam placement stays unknown.\n- Do the headers contain addresses or other personal details that should be redacted before sharing?\n\n## Method\n\n1. Unfold folded header lines (continuation lines start with whitespace). Read Authentication-Results fields from the top down: each receiving system adds its own at the top, so the uppermost field from the final receiver is normally the relevant one.\n2. Take each field's authentication service identifier, the token before the first semicolon. Rely only on fields whose identifier belongs to the receiving system and which it added inside its trust boundary. RFC 8601 requires receivers to delete forged fields claiming their identifier, but a field from another relay, or one copied by a sender, is not the receiver's verdict.\n3. From each trusted field, read each method separately and keep header order: spf with smtp.mailfrom or smtp.helo (the envelope identity checked), dkim with header.d (the signing domain), dmarc with header.from (the visible From domain). Keep results such as temperror and permerror exactly as recorded.\n4. Explain DMARC from the receiver's own dmarc result rather than recombining SPF and DKIM yourself. DMARC passes when SPF or DKIM passes for a domain aligned with the From domain, so a message can fail SPF and still pass DMARC on an aligned DKIM signature.\n5. Treat a missing method as no result, not as a failure. If no field can be trusted, say so and give no verdict.\n6. Give a placement reason only from an explicit receiver record, such as a reason code in a message trace. A DMARC pass does not guarantee inbox delivery, and a failure alone does not prove why a message was filtered.\n7. Keep message bodies, addresses and full headers local, and redact personal details before quoting results back.\n\n## Checks before you deliver\n\n- An upstream relay's pass can coexist with a failure at the final recipient. Combining results across services creates an invented verdict.\n- A passing signature does not guarantee inbox placement. An authentication failure alone cannot prove the reason a message landed in spam.\n- Results read from a forwarded copy mix in the forwarding system's checks. Ask for the original message's headers.\n- SPF checks the envelope sender in smtp.mailfrom, which is often a sending service's domain rather than the From address. An SPF pass on that domain does not by itself mean DMARC alignment.\n- Guides written for RFC 7489 are out of date in places. DMARC is now RFC 9989, which uses a DNS tree walk rather than only a public suffix list to find the organisational domain.\n\n## How to present the result\n\nLead with which system's results were used and why they can be trusted. Then give a short table of SPF, DKIM and DMARC with each recorded result and the domain it applied to, in header order. Explain in plain words what each result means for this message, say whether the placement reason is known, and list the evidence that would settle any open question, such as the provider's message trace.\n\n## Worked example\n\n**Request:** Read the trusted receiver evidence. Only the first field is confirmed stamped by our recipient gateway mx.example. There is no placement log.\n\n**Supplied material:**\n\n```text\nAuthentication-Results: mx.example; spf=fail smtp.mailfrom=sender.example;\n dkim=pass header.d=sender.example; dmarc=pass header.from=sender.example\nAuthentication-Results: relay.example; spf=pass smtp.mailfrom=sender.example\n```\n\n**Answer:** The recipient gateway recorded SPF fail, DKIM pass and DMARC pass. The relay\u2019s separate SPF pass describes another check. The headers provide no reason for inbox or spam placement.\n\n## Structured output for tests\n\nFor an ordinary job, answer in the format above and point back to the supplied evidence. Use this structure only for the test cases published with this skill, or when someone asks for structured JSON.\n\nReturn spf, dkim and dmarc as arrays of lowercase verdicts from trusted fields in header order, empty where unavailable. Return placement_reason as the receiver's explicit reason code or null.\n\n## Sources\n\n- [RFC 8601, Authentication-Results](https:\/\/www.rfc-editor.org\/rfc\/rfc8601.html): Defines the Authentication-Results header, the authentication service identifier, result values such as pass, fail, temperror and permerror, and the trust boundary. It requires receivers to delete forged fields claiming their own identifier and says the field is added at the top like a trace header, which is why the skill reads only the receiver's own fields.\n- [RFC 9989, DMARC](https:\/\/www.rfc-editor.org\/rfc\/rfc9989.html): The current DMARC standard, which obsoletes RFC 7489. It defines relaxed and strict alignment between the domain that passed SPF or DKIM and the From domain, introduces the DNS tree walk, and states that a DMARC pass does not by itself mean delivery to the inbox is safe or desirable.\n\nTest cases and an answer checker for this skill: https:\/\/skills.raq.com\/skills\/explain-email-authentication-results\n","scope":"contextual","trigger_keywords":["Explain an email\u2019s authentication results","explain-email-authentication-results","explain email authentication results","What do the SPF, DKIM and DMARC results in this email\u2019s headers mean?","What do the SPF, DKIM and DMARC results in this email\u2019s headers mean","email authentication results","explain this dmarc result","interpret authentication-results"],"is_private":true,"is_active":true,"scripts":[{"name":"explain-email-authentication-results-check","description":"Compare a saved JSON answer with a published test. Pass tests\/case-1\/expected.json (or another case) and the path to your answer.","language":"python","filename":"explain-email-authentication-results-check.py","content":"from pathlib import Path\nimport runpy\n\nrunpy.run_path(str(Path(__file__).parent \/ 'tests' \/ 'check.py'), run_name='__main__')\n","supporting_files":[{"path":"SKILL.md","content":"---\nname: explain-email-authentication-results\ndescription: \"Read an email's Authentication-Results headers from the receiving mail system and explain the SPF, DKIM and DMARC verdicts it recorded, without guessing why the message went to spam. Use when someone pastes email headers and asks why SPF or DMARC failed or what the results mean.\"\nlicense: CC-BY-4.0\nmetadata:\n  author: Raq.com\n  version: \"2026-11-22\"\n  homepage: https:\/\/skills.raq.com\/skills\/explain-email-authentication-results\n---\n\n# Explain an email\u2019s authentication results\n\nRead a received message\u2019s trusted authentication results and separate what they establish from the mailbox provider\u2019s private delivery decision.\n\n## When to use this skill\n\n- Someone pastes the full headers of a received message and asks what the SPF, DKIM and DMARC results mean.\n- A sender is told their mail fails DMARC at a recipient and wants to read the recipient's own verdict.\n- A message landed in spam or quarantine and someone wants to know what the authentication results do and do not explain.\n\n## When not to use it\n\n- Fixing the sending domain's SPF, DKIM or DMARC DNS records. That is configuration work that needs the DNS records and sending services, not received headers.\n- Proving why a provider filtered a message. Only the provider's own placement record or support team can say; authentication is one input among many.\n- Investigating suspected phishing or account compromise. Pass the original message to the organisation's security team or the provider's abuse process.\n\n## What you need\n\n- Original received-message headers or a redacted export that retains Authentication-Results fields.\n- The receiving provider\u2019s trusted authentication service identifier and gateway provenance, plus any explicit placement evidence.\n\n## Ask before you start\n\nIf any of these are missing or unclear, ask before doing the work.\n\n- Can you supply the full original headers of the received message (often 'Show original' or 'View source'), not a forwarded copy? Forwarding adds and loses headers.\n- Which mail system received the message, and what authentication service identifier does it stamp, often its own domain or hostname? Only results it added inside its trust boundary can be relied on.\n- Is there a placement or quarantine record from the provider, such as a message trace entry with a reason? Without one, the reason for spam placement stays unknown.\n- Do the headers contain addresses or other personal details that should be redacted before sharing?\n\n## Method\n\n1. Unfold folded header lines (continuation lines start with whitespace). Read Authentication-Results fields from the top down: each receiving system adds its own at the top, so the uppermost field from the final receiver is normally the relevant one.\n2. Take each field's authentication service identifier, the token before the first semicolon. Rely only on fields whose identifier belongs to the receiving system and which it added inside its trust boundary. RFC 8601 requires receivers to delete forged fields claiming their identifier, but a field from another relay, or one copied by a sender, is not the receiver's verdict.\n3. From each trusted field, read each method separately and keep header order: spf with smtp.mailfrom or smtp.helo (the envelope identity checked), dkim with header.d (the signing domain), dmarc with header.from (the visible From domain). Keep results such as temperror and permerror exactly as recorded.\n4. Explain DMARC from the receiver's own dmarc result rather than recombining SPF and DKIM yourself. DMARC passes when SPF or DKIM passes for a domain aligned with the From domain, so a message can fail SPF and still pass DMARC on an aligned DKIM signature.\n5. Treat a missing method as no result, not as a failure. If no field can be trusted, say so and give no verdict.\n6. Give a placement reason only from an explicit receiver record, such as a reason code in a message trace. A DMARC pass does not guarantee inbox delivery, and a failure alone does not prove why a message was filtered.\n7. Keep message bodies, addresses and full headers local, and redact personal details before quoting results back.\n\n## Checks before you deliver\n\n- An upstream relay's pass can coexist with a failure at the final recipient. Combining results across services creates an invented verdict.\n- A passing signature does not guarantee inbox placement. An authentication failure alone cannot prove the reason a message landed in spam.\n- Results read from a forwarded copy mix in the forwarding system's checks. Ask for the original message's headers.\n- SPF checks the envelope sender in smtp.mailfrom, which is often a sending service's domain rather than the From address. An SPF pass on that domain does not by itself mean DMARC alignment.\n- Guides written for RFC 7489 are out of date in places. DMARC is now RFC 9989, which uses a DNS tree walk rather than only a public suffix list to find the organisational domain.\n\n## How to present the result\n\nLead with which system's results were used and why they can be trusted. Then give a short table of SPF, DKIM and DMARC with each recorded result and the domain it applied to, in header order. Explain in plain words what each result means for this message, say whether the placement reason is known, and list the evidence that would settle any open question, such as the provider's message trace.\n\n## Worked example\n\n**Request:** Read the trusted receiver evidence. Only the first field is confirmed stamped by our recipient gateway mx.example. There is no placement log.\n\n**Supplied material:**\n\n```text\nAuthentication-Results: mx.example; spf=fail smtp.mailfrom=sender.example;\n dkim=pass header.d=sender.example; dmarc=pass header.from=sender.example\nAuthentication-Results: relay.example; spf=pass smtp.mailfrom=sender.example\n```\n\n**Answer:** The recipient gateway recorded SPF fail, DKIM pass and DMARC pass. The relay\u2019s separate SPF pass describes another check. The headers provide no reason for inbox or spam placement.\n\n## Structured output for tests\n\nFor an ordinary job, answer in the format above and point back to the supplied evidence. Use this structure only for the test cases published with this skill, or when someone asks for structured JSON.\n\nReturn spf, dkim and dmarc as arrays of lowercase verdicts from trusted fields in header order, empty where unavailable. Return placement_reason as the receiver's explicit reason code or null.\n\n## Sources\n\n- [RFC 8601, Authentication-Results](https:\/\/www.rfc-editor.org\/rfc\/rfc8601.html): Defines the Authentication-Results header, the authentication service identifier, result values such as pass, fail, temperror and permerror, and the trust boundary. It requires receivers to delete forged fields claiming their own identifier and says the field is added at the top like a trace header, which is why the skill reads only the receiver's own fields.\n- [RFC 9989, DMARC](https:\/\/www.rfc-editor.org\/rfc\/rfc9989.html): The current DMARC standard, which obsoletes RFC 7489. It defines relaxed and strict alignment between the domain that passed SPF or DKIM and the From domain, introduces the DNS tree walk, and states that a DMARC pass does not by itself mean delivery to the inbox is safe or desirable.\n\nTest cases and an answer checker for this skill: https:\/\/skills.raq.com\/skills\/explain-email-authentication-results\n"},{"path":"LICENSE.txt","content":"Original Raq.com instructions and synthetic examples: CC BY 4.0.\nhttps:\/\/creativecommons.org\/licenses\/by\/4.0\/\nAttribution: Raq.com, https:\/\/skills.raq.com\/skills\/explain-email-authentication-results\nReferenced third-party materials retain their own terms.\n"},{"path":"examples\/worked-example.md","content":"# Two gateways disagree\n\nRead the trusted receiver evidence. Only the first field is confirmed stamped by our recipient gateway mx.example. There is no placement log.\n\n## Supplied material\n\nAuthentication-Results: mx.example; spf=fail smtp.mailfrom=sender.example;\n dkim=pass header.d=sender.example; dmarc=pass header.from=sender.example\nAuthentication-Results: relay.example; spf=pass smtp.mailfrom=sender.example\n\n## Worked answer\n\nThe recipient gateway recorded SPF fail, DKIM pass and DMARC pass. The relay\u2019s separate SPF pass describes another check. The headers provide no reason for inbox or spam placement.\n\n## Reasoning\n\nThe DKIM result can support DMARC even though SPF failed. The relay's separate verdict is outside the requested boundary.\n"},{"path":"tests\/check.py","content":"\"\"\"Check a saved agent answer locally with Python 3 (standard library only).\"\"\"\nimport json\nimport math\nimport sys\nfrom pathlib import Path\n\n\ndef compare(expected, actual, path=\"$\", accepted=None):\n    if isinstance(expected, bool) or isinstance(actual, bool):\n        if expected is not actual:\n            yield path\n    elif isinstance(expected, (int, float)) and isinstance(actual, (int, float)):\n        if not math.isclose(expected, actual, rel_tol=0, abs_tol=1e-8):\n            yield path\n    elif isinstance(expected, dict) and isinstance(actual, dict):\n        for key in sorted(set(expected) | set(actual)):\n            if key not in expected or key not in actual:\n                yield f\"{path}.{key}\"\n            elif not any(\n                not list(compare(option, actual[key]))\n                for option in (accepted or {}).get(key, [])\n            ):\n                yield from compare(expected[key], actual[key], f\"{path}.{key}\")\n    elif isinstance(expected, list) and isinstance(actual, list):\n        if len(expected) != len(actual):\n            yield f\"{path} (length)\"\n        for i, (left, right) in enumerate(zip(expected, actual)):\n            yield from compare(left, right, f\"{path}[{i}]\")\n    elif type(expected) != type(actual) or expected != actual:\n        yield path\n\n\ndef main():\n    if len(sys.argv) != 3:\n        raise SystemExit(\"Usage: python3 check.py expected.json answer.json\")\n    try:\n        expected, actual = [json.loads(Path(p).read_text(encoding=\"utf-8\")) for p in sys.argv[1:]]\n        alternatives = Path(sys.argv[1]).with_name(\"accepted.json\")\n        accepted = json.loads(alternatives.read_text(encoding=\"utf-8\")) if alternatives.is_file() else {}\n    except (ValueError, OSError) as error:\n        raise SystemExit(str(error))\n    differences = list(compare(expected, actual, accepted=accepted))\n    if differences:\n        raise SystemExit(\"Different fields: \" + \", \".join(differences))\n    print(\"Pass\")\n\n\nif __name__ == \"__main__\":\n    main()\n"},{"path":"tests\/README.md","content":"Give your agent SKILL.md and one request.txt in a fresh session. Keep the expected answer aside. Save the reply as answer.json, then run this from the tests folder:\n\n    python3 check.py case-1\/expected.json answer.json\n\nEach case also has an explanation. Where accepted.json exists, the checker accepts the alternatives listed there.\n"},{"path":"tests\/case-1\/request.txt","content":"Read the trusted receiver evidence. Only the first field is confirmed stamped by our recipient gateway mx.example. There is no placement log.\nReturn only the JSON specified in SKILL.md for this test.\n\nAuthentication-Results: mx.example; spf=fail smtp.mailfrom=sender.example;\n dkim=pass header.d=sender.example; dmarc=pass header.from=sender.example\nAuthentication-Results: relay.example; spf=pass smtp.mailfrom=sender.example\n"},{"path":"tests\/case-1\/expected.json","content":"{\n    \"spf\": [\n        \"fail\"\n    ],\n    \"dkim\": [\n        \"pass\"\n    ],\n    \"dmarc\": [\n        \"pass\"\n    ],\n    \"placement_reason\": null\n}\n"},{"path":"tests\/case-1\/explanation.txt","content":"The DKIM result can support DMARC even though SPF failed. The relay's separate verdict is outside the requested boundary.\n"},{"path":"tests\/case-2\/request.txt","content":"The only authentication field was copied by the sender. Provider placement export contains reason code USER_RULE.\nReturn only the JSON specified in SKILL.md for this test.\n\nAuthentication-Results: mx.example; spf=pass; dkim=pass; dmarc=pass\nplacement.reason=USER_RULE\n"},{"path":"tests\/case-2\/expected.json","content":"{\n    \"spf\": [],\n    \"dkim\": [],\n    \"dmarc\": [],\n    \"placement_reason\": \"USER_RULE\"\n}\n"},{"path":"tests\/case-2\/explanation.txt","content":"A familiar service name cannot make the sender-supplied field trustworthy. The separate provider record establishes the reason code.\n"}],"is_active":true,"is_approved":false}]}]}