Log permitted filenames

Julian Field mailscanner at ecs.soton.ac.uk
Thu Dec 4 11:43:36 GMT 2003


At 11:22 04/12/2003, you wrote:
>Don't know if this already exists or not but I'm looking to get a bit more
>out of the log permitted filenames option.
>Currently it generates
>Dec  2 06:55:16 $hostname MailScanner[11630]: Filename Checks: Windows/DOS
>Executable (patch.exe)
>What I think would be really usefull would be
>Dec  2 06:55:16 $hostname MailScanner[11630]: Filename Checks: Windows/DOS
>Executable (patch.exe) in $msgid
>
>Any ideas ?
>
>Uly

Steve F -- Will this change upset MailWatch at all? I don't want to break
anything...

To get the extra logging, apply this patch to SweepOther.pm :

--- SweepOther.pm.old   2003-12-04 11:42:28.000000000 +0000
+++ SweepOther.pm       2003-12-04 11:42:43.000000000 +0000
@@ -197,8 +197,8 @@
            #print STDERR "\"$attach\" matched \"$regexp\" or \"$safename\"
did\n";
            if ($allowdeny =~ 'deny') {
              # It's a rejection rule, so log the error.
-            MailScanner::Log::InfoLog("Filename Checks: %s (%s)",
-                                      $logtext, $attach);
+            MailScanner::Log::InfoLog("Filename Checks: %s (%s) in %s",
+                                      $logtext, $attach, $id);
              $message->{namereports}{$safename} .= "$usertext ($safename)\n";
              $message->{nametypes}{$safename}   .= "f";
              $counter++;

--
Julian Field
www.MailScanner.info
MailScanner thanks transtec Computers for their support

PGP footprint: EE81 D763 3DB0 0BFD E1DC  7222 11F6 5947 1415 B654



More information about the MailScanner mailing list