Email headers · 02 Step-by-step procedure

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.

  1. 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.

  2. 02
    Compute the hash

    Hash of the freshly acquired file, recorded in the acquisition log.

  3. 03
    Extract the headers

    Copy them in full from the file, not from the mail program’s screen.

  4. 04
    Reconstruct the route

    List the Received lines from the bottom, with server names, addresses and times.

  5. 05
    Convert the times

    Express every time in UTC and check the sequence is consistent.

  6. 06
    Verify DKIM

    Repeat the signature verification and save the domain’s public key with the date and time it was retrieved.

  7. 07
    Check identifiers and addresses

    Message-ID, Return-Path, Reply-To, IP addresses and who they are assigned to.

  8. 08
    Compare

    With the copy in the sender’s sent folder, with other copies and with providers’ logs.

  9. 09
    Write the report

    Separate established facts from assessments and state the limits.

terminale
dig TXT selector._domainkey.example.com +short
dkimverify < message.eml

The selector to query is the one given in the s= field of the DKIM signature.

Continue with
03 Tools

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 overview
01 How it works

Email 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.

04 Pitfalls to avoid

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.

05 Value in court

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.

06 Case study

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.

07 Checklist

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.

08 FAQ

Email headers: frequently asked questions

Short answers to the most common questions about email headers and their use as evidence.

↑