Let's start with an example. These are the full headers from a recent post of mine to thelist:
Return-path: <thelist-admin@lists.evolt.org>Envelope-to: martin@easyweb.co.ukDelivery-date: Sun, 15 Aug 1999 18:18:32 +0000Received: from csilx1.csi1st.net [209.48.124.2] (root) by smarties with esmtp (Exim 1.62 #3) id 11G4rX-0005Yg-00; Sun, 15 Aug 1999 18:18:31 +0000Received: from csilx1.csi1st.net (IDENT:mail@csilx1.csi1st.net [209.48.124.2]) by csilx1.csi1st.net (8.9.3/8.9.3) with ESMTP id OAA19663; Sun, 15 Aug 1999 14:16:02 -0400Received: from melon.executive.tm (IDENT:root@ns.executive.tm [207.168.73.2]) by csilx1.csi1st.net (8.9.3/8.9.3) with ESMTP id OAA19636 for <thelist@lists.evolt.org>; Sun, 15 Aug 1999 14:16:00 -0400Received: from finch-post-11.mail.demon.net (finch-post-11.mail.demon.net [194.217.242.39]) by melon.executive.tm (8.8.7/8.8.7) with ESMTP id OAA07875 for <thelist@evolt.org>; Sun, 15 Aug 1999 14:09:25 -0400Received: from easyweb.demon.co.uk ([212.228.136.1]) by finch-post-11.mail.demon.net with smtp (Exim 2.12 #1) id 11G4ig-00049e-0B for thelist@evolt.org; Sun, 15 Aug 1999 18:09:23 +0000Date: Sun, 15 Aug 1999 19:09:17 +0100x-sender: pop4139@pop.easyweb.co.ukx-mailer: Claris Emailer 2.0v3, January 22, 1998From: Martin Burns <martin@easyweb.co.uk>To: "evolt" <thelist@evolt.org>Mime-Version: 1.0Content-Type: text/plain; charset="US-ASCII"Message-Id: <E11G4ig-00049e-0B@finch-post-11.mail.demon.net>Subject: [thelist] site in a week - now live!Reply-To: thelist@lists.evolt.orgSender: thelist-admin@lists.evolt.orgErrors-To: thelist-admin@lists.evolt.orgX-MajorGumbo-version: 1.0Precedence: bulkList-Id: evolt.org mailing list devoted to the web <thelist.lists.evolt.org>X-BeenThere: thelist@lists.evolt.orgX-UIDL: 6bce08484a7ed8a1b357f6959a0df30d*Phew*. Let's break this down a bit, starting with the easy stuff.
X-
, it's completely up to you. So in the above, we have a number of X-headers: X-MajorGumbo-version: 1.0
X-BeenThere: thelist@lists.evolt.org
X-UIDL: 6bce08484a7ed8a1b357f6959a0df30d
x-mailer: Claris Emailer 2.0v3, January 22, 1998
x-sender: pop4139@pop.easyweb.co.uk
X-evolt: We put the rrr in werd baby! Yeah baby, yeah!!!
From: Martin Burns <martin@easyweb.co.uk>
To: "evolt" <thelist@evolt.org>
Envelope-to: martin@easyweb.co.uk
Mime-Version: 1.0
Content-Type: text/plain; charset="US-ASCII"
Message-Id: <E11G4ig-00049e-0B@finch-post-11.mail.demon.net>
Subject: [thelist] site in a week - now live!
Reply-To: thelist@lists.evolt.org
Sender: thelist-admin@lists.evolt.org
Errors-To: thelist-admin@lists.evolt.org
Return-path: <thelist-admin@lists.evolt.org>
"Do you know the way toMachine B will replySan Joseerm I mean machine Z?"
"I can get it part of the way, and pass it on to machine C who knows the next section of the route."This is so that if machine L is down, email can be routed around it. Of course, if machine A happens to know where machine Z is, and can get to it directly, then it will just talk directly to machine Z. Every time your email goes through an MTA (Mail Transfer Agent such as machine B above), the MTA timestamps it at the start of the headers. So routing information must be read backwards. Here are those routing headers from above, but reversed for convenience:
Received: from easyweb.demon.co.uk ([212.228.136.1]) by finch-post-11.mail.demon.net with smtp (Exim 2.12 #1) id 11G4ig-00049e-0B for thelist@evolt.org; Sun, 15 Aug 1999 18:09:23 +0000
Received: from finch-post-11.mail.demon.net (finch-post-11.mail.demon.net [194.217.242.39]) by melon.executive.tm (8.8.7/8.8.7) with ESMTP id OAA07875 for <thelist@evolt.org>; Sun, 15 Aug 1999 14:09:25 -0400
Received: from melon.executive.tm (IDENT:root@ns.executive.tm [207.168.73.2]) by csilx1.csi1st.net (8.9.3/8.9.3) with ESMTP id OAA19636 for <thelist@lists.evolt.org>; Sun, 15 Aug 1999 14:16:00 -0400
Received: from csilx1.csi1st.net (IDENT:mail@csilx1.csi1st.net [209.48.124.2]) by csilx1.csi1st.net (8.9.3/8.9.3) with ESMTP id OAA19663; Sun, 15 Aug 1999 14:16:02 -0400
Received: from csilx1.csi1st.net [209.48.124.2] (root) by smarties with esmtp (Exim 1.62 #3) id 11G4rX-0005Yg-00; Sun, 15 Aug 1999 18:18:31 +0000
smarties
which is running mail software called Exim. Smarties
is run by target="_foo">Instant Web who host my domain and maintain popboxen for me. Had I set this address to forward the mail elsewhere, then there would be another set of routing headers. So there you are - mailheaders in a nutshell. We'll be going on to explain how you can exploit X-headers in a future article about sending emails from CGIs.