On Sat, 19 Jun 2004 07:56:52 -0400, Puchalski, Mark wrote: > >� I want to easily see the scoring on ham messages so I put the
>� I'd be interested in know how to make this work with MIMEDefang >� calling SpamAssassin. The best place for questions regarding MIMEDefang is actually the MIMEDefang mailing list (more infor at http://lists.roaringpenguin.com/mailman/listinfo/mimedefang), but here goes: This code (snipped from my mimedefang-filter, available at http://whatever.frukt.org/mimedefang-filter.shtml) inserts a wrapped header with the rules that scored. If you don't mind very long headers, just remove all the wrapping stuff. --8<-- use Text::Wrap; [...] sub filter_end ($) { [...] my($hits, $req, $names, $report) = spam_assassin_check(); [...] if ($hits <= $req) { my $sa_ver = 'SpamAssassin '.Mail::SpamAssassin->Version(); action_add_header("X-Spam-Scanned-By", "$MyFilterHostName, using $sa_ver (hard limit $req$learned)"); my $namehead = ''; if ($names && length($names) > 54) { my $twco = $Text::Wrap::columns; my $twbo = $Text::Wrap::break; my $twho = $Text::Wrap::huge; my $twso = $Text::Wrap::separator; $Text::Wrap::columns = 74; $Text::Wrap::break = ','; $Text::Wrap::huge = 'overflow'; $Text::Wrap::separator = ",\n"; my $nht = wrap("\t","\t",$names); $nht = "\t$nht" if ($nht !~ /^\t/); $namehead = ";\n$nht"; $Text::Wrap::columns = $twco; $Text::Wrap::break = $twbo; $Text::Wrap::huge = $twho; $Text::Wrap::separator = $twso; } elsif ($names) { $namehead = "; $names"; } action_change_header("X-Spam-Info", "$hits$namehead"); } [...] --8<-- Regards /Jonas -- Jonas Eckerman, [EMAIL PROTECTED] http://www.fsdb.org/
