[Mimedefang] patch to add blocking of encrypted email via uvscan

Lucas Albers admin at cs.montana.edu
Sun Dec 7 17:31:23 EST 2003


Fixed my syntax error. Put everyting in 1 function, as it only effects one
function.
--luke

*** mimedefang.pl       Sun Dec  7 11:15:42 2003
--- mimedefang.pl.decrypt       Sun Dec  7 15:28:15 2003
***************
*** 2180,2185 ****
--- 2180,2193 ----
        $VirusName = "unknown-NAI-virus" if $VirusName eq "";
        return ($code, 'virus', 'quarantine');
      }
+     # encrypted file
+     my $block_encrypted_zip =0; #set to 1 to block.
+     if ($code == 0 && $block_encrypted_zip == 1) {
+       if ($CurrentVirusScannerMessage =~ m/^\s+is password-protected\./){
+         $VirusName = "encrypted" if $VirusName eq "";
+         return ($code, 'virus', 'quarantine');
+       }
+     }

      # Self-check failed
      return ($code, 'swerr', 'tempfail') if ($code == 19);



More information about the MIMEDefang mailing list