From mboxrd@z Thu Jan 1 00:00:00 1970 From: wmorgan-sup@masanjin.net (William Morgan) Date: Wed, 05 Dec 2007 10:12:16 -0800 Subject: [sup-talk] [PATCH] New hook to allow formatting of message headers In-Reply-To: <1195618839-sup-4347@lankhmar> References: <1195618839-sup-4347@lankhmar> Message-ID: <1196878151-sup-6754@south> Hi Colin, Excerpts from Colin Bell's message of Tue Nov 20 20:26:40 -0800 2007: > This patch allows you to format the headers shown in the Detailed > Headers view. Also attached is an example hook which will show the > email client and a spam header. I've applied this to SVN trunk, but (as I am wont to do) I tweaked it a bit. I renamed it "detailed-headers" and changed the arguments so that you get, and return, a hash rather than an array, which I think is a little friendlier. Here's the new version of your hook: $ cat /detailed-headers.rb ["User-Agent", "X-Mailer", "X-Spam-Status"].map do |key| if message.raw_header =~ /^#{key}: (.*)$/i headers[key] = $1 end end -- William