Log permitted filenames

Raymond Dijkxhoorn raymond at PROLOCATION.NET
Thu Dec 4 11:56:23 GMT 2003


Hi!

> 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++;

If it doesnt break anything it would be a nice addiction, since its hard
to track down messages now. =) with the msgid its pretty simple to grep
around.

Bye,
Raymond.



More information about the MailScanner mailing list