Perusing Mail Headers
I’ve been a terrible blogger lately. I’ve been so wrapped up in mutt and my email that I just haven’t had time for anything else. I’ve realized that if you’ve always been a GUI mail client user on Windows and somebody else manages your mail for you (i.e. your admin or ISP) that you may not know ANYTHING about email. I’m not even talking about transporting messages from machine to machine, just spend some time studying mail headers. There’s a LOT to them.
I’m using (evaluating?) procmail to do some mail sorting on my personal machine. Without going into detail (because at this point I simply can’t), procmail parses my email messages as they’re delivered and if one of my procmail recipes matches one of the headers in the message it moves it to a specific folder. It can do more than that, but I just haven’t gotten that far in my explorations.
What’s nice is I don’t have to use just the standard mail headers like to, cc & from to sort mail into folders. Many lists (sadly, not all) insert all sorts of terrific headers when a message is forwarded to subscribers. As an example, this is a chunk of headers from a full disc encryption list that I monitor.
X-BeenThere: fde [AT] www.xml-dev.com
X-Mailman-Version: 2.1.8
Precedence: list
Reply-To: fde [AT] www.xml-dev.com
List-Id: <fde.www.xml-dev.com>
List-Unsubscribe: <http://www.xml-dev.com/mailman/listinfo/fde>,
<mailto:fde-request [AT] www.xml-dev.com?subject=unsubscribe>
List-Archive: <http://www.xml-dev.com/pipermail/fde>
List-Post: <mailto:fde [AT] www.xml-dev.com>
List-Help: <mailto:fde-request [AT] www.xml-dev.com?subject=help>
List-Subscribe: <http://www.xml-dev.com/mailman/listinfo/fde>,
<mailto:fde-request [AT] www.xml-dev.com?subject=subscribe>
There’s a lot there, this list makes it easy for you to check archives, get help and unsubscribe just by reviewing the mail headers. It also inserts an X-BeenThere header that I use to sort on (I wish they all did, it would make sorting MUCH easier). Since that header is on every message from the list, I created a simple procmail recipe (below) that will move messages with that header into the “seclists” mail folder.
:0:
* ^X-BeenThere: fde [AT] www.xml-dev.com
$MAILDIR/seclists/
That’s just a simple example, but handy none-the-less. So that’s what I’ve been up to. Checking mail headers and learning how to manage my mail myself.
Recent Comments