What is an Email Header?


An email consists of three vital components: the envelope, the header(s), and the body of the message. The envelope is something that an email user will never see since it is part of the internal process by which an email is routed. The body is the part that we always see as it is the actual content of the message contained in the email. The header(s), the third component of an email, is perhaps a little more difficult to explain, though it is arguably the most interesting part of an email.

Header

In an e-mail, the body (content text) is always preceded by header lines that identify particular routing information of the message, including the sender, recipient, date and subject. Some headers are mandatory, such as the FROM, TO and DATE headers. Others are optional, but very commonly used, such as SUBJECT and CC. Other headers include the sending time stamps and the receiving time stamps of all mail transfer agents that have received and sent the message. In other words, any time a message is transferred from one user to another (i.e. when it is sent or forwarded), the message is date/time stamped by a mail transfer agent (MTA) - a computer program or software agent that facilitates the transfer of email message from one computer to another. This date/time stamp, like FROM, TO, and SUBJECT, becomes one of the many headers that precede the body of an email.

To really understand what an email header is, you must see one. Here is an example of a full email header*:


Return-Path: <example_from@dc.edu>
X-SpamCatcher-Score: 1 [X]
Received: from [136.167.40.119] (HELO dc.edu)
    by fe3.dc.edu (CommuniGate Pro SMTP 4.1.8)
    with ESMTP-TLS id 61258719 for example_to@mail.dc.edu; Mon, 23 Aug 2004 11:40:10 -0400
Message-ID: <4129F3CA.2020509@dc.edu>
Date: Mon, 23 Aug 2005 11:40:36 -0400
From: Taylor Evans <example_from@dc.edu>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.0.1) Gecko/20020823 Netscape/7.0
X-Accept-Language: en-us, en
MIME-Version: 1.0
To: Jon Smith <example_to@mail.dc.edu>
Subject: Business Development Meeting
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
* email headers should always be read from bottom to top.

Fortunately, most of this information is hidden inside the email with only the most relevant or mandatory headers appearing to the user. Those headers that we most often see and recognize are bolded in the above example.

Header Characteristics

A single email header has some important characteristics, including perhaps the most important part of an email - this is the KEY:VALUE pairs contained in the header. Looking at the above, you can tell some of the KEY:VALUE pairs used. Here is a breakdown of the most commonly used and viewed headers, and their values:

  • From: sender's name and email address (IP address here also, but hidden)
  • To: recipient's name and email address
  • Date: sent date/time of the email
  • Subject: whatever text the sender entered in the Subject heading before sending

Headers Provide Routing Information

Besides the most common identifications (from, to, date, subject), email headers also provide information on the route an email takes as it is transferred from one computer to another. As mentioned earlier, mail transfer agents (MTA) facilitate email transfers. When an email is sent from one computer to another it travels through a MTA. Each time an email is sent or forwarded by the MTA, it is stamped with a date, time and recipient. This is why some emails, if they have had several destinations, may have several RECEIVED headers: there have been multiple recipients since the origination of the email. In a way it is much like the same way the post office would route a letter: every time the letter passes through a post office on its route, or if it is forwarded on, it will receive a stamp. In this case the stamp is an email header.

When viewed in their entirety, these multiple recipient headers will look like this in an email:

