Make it easier to see subjects in logfiles by enquoting them. Deleted a 
duplicate comment,
and commented out a spurious subject rewrite (which I don't think was being 
used for logging).

-cl

--- assp.pl.orig        2008-06-03 05:16:50.701230566 +0000
+++ assp.pl     2008-06-03 05:58:09.584197176 +0000
@@ -4242,7 +4242,7 @@
     $this->{subject}=$sub;
     $this->{subject2}=$sub;

-    $this->{subject} ="" if !$subjectLogging;
+#    $this->{subject} = $subjectLogging ? "$this->{subject}" : "";
     if (!$this->{whitelisted} && $whiteRe && $whiteReRE!="" && 
$this->{header}=~('('.$whiteReRE.')')) {
       mlogRe($1,"White");
       $this->{whitelisted}=1;
@@ -4330,7 +4330,7 @@
           my $fn=Maillog($fh,'',$NonSpamLog); # tell maillog this isn't spam
           $fn=' -> '.$fn if !$fn=="";
           $fn="" if !$fileLogging;
-          $this->{subject} ="" if !$subjectLogging;
+          $this->{subject} = $subjectLogging ? "\"$this->{subject}\"" : "";
           $SpamProb=0; addSpamProb($fh,1);
           $this->{prepend}="[Local/White]";

@@ -6526,7 +6526,7 @@
       my $fn=Maillog($fh,'',$NonSpamLog); # tell maillog this isn't spam
       $fn=' -> '.$fn if !$fn=="";
       $fn="" if !$fileLogging;
-      $this->{subject} ="" if !$subjectLogging;
+      $this->{subject} = $subjectLogging ? "\"$this->{subject}\"" : "";
      ccMail($this->{mailfrom},$sendHamInbound,$b,$this->{rcpt}) if $done;
      $this->{prepend}="[Local/White]";

@@ -6653,7 +6653,7 @@
       my $fn=Maillog($fh,'',$baysSpamLog);
       $fn=' -> '.$fn if !$fn=="";
       $fn="" if !$fileLogging;
-      $this->{subject} ="" if !$subjectLogging;
+      $this->{subject} = $subjectLogging ? "\"$this->{subject}\"" : "";
       mlog($fh,"spam determined to be safe, passing on to recipient 
$this->{subject} $fn");
       delayWhiteExpire($fh);
       isnotspam($fh,$done);
@@ -6734,7 +6734,7 @@

       $fn=' -> '.$fn if !$fn=="";
       $fn="" if !$fileLogging;
-      $this->{subject} ="" if !$subjectLogging;
+      $this->{subject} = $subjectLogging ? "\"$this->{subject}\"" : "";
       $this->{myheader}.=sprintf("X-Assp-Bayes-Confidence: 
%.5f\r\n",$SpamProbConfidence) if $AddSpamProbHeader && $AddConfidenceHeader && 
$SpamProbConfidence;
       addSpamProb($fh,0,1);
       ccMail($this->{mailfrom},$sendHamInbound,$b,$this->{rcpt}) if $done;
@@ -6813,13 +6813,12 @@
       $this->{header}=~s/^Subject:/Subject: $spamSubject/gim if $spamSubject ;
     }
 #Lets check if its safe to pass if not already done so.
-#Lets check if its safe to pass if not already done so.
     if ($done) {

       my $fn=Maillog($fh,'',$log); # tell maillog what this is.
       $fn=' -> '.$fn if !$fn=="";
       $fn="" if !$fileLogging;
-      $this->{subject} ="" if !$subjectLogging;
+      $this->{subject} = $subjectLogging ? "\"$this->{subject}\"" : "";
       mlog($fh,"spam determined to be safe, passing on to recipient 
$this->{subject} $fn");
       delayWhiteExpire($fh);
       isnotspam($fh,$done);
@@ -6831,7 +6830,7 @@
     my $fn=Maillog($fh,'',$log); # tell maillog what this is.
     $fn=' -> '.$fn if !$fn=="";
     $fn="" if !$fileLogging;
-    $this->{subject} ="" if !$subjectLogging;
+    $this->{subject} = $subjectLogging ? "\"$this->{subject}\"" : "";
     mlog($fh,"$reason $this->{subject} $fn");
     delayWhiteExpire($fh);
        $error=$SpamError if $error eq "";
@@ -8073,7 +8072,7 @@
   foreach $a (split(/\|/,$_[0])) {
    if($a=~/[EMAIL PROTECTED]/) {
     push(@uad,$a);
-   } elsif( $a=~/^\@/ ) {
+   } elsif( $a=~/^\@/ || $LocalAddresses_Flat_Domains) {
     push(@d,$a);
    } else {
     push(@u,$a);


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Assp-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/assp-user

Reply via email to