Answering my own question ...

Well I was able to find a BUG report that (at present) says 'body' and
'rawbody' debug output has been removed from 3.0.0.

This was bad news ... I really like to see exactly what SA sees. So I
had to add a little code to the package
Mail::SpamAssassin::PerMsgStatus, in order to output what I needed.

Since I imagine other non perl people may want the same DEBUG
functionality now and not later, I figured I should share my ad hock
fix. The code I added to PerMsgStatus.pm is below.

You can insert this DEBUG output in the PerMsgStatus.pm file (SA version
3.0.0) at line 167.

##################################################################

# added by SKM - Adds Body, Rawbody, and URI text to DEBUG output

my ($debug_rawbody, $debug_body, $debug_uris);

$debug_uris = "\n\nBEGIN URI DEBUG TEXT\n\n";
for (@uris) {
        chop($_);
        $debug_uris .= $_ . "\n";
}
dbg("$debug_uris \nEND URIS DEBUG TEXT\n");

$debug_rawbody = "\n\nBEGIN RAWBODY DEBUG TEXT\n\n";
for (@$bodytext) {
        chop($_);
        $debug_rawbody .= $_ . "\n";
}
dbg("$debug_rawbody \nEND RAWBODY DEBUG TEXT\n");

$debug_body = "\n\nBEGIN BODY DEBUG TEXT\n\n";
for (@$decoded) {
        chop($_);
        $debug_body .= $_ . "\n";
}
dbg("$debug_body \nEND BODY DEBUG TEXT\n");





Reply via email to