Received: from tom.bath.dc.uk ([138.38.32.21] ident=yalrla9a1j69szla2ydr)
        by steve.wrath.dc.uk with esmtp (Exim 3.36 #2)id 19OjC3-00064B-00
        for example_to@imaps.bath.dc.uk; Sat, 07 Jun 2005 20:17:35 +0100

Received: from write.example.com ([205.206.231.26])
        by tom.wrath.dc.uk with esmtp id 19OjBy-0001lb-3V
        for example_to@bath.ac.uk; Sat, 07 Jun 2005 20:17:30 +0100

Received: from master.example.com (lists.example.com [205.206.231.19])
        by write.example.com (Postfix) with QMQP
        id F11418F2C1; Sat, 7 Jun 2005 12:34:34 -0600 (MDT)

In the example shown above, there are three Received: stamps. Reading from the bottom upwards, you can see who sent the message first, next and last, and you can see when it was done. This is because every MTA that processed the email message added a Received: line to the email's header. These Received: lines provide information on where the message originated and what stops it made (what computers) before reaching its final destination. As the example shows, these Received: lines provide the email and IP address of each sender and recipient. They also provide the date and time of each transfer. The lines also indicate if the email address was part of an email list. It is all this information that is valued by computer programmers and IT department associates when making efforts to track and stop SPAM email message. And it is this information that arguable makes headers the most important part of an email.

Trace Email Address Source


This tool attempts to locate the source IP address of an email based on the email headers (Where did the email come from). Just copy and paste the full headers of the email you've received into the box below and press submit. When the page reloads scroll down to the bottom for the email header analysis and results. We're in the process of compiling a set of instructions to obtain email headers from a variety of popular webmail services and email applications. In the mean time if you have questions please post them in the Email Tracing Forum.

CAUTION: This E-Mail header analysis tool assumes all mail servers and clients in the transmission path are trustworthy. It does not attempt to detect forged e-mail headers. Forged headers are common in spam and other malicious e-mail, therefore this tool cannot be relied upon to accurately identify the source of such messages.

Sample Email Headers:

Return-path: <user@example.com>
Received: from mac.com ([10.13.11.252])
  by ms031.mac.com (Sun Java System Messaging Server 6.2-8.04 (built Feb 28
  2007)) with ESMTP id <0JMI007ZN7PETGC0@ms031.mac.com> for user@example.com; Thu,
  09 Aug 2007 04:24:50 -0700 (PDT)
Received: from mail.dsis.net (mail.dsis.net [70.183.59.5])
  by mac.com (Xserve/smtpin22/MantshX 4.0) with ESMTP id l79BOnNS000101
  for <user@example.com>; Thu, 09 Aug 2007 04:24:49 -0700 (PDT)
Received: from [192.168.2.77] (70.183.59.6) by mail.dsis.net with ESMTP
  (EIMS X 3.3.2) for <user@example.com>; Thu, 09 Aug 2007 04:24:49 -0700
Date: Thu, 09 Aug 2007 04:24:57 -0700
From: Frank Sender <sender@example.com>
Subject: Test
To: Joe User <user@example.com>
Message-id: <61086DBD-252B-46D2-A54C-263FE5E02B41@example.com>
MIME-version: 1.0 (Apple Message framework v752.2)
X-Mailer: Apple Mail (2.752.2)
Content-type: text/plain; charset=US-ASCII; format=flowed
Content-transfer-encoding: 7bit

What is a DNSBL?


Domain Name System Blacklists, also known as DNSBL's or DNS Blacklists, are spam blocking lists that allow a website administrator to block messages from specific systems that have a history of sending spam. As their name implies, the lists are based on the Internet's Domain Name System, which converts complicated, numerical IP address such as 140.239.191.10 into domain names like example.net, making the lists much easier to read, use, and search. If the maintainer of a DNS Blacklist has in the past received spam of any kind from a specific domain name, that server would be "blacklisted" and all messages sent from it would be either flagged or rejected from all sites that use that specific list.

DNS Blacklists have a rather long history in web terms, with the first one being created in 1997. Called the RBL, its purpose was to block spam email and to educate Internet service providers and other websites about spam and its related problems. Although modern DNS Blacklists are rarely used as educational tools, their function as an email blocker and filter still serves as their primary purpose to this day. In fact, almost all of today's email servers support at least one DNSBL in order to reduce the amount of junk mail clients using their service receive. The three basic components that make up a DNS Blacklist - a domain name to host it under, a server to host that domain, and a list of addresses to publish to the list - also haven't changed from the time when the RBL was first created to today.

Since then, dozens of different DNSBL's have sprung up and are available for use, and they all have their own lists that are populated based on what does or doesn't meet their own standards and criteria for what a spammer is. Because of this, DNS Blacklists can vary greatly from one to the other. Some are stricter than others, some only list sites for a set amount of time from the date the last piece of spam was received by the maintainer versus others that are manually maintained, and still others not only block IP addresses, but also entire ISP's known to harbor spammers. This results in some lists working better than others because they are maintained by services with a greater level of trustworthiness and credibility than competing lists might have. Users can also use these differences to decide on which DNS Blacklist works best for them depending on what their specific security needs are. Less lenient lists might allow more spam to get through, but might not block non-spam messages that have been misidentified on lists that have stricter guidelines for what goes on or what is left off of it. To help facilitate this, DNS Blacklists that are intended for use by the public will usually have a specific, published policy detailing what a listing means and must adhere to the criteria laid out in it in order to not only attain public confidence in their services, but to sustain it as well.

Blacklist Check


Check to see if your IP addresses are listed with nearly 70 DNS based anti-spam databases! Will your mail server be blocked by DNSbl filters?

Probably the most common way of detecting spam is rejecting mail that comes from mail servers known (or believed) to send spam. This is done by taking the IP address of the remote mail server, converting it to a domain name using the ip4r format (a.b.c.d becomes d.c.b.a.lookupzone.com), and doing a lookup to check if that IP address is listed in one of the databases.

Just because the IP is listed with a particular blacklist does not mean that you are sending spam, just that particular blacklist suggests not to accept mail directly from that IP address. Most residential Cable/DSL IP addresses that are dynamically assigned will indicate that they are blacklisted, meaning you should be sending from your ISP's mail server, not a mail server running on your own internet connection.

What is a MAC Address?


A MAC address, or Media Access Control address, is a 48- or 64-bit address associated with a network adapter. While IP addresses are associated with software, MAC addresses are linked to the hardware of network adapters. For this reason, the MAC address is sometimes called the hardware address, the burned-in address (BIA), or the physical address. MAC addresses are expressed in hexadecimal notation in the following format: 01-23-45-67-89-AB, in the case of a 48-bit address, or 01-23-45-67-89-AB-CD-EF, in the case of a 64-bit address. Colons (:) are sometimes used instead of dashes (-).

MAC addresses are often considered permanent, but in some circumstances, they can be changed. There are two types of MAC addresses:

Universally Administered Address


The UAA, or Universally Administered Address, is the most commonly used type of MAC address. This address is assigned to the network adapter when it is manufactured. The first three octets define the manufacturer, while the second three octets vary and identify the individual adapter. All network adapter manufacturers have their own code, called the Organizationally Unique Identifier (OUI). For example, in the MAC address 00-14-22-01-23-45, the first three octets are 00-14-22. This is the OUI for Dell. Other common OUIs include 00-04-DC for Nortel, 00-40-96 for Cisco, and 00-30-BD for Belkin. Most large manufacturers of networking equipment have multiple OUIs.

Locally Administered Address


The LAA, or Locally Administered Address, is an address that changes an adapter's MAC address. The LAA is a type of administered MAC address, and it is possible to change the LAA of a network adapter to any address of allowed length. When the LAA is set, the network adapter uses the LAA as its MAC address. Otherwise, the network adapter uses the UAA as its MAC address. All devices on the same subnet must have different MAC addresses, however. MAC addresses are very useful in diagnosing network issues, such as duplicate IP addresses, so it is a good practice to allow devices to use their UAAs instead of assigning LAAs, unless there is a compelling reason to do so.

MAC addresses are useful for security purposes, as they are only rarely changed from the default. IP addresses can change dynamically, especially on networks using DHCP to assign IP addresses, so MAC addresses are often a more reliable way to identify senders and receivers of network traffic. On wireless networks, MAC address filtering is a common security measure to prevent unwanted network access. In MAC address filtering, a wireless router is configured to accept traffic from certain MAC addresses. In this way, as whitelisted devices are assigned new IP addresses through DHCP, they retain their ability to communicate on the network. Any intruder attempting to impersonate a valid user on the network by masquerading with a faked IP address will not be able to do so because the computer's MAC address will not match any of those in the whitelist. This security method is only minimally successful, however, as a determined intruder can fake a MAC address almost as easily as an IP address.