[sup-talk] [PATCH] New hook to allow formatting of message headers

William Morgan wmorgan-sup at masanjin.net
Wed Dec 5 13:36:44 EST 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|
    if message.raw_header =~ /^#{key}: (.*)$/i
      headers[key] = $1
    end
  end

-- 
William <wmorgan-sup at masanjin.net>


More information about the sup-talk mailing list