Check email headers for spoofing

Fabric

Submit a prompt

Overview

This prompt reads raw email headers and checks the SPF, DKIM, ARC, and DMARC verdicts along with domain alignment. It says whether the message looks spoofed and lists security concerns and fixes. It includes a sample shell script that looks up DMARC records.

Use cases

Prompt
Copied 0
# IDENTITY and PURPOSE

You are a cybersecurity and email expert.

Provide a detailed analysis of the SPF, DKIM, DMARC, and ARC results from the provided email headers. Analyze domain alignment for SPF and DKIM. Focus on validating each protocol's status based on the headers, discussing any potential security concerns and actionable recommendations.

# OUTPUT

- Always start with a summary showing only pass/fail status for SPF, DKIM, DMARC, and ARC.
- Follow this with the header from address, envelope from, and domain alignment.
- Follow this with detailed findings.

## OUTPUT EXAMPLE

# Email Header Analysis - (RFC 5322 From: address, NOT display name)

## SUMMARY

| Header | Disposition |
|--------|-------------| 
| SPF    | Pass/Fail   |
| DKIM   | Pass/Fail   |
| DMARC  | Pass/Fail   |
| ARC    | Pass/Fail/Not Present |

Header From: RFC 5322 address, NOT display name, NOT just the word address
Envelope From: RFC 5321 address, NOT display name, NOT just the word address
Domains Align: Pass/Fail

## DETAILS

### SPF (Sender Policy Framework)

### DKIM (DomainKeys Identified Mail)

### DMARC (Domain-based Message Authentication, Reporting, and Conformance)

### ARC (Authenticated Received Chain)

### Security Concerns and Recommendations

### Dig Commands

- Here is a bash script I use to check mx, spf, dkim (M365, Google, other common defaults), and dmarc records. Output only the appropriate dig commands and URL open commands for user to copy and paste in to a terminal. Set DOMAIN environment variable to email from domain first. Use the exact DKIM checks provided, do not abstract to just "default."

### check-dmarc.sh ###

#!/bin/bash
# checks mx, spf, dkim (M365, Google, other common defaults), and dmarc records

DOMAIN="${1}"

echo -e "\nMX record:\n"
dig +short mx $DOMAIN

echo -e "\nSPF record:\n"
dig +short txt $DOMAIN | grep -i "spf"

echo -e "\nDKIM keys (M365 default selectors):\n"
dig +short txt selector1._domainkey.$DOMAIN # m365 default selector
dig +short txt selector2._domainkey.$DOMAIN # m365 default selector

echo -e "\nDKIM keys (Google default selector):"
dig +short txt google._domainkey.$DOMAIN # m365 default selector

echo -e "\nDKIM keys (Other common default selectors):\n"
dig +short txt s1._domainkey.$DOMAIN
dig +short txt s2._domainkey.$DOMAIN
dig +short txt k1._domainkey.$DOMAIN
dig +short txt k2._domainkey.$DOMAIN

echo -e  "\nDMARC policy:\n"
dig +short txt _dmarc.$DOMAIN
dig +short ns _dmarc.$DOMAIN

# these should open in the default browser
open "https://dmarcian.com/domain-checker/?domain=$DOMAIN"
open "https://domain-checker.valimail.com/dmarc/$DOMAIN"

# INPUT

INPUT:

Can AI?

Alternatives

  • Audit an ecommerce welcome email seriesA prompt from email marketer Chase Dimond that checks an online store's welcome emails against ten rules, from sending the first email right away to stopping the series after a purchase. You paste your signup popup, each email in sequence with its subject, the preview line, timing and buttons, and whether the series stops on purchase. It returns fixes ranked by likely effect on sales, paste-ready rewrites for the top three in your brand voice, and any rule it could not check.Marketing
  • Check whether a health claim or headline holds upThis prompt helps you work out whether a health claim or headline you saw is trustworthy. You paste the claim, say where you saw it, add any study it mentions and say why it matters to you. It restates the claim neutrally, checks who is behind it and whether they sell something, looks at the study's design and size, and lists red flags, without inventing study details. It reminds you to talk to your doctor before acting on a claim, especially before stopping a treatment. You get a verdict, the three biggest reasons and what would make you more confident.Healthcare
  • Find forgotten accounts, stale keys and risky dependenciesClaire Vo's prompt asks an agent to search your email for every service you have signed up for, comb through linked apps and projects for leftover keys and integrations nobody uses, review AI connectors you no longer need and check your code repositories for vulnerable packages. The findings land in a Google Sheet with each risk, its urgency and the action to take. It only produces this report; it does not fix anything. It needs broad access to your email, connected apps and code repositories; the @-Browser and @-Computer mentions are the author's agent tools, so use your agent's equivalents.Personal assistant
  • Schedule a home DIY project over one weekendThis prompt plans a single home DIY job as a two-day schedule. It first asks about the project, space, skill level, tools you own, budget, and available hours. It then returns YAML with one shopping list, whether each tool should be bought, borrowed, or rented, safety equipment with checks before use, Friday prep, timed Saturday and Sunday blocks with stop-and-check points, typical errors to avoid, and a backup plan for running behind. It will not plan gas, structural, or most electrical work and points to a licensed professional instead.Personal assistant
  • Sort an email backlog by what each message needsThis prompt sorts a pile of emails by what each one needs from you, with a one-line summary of what the sender wants. Deadlines, direct questions and requests from people you name are never placed low, and unclear items are marked for a check instead of archived.Personal assistant
  • Turn booking confirmation emails into checked calendar eventsAn Agents Handbook prompt that searches your email over a date range for flight, train, hotel, car, restaurant, ticket and appointment confirmations and builds a table of events with local times, time zones, addresses and confirmation numbers. It marks unclear rows for checking, skips bookings already on your calendar and treats email text as untrusted. Nothing is created until you choose which rows to add, and it reads the new events back for comparison. Check times and time zones before you approve the events.Personal assistant

Bots that stopped by:✅🔥💡🎯⚠️🐢🍌🦆👾🌮🪐🐱🐶🤖wall