--- SA.pm	Fri May  2 00:33:20 2003
+++ SA.pm.new	Thu May 15 19:36:15 2003
@@ -245,9 +245,11 @@
 
   my($pipe);
   my($SAHitList, $SAHits, $SAReqHits, $IsItSpam, $IsItHighScore);
-  my($HighScoreVal, $pid2delete);
+  my($HighScoreVal, $pid2delete, $IncludeScores);
   my $PipeReturn = 0;
 
+  $IncludeScores = MailScanner::Config::Value('listsascores', $Message);
+
   $pipe = new IO::Pipe
     or MailScanner::Log::DieLog('Failed to create pipe, %s, try reducing ' .
                   'the maximum number of unscanned messages per batch', $!);
@@ -260,7 +262,7 @@
 
   if ($pid == 0) {
     # In the child
-    my($spamness, $SAResult, $HitList);
+    my($spamness, $SAResult, $HitList, @HitNames, $Hit);
     $pipe->writer();
     #close($readerfh);
     #POSIX::setsid();
@@ -271,6 +273,14 @@
     $spamness = $Test->check($Mail);
     print $pipe $spamness->get_hits() . "\n";
     $HitList  = $spamness->get_names_of_tests_hit();
+    if ($IncludeScores) {
+      @HitNames = split(/\s*,\s*/, $HitList);
+      $HitList  = "";
+      foreach $Hit (@HitNames) {
+        $HitList .= ($HitList?', ':'') . $Hit . ' ' .
+                    sprintf("%1.2f", $spamness->{conf}->{scores}->{$Hit});
+      }
+    }
     $spamness->finish();
     print $pipe $HitList . "\n";
     $pipe->close();