About
Email headers are a list of key pair value added to the beginning of email message that acts as metadata.
They specify the:
- where: recipient,
- the who: the sender,
- and the from: the author
Example
An email full with headers where only the last line is not an header but the body
You can note that they follows the same format that an http message
Delivered-To: [email protected]
Date: Fri, 12 Jun 2020 21:08:18 +0200
To: [email protected]
Subject: Without hosts dkim test !
User-Agent: Heirloom mailx 12.5 7/5/10
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Message-Id: <[email protected]>
From: [email protected] (root)
cc: [email protected]
bcc: [email protected]
This is the body of the email
They have the same and functionality than the html header because the email is just a part of the web.
List
- the address
- the dkim
- the Received (for the routing)
- the user-agent (the client)
- the message id
- the return-path for bounce message
- the Delivered-To is the final recipient, ie the inbox
- the Content-Type header defines the type of the body
- and more
Who adds them?
- The client will add headers that defines information about the message
- Every server will add for tracing:
- at minimal the received header
- and custom headers X-name.
Format
Header fields are lines composed of:
- a field name,
- followed by a colon (“:”),
- followed by a field body,
- and terminated by CRLF (end of line)
Analyze
You can analyze them (ie format them) with the message header toolbox