4.26.6: missing tweaks to SweepOther.pm

Jeff A. Earickson jaearick at COLBY.EDU
Thu Jan 29 18:39:18 GMT 2004


Julian,

   Somewhere in 4.25-14 I added the following changes to
lib/MailScanner/SweepOther.pm, per the suggestion of somebody
else on the list, something I find really useful:

*** SweepOther.pm.orig  Thu Dec  4 08:08:07 2003
--- SweepOther.pm       Thu Dec  4 08:17:18 2003
***************
*** 197,204 ****
            #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);
              $message->{namereports}{$safename} .= "$usertext ($safename)\n";
              $message->{nametypes}{$safename}   .= "f";
              $counter++;
--- 197,204 ----
            #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 %s)",
!                                       $logtext, $id, $attach);
              $message->{namereports}{$safename} .= "$usertext ($safename)\n";
              $message->{nametypes}{$safename}   .= "f";
              $counter++;
***************
*** 206,217 ****
              # Do we want to delete the attachment or store it?
              $message->{deleteattach}{$safename} = 1 if $allowdeny =~ /delete/;
            } else {
!             MailScanner::Log::InfoLog("Filename Checks: Allowing %s", $safename)
                if $LogNames;
            }
          }
!         MailScanner::Log::InfoLog("Filename Checks: Allowing %s " .
!                                   "(no rule matched)", $safename)
            if $LogNames && !$MatchFound;
        }
      }
--- 206,217 ----
              # Do we want to delete the attachment or store it?
              $message->{deleteattach}{$safename} = 1 if $allowdeny =~ /delete/;
            } else {
!             MailScanner::Log::InfoLog("Filename Checks: Allowing %s %s", $id, $safename)
                if $LogNames;
            }
          }
!         MailScanner::Log::InfoLog("Filename Checks: Allowing %s %s " .
!                                   "(no rule matched)", $id, $safename)
            if $LogNames && !$MatchFound;
        }
      }
***************
*** 353,360 ****
          $MatchFound = 1;
          if ($allowdeny =~ /deny/) {
            # It's a rejection rule, so log the error.
!           MailScanner::Log::InfoLog("Filetype Checks: %s (%s)",
!                                     $logtext, $attach);
            $message->{namereports}{$safename} .= "$usertext ($safename)\n";
            $message->{nametypes}{$safename}   .= "f";
            $counter++;
--- 353,360 ----
          $MatchFound = 1;
          if ($allowdeny =~ /deny/) {
            # It's a rejection rule, so log the error.
!           MailScanner::Log::InfoLog("Filetype Checks: %s (%s %s)",
!                                     $logtext, $id, $attach);
            $message->{namereports}{$safename} .= "$usertext ($safename)\n";
            $message->{nametypes}{$safename}   .= "f";
            $counter++;
***************
*** 362,368 ****
            # Do we want to delete the attachment or store it?
            $message->{deleteattach}{$safename} = 1 if $allowdeny =~ /delete/;
          } else {
!           MailScanner::Log::InfoLog("Filetype Checks: Allowing %s", $safename)
              if $LogTypes;
          }
        }
--- 362,368 ----
            # Do we want to delete the attachment or store it?
            $message->{deleteattach}{$safename} = 1 if $allowdeny =~ /delete/;
          } else {
!           MailScanner::Log::InfoLog("Filetype Checks: Allowing %s %s", $id, $safename)
              if $LogTypes;
          }
        }

I see that they didn't get into 4.26.6.  Any chance they
could?  Thanks.

Jeff Earickson
Colby College



More information about the MailScanner mailing list