qaz has asked for the wisdom of the Perl Monks concerning the following question:

Hello,

I was wondering if there was an easy way to get the headers added to a message by Mail::SpamAssassin(the report and the X-Spam-Status headers) without having to actually parse the message.

I've been starring a the Mail::SpamAssassin cpan page for an hour and it seems that maybe I'm looking for a method that doesn't exist!

Thanks in advance.

Replies are listed 'Best First'.
Re: SpamAssassin-added headers
by moritz (Cardinal) on Mar 04, 2008 at 13:29 UTC
    The check message returns a Mail::SpamAssassin::PerMsgStatus object, which should contain all the information that is also attached to the headers. It has a different presentation than the mail headers, though.
      Thanks :) Mail::SpamAssassin::PerMsgStatus has the get_report method, which was exactly what I needed.