Log permitted filenames

Tony Finch dot at DOTAT.AT
Thu Dec 4 13:52:33 GMT 2003


Julian Field <mailscanner at ECS.SOTON.AC.UK> wrote:
>All adopted into the main source tree. Will be in the next release.

I have some more along the same lines, partly for spotting which
instance of MailScanner processed a particular message, and partly just
general extra message tracking. I'm fairly sure I've posted this before
(but probably buried in other stuff). I haven't included the patch to
ConfigDefs.pl because it's a pain to unpick from my other changes.

Tony.
--
f.a.n.finch  <dot at dotat.at>  http://dotat.at/
NORTH FORELAND TO SELSEY BILL: NORTHEAST 5 TO 7 LOCALLY GALE 8 LATER VEERING
EAST AND DECREASING 4 OR 5. RATHER HAZY WITH SOME PATCHY DRIZZLE AT TIMES.
MODERATE OR GOOD. MODERATE TO ROUGH DECAYING MODERATE.


--- Exim.pm     4 Jul 2003 18:08:28 -0000       1.1.1.8
+++ Exim.pm     8 Jul 2003 16:25:12 -0000       1.20
@@ -1320,6 +1321,8 @@
        $HitLimit4 = 1
          if $DirtyBytes>=$MaxDirtyB;
        $newmessage->WriteHeaderFile(); # Write the file of headers
+       MailScanner::Log::InfoLog("New Message: $id to be scanned")
+               if MailScanner::Config::Value('logmessageids');
       } else {
        $newmessage->NeedsScanning(0);
        $CleanMsgs++;
@@ -1329,6 +1332,8 @@
        $HitLimit2 = 1
          if $CleanBytes>=$MaxCleanB;
        $newmessage->WriteHeaderFile(); # Write the file of headers
+       MailScanner::Log::InfoLog("New Message: $id to be forwarded")
+               if MailScanner::Config::Value('logmessageids');
       }
     }

--- MessageBatch.pm     4 Jul 2003 18:08:28 -0000       1.1.1.6
+++ MessageBatch.pm     26 Aug 2003 09:44:27 -0000      1.12
@@ -231,9 +241,13 @@
       # or the HTML stripping.
       if ($message->{bodymodified}) {
         $message->DeliverModifiedBody('unscannedheader');
+        MailScanner::Log::InfoLog("Delivered modified message $id")
+             if MailScanner::Config::Value('logmessageids');
       } else {
         $OutQ = MailScanner::Config::Value('outqueuedir', $message);
         $message->DeliverUnscanned($OutQ);
+        MailScanner::Log::InfoLog("Delivered unscanned message $id")
+             if MailScanner::Config::Value('logmessageids');
       }
       $message->{deleted} = 1; # This marks it for purging from disk
       push @messages, $message;
@@ -465,6 +479,8 @@
     next if $message->{infected};
     #print STDERR "Delivering uninfected message $id\n";
     $message->DeliverUninfected();
+    MailScanner::Log::InfoLog("Delivered uninfected message $id")
+           if MailScanner::Config::Value('logmessageids');
     $message->{deleted} = 1;
     push @messages, $message;
   }
@@ -531,6 +547,11 @@
       $message->DeliverCleaned();
       #print STDERR "Deleting silent-infected message " . $message->{id} . "\n";
       push @messages, $message;
+      MailScanner::Log::InfoLog("Delivering message $id with silent virus")
+          if MailScanner::Config::Value('logmessageids');
+    } else {
+      MailScanner::Log::InfoLog("DISCARDED message $id with silent virus")
+          if MailScanner::Config::Value('logmessageids');
     }
     $message->{deleted} = 1;
     $message->{stillwarn} = 1;
@@ -557,6 +578,8 @@
     #print STDERR "Deleting cleaned message " . $message->{id} . "\n";
     # BUGFIX: JKF $message->{deleted} = 1;
     push @messages, $message;
+    MailScanner::Log::InfoLog("Delivering cleaned message $id")
+        if MailScanner::Config::Value('logmessageids');
   }

   MailScanner::Mail::TellAbout(@messages);



More information about the MailScanner mailing list