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

Two different hands

Headers are written by two hands. The sender’s program fills in From, To, Subject, Date and usually the Message-ID. The servers the message passes through each add a Received line at the top. That is why Received lines are read from the bottom up: the lowest is the oldest, the top one was written by the server that delivered the message.

FieldWho writes itReliability
From, To, SubjectSender’s programForgeable
DateSender’s program, using the device’s clockIndicative
Message-IDSending program or serverUseful for comparisons, but forgeable
Top Received linesRecipient’s serverReliable
Lower Received linesEarlier servers, including the sender’sTo be verified: they can be invented
Return-PathRecipient’s server, from the address used in deliveryShows the technical address for error messages
Authentication-ResultsRecipient’s serverRecords the outcome of checks on arrival
DKIM-SignatureSending domain’s serverVerifiable with the domain’s public key

Envelope and letter

Like a letter, an email has an envelope, the addresses servers use during delivery, and a sheet, the visible headers. They do not always match: the envelope sender ends up in Return-Path, the visible one in From. SPF checks the former, not the latter; DMARC checks that the From domain is aligned with the one checked by SPF or signed by DKIM. When a message goes through forwarding or a mailing list, which may modify it, ARC preserves the results of checks made by earlier servers.

Italian certified email

An Italian certified email (PEC) message arrives inside a transport envelope signed by the provider, containing the original message and a file with the certification data. Headers such as X-Trasporto and X-Ricevuta indicate the type of envelope or receipt; for its legal value see the entry PEC.

Continue with
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.

The pages of this topic

Back to the overview
↑