Email headers: analysis procedure
The procedure for analysing email headers: acquiring the original message, computing the hash, extracting the headers, reconstructing the route, converting times, verifying DKIM and preserving the key, checking identifiers and addresses, comparing with other copies, writing the report.
- 01
Acquire the original
Export the message as an EML or MSG file from the mailbox, or acquire it from the server, never by forwarding.
- 02
Compute the hash
Hash of the freshly acquired file, recorded in the acquisition log.
- 03
Extract the headers
Copy them in full from the file, not from the mail program’s screen.
- 04
Reconstruct the route
List the Received lines from the bottom, with server names, addresses and times.
- 05
Convert the times
Express every time in UTC and check the sequence is consistent.
- 06
Verify DKIM
Repeat the signature verification and save the domain’s public key with the date and time it was retrieved.
- 07
Check identifiers and addresses
Message-ID, Return-Path, Reply-To, IP addresses and who they are assigned to.
- 08
Compare
With the copy in the sender’s sent folder, with other copies and with providers’ logs.
- 09
Write the report
Separate established facts from assessments and state the limits.
dig TXT selector._domainkey.example.com +short
dkimverify < message.emlThe selector to query is the one given in the s= field of the DKIM signature.
Email headers: tools
The tools for reading and verifying email headers: mail program features, header analysers, command-line DKIM verification, DNS queries, IP address registries, caution with online services.
The pages of this topic
Back to the overviewEmail headers: how they work
How email headers work: fields written by the sender’s program and fields added by servers, Received lines read from the bottom up, envelope and visible headers, SPF, DKIM, DMARC and ARC, Italian certified email headers, what can be forged.
Email headers: mistakes to avoid
The most common mistakes in header analysis: trusting From, reading Received lines from the top, believing every line, ignoring time zones, working on printouts or forwards, verifying DKIM too late, mistaking SPF for authenticity, treating a failed DKIM as proof of forgery.
Email headers: value in court
The value of email headers in proceedings: original file and printouts, disowning, proof of integrity through DKIM, results of checks on arrival, certified email receipts, limits in attributing a message to a person, provider data.
Email headers: a case
A guided case: in a commercial dispute an email confirming a discount is disowned; Message-ID, Received lines, results of checks on arrival and a fresh DKIM verification show the message was sent, but its text changed after receipt.
Email headers: checklist
The checklist for the forensic analysis of email headers: acquiring the original file, reconstructing the route, DKIM verification with key preservation, checks on identifiers and addresses, conclusions and attachments.
Email headers: frequently asked questions
Short answers to the most common questions about email headers and their use as evidence.