[sup-talk] [PATCH] New hook to allow formatting of message headers
Nicolas Pouillard
nicolas.pouillard at gmail.com
Thu Dec 6 12:14:52 EST 2007
Excerpts from William Morgan's message of Wed Dec 05 19:36:44 +0100 2007:
> Excerpts from William Morgan's message of Wed Dec 05 10:12:16 -0800 2007:
> > I've applied this to SVN trunk, but (as I am wont to do) I tweaked it a
> > bit.
>
> Tweaked it a little more to use an OrderedHash and to just modify the
> headers in place. This way the header ordering is not random.
>
> Here's the new hook:
>
> $ cat detailed-headers.rb
> %w(User-Agent X-Mailer X-Spam-Status).map do |key|
Why use .map instead of .each the result seems not that useful.
> if message.raw_header =~ /^#{key}: (.*)$/i
> headers[key] = $1
> end
> end
>
--
Nicolas Pouillard aka Ertai
More information about the sup-talk
mailing list