--- SweepOther.pm.old	2004-01-31 12:19:59.000000000 +0000
+++ SweepOther.pm	2004-05-27 21:16:28.000000000 +0100
@@ -106,6 +106,9 @@
 
       next unless defined $message; # Should be a message for all .header files
 
+      # Check the message if *any* recipient wants dangerous content scanning
+      next unless MailScanner::Config::Value('dangerscan', $message) =~ /1/;
+
       my @headers = <$headerfh>;
 
       #print STDERR "Checking for Happy virus in $DirEntry ($id)\n";
@@ -331,6 +334,10 @@
   while(($id, $attachtypes) = each %$FileOutput) {
     next unless $id;
     $message = $batch->{messages}{$id};
+
+    # Check the message if *any* recipient wants dangerous content scanning
+    next unless MailScanner::Config::Value('dangerscan', $message) =~ /1/;
+
     $tnefname = $message->{entity2file}{$message->{tnefentity}};
 
     my($i, $MatchFound, $FiletypeRules, $LogTypes);