diff -uarb --new-file qmail-scanner-1.23/configure qmail-scanner-1.23.new/configure
--- qmail-scanner-1.23/configure	Wed Aug  4 01:24:35 2004
+++ qmail-scanner-1.23.new/configure	Wed Aug  4 17:05:15 2004
@@ -38,7 +38,7 @@
 VERSION=`grep '^# Version: ' qmail-scanner-queue.template`
 VERSION=`echo $VERSION|awk '{print $NF}'`
 
-SUPPORTED_SCANNERS="clamscan,clamdscan,sweep,sophie,vscan,trophie,uvscan,csav,antivir,kavscanner,AvpLinux,kavdaemon,AvpDaemonClient,fsav,fprot,inocucmd,vexira,bitdefender,verbose_spamassassin,fast_spamassassin"
+SUPPORTED_SCANNERS="filescan,clamscan,clamdscan,sweep,sophie,vscan,trophie,uvscan,csav,antivir,kavscanner,AvpLinux,kavdaemon,AvpDaemonClient,fsav,fprot,inocucmd,vexira,bitdefender,verbose_spamassassin,fast_spamassassin"
 
 SILENT_VIRUSES='klez,bugbear,hybris,yaha,braid,nimda,tanatos,sobig,winevar,palyh,fizzer,gibe,cailont,lovelorn,swen,dumaru,sober,hawawi,holar-i,mimail,poffer,bagle,worm.galil,mydoom,worm.sco,tanx,novarg,\@mm'
 
@@ -951,6 +951,13 @@
     fi
 done
 
+if [ "`echo $FIND_SCANNERS|grep ' filescan '`" != "" -a "$FILESCAN" = "" ]; then
+    if [ "`perl -MFile::Scan -e "print File::Scan->new()->scan('$TMP_DIR/eicar.com')" 2>&1|egrep -i 'virus|test'`" != "" ]; then
+	FILESCAN="1"
+	INSTALLED_SCANNERS="$INSTALLED_SCANNERS filescan"
+    fi
+fi
+
 if [ "$FIND_SILENT_VIRUSES" = "$SILENT_VIRUSES" ]; then
     SILENT_VIRUSES="auto"
 fi
@@ -1235,6 +1242,11 @@
 echo ""
 echo "Content/Virus Scanners installed on your System"
 echo ""
+if [ "$FILESCAN" != "" ]; then
+    echo "File::Scan=$FILESCAN";
+    SCANNER_ARRAY="$SCANNER_ARRAY,\"filescan_scanner\""
+fi
+
 if [ "$CLAMSCAN" != "" -a "$CLAMDSCAN" = "" ]; then
     echo "clamscan=$CLAMSCAN";
     SCANNER_ARRAY="$SCANNER_ARRAY,\"clamscan_scanner\""
@@ -1560,6 +1572,7 @@
 s?RAVLIN?$RAVLIN?g;
 s?VEXIRA?$VEXIRA?g;
 s?BITDEFENDER?$BITDEFENDER?g;
+s?FILESCAN?$FILESCAN?g;
 s?CLAMSCAN?$CLAMSCAN?g;
 s?CLAMDSCAN?$CLAMDSCAN?g;
 s?SPAMASSASSIN_BINARY?$SPAMASSASSIN_BINARY?g;
diff -uarb --new-file qmail-scanner-1.23/qmail-scanner-queue.template qmail-scanner-1.23.new/qmail-scanner-queue.template
--- qmail-scanner-1.23/qmail-scanner-queue.template	Tue Aug  3 03:26:19 2004
+++ qmail-scanner-1.23.new/qmail-scanner-queue.template	Wed Aug  4 17:05:15 2004
@@ -180,7 +180,6 @@
 #Full paths to binaries used within this script follow - small performance
 #improvement :-)
 
-
 my $mimeunpacker_binary='MIMEUNPACKER';
 my $unzip_binary='UNZIP_BINARY';
 my $unzip_options='UNZIP_OPTIONS';
@@ -212,6 +211,7 @@
 my $clamscan_options="-r -m --unzip --unrar --unzoo --lha --disable-summary --max-recursion=10 --max-space=100000";
 my $clamdscan_binary='CLAMDSCAN';
 my $clamdscan_options="-r --disable-summary --max-recursion=10 --max-space=100000";
+my $filescan_module='FILESCAN';
 my $spamc_binary='SPAMC_BINARY';
 my $spamc_options='SPAMC_OPTIONS';
 my $spamc_subject='SPAMC_SUBJECT';
@@ -269,6 +269,10 @@
 
 use Getopt::Std;
 
+if ( $filescan_module ) {
+  use File::Scan;
+}
+
 #my ($opt_v,$opt_h,$opt_g,$opt_r,$opt_z);
 
 getopts('vhgrz');
@@ -1689,6 +1693,10 @@
 	}
       }
       close(CLAMS);
+    } elsif ($scanner eq "filescan") {
+      my $fs = File::Scan->new();
+      my $fv = $fs->VERSION;
+      $SCANINFO .= "File::Scan: $fv. ";
     } elsif ($scanner eq "spamassassin") {
       #X-Spam-Checker-Version: SpamAssassin 2.01
       open(SPAS,"$spamassassin_binary  -V |")||die "failed to call $spamassassin_binary -V - $!";
diff -uarb --new-file qmail-scanner-1.23/sub-filescan.pl qmail-scanner-1.23.new/sub-filescan.pl
--- qmail-scanner-1.23/sub-filescan.pl	Thu Jan  1 01:00:00 1970
+++ qmail-scanner-1.23.new/sub-filescan.pl	Wed Aug  4 17:05:15 2004
@@ -0,0 +1,34 @@
+sub filescan_scanner {
+    &debug("filescan: starting scan of directory \"$ENV{'TMPDIR'}\"...");
+ 
+    my ($start_filescan_time)=[gettimeofday];
+    my $filescanner = File::Scan->new();
+    my $has_virus = 0;
+ 
+    open DIR, "ls $ENV{'TMPDIR'} |";
+    while (<DIR>) {
+	next if m/^\./; chomp;
+	my $file = sprintf "%s/%s",$ENV{'TMPDIR'},$_;
+	&debug("filescan: scanning $file...");
+	if (my $vv = $filescanner->scan("$file")) {
+	    &debug("filescan: There be a virus! ($vv)");
+	    $quarantine_description=$vv; $has_virus++;
+	    $quarantine_event="FileScan:$vv";
+	    $description .= "\n--- File::Scan results --\n$vv FOUND";
+	    last;
+	} elsif ( my $ee = $filescanner->error()) {
+	    &debug("File::Scan [Error] = $ee");
+	    &error_condition("FileScan: Error: $ee");
+	    last;
+	} elsif ( my $ss = $filescanner->suspicious()) {
+	    &debug("File::Scan [suspicious]");
+	    last;
+	}
+    }
+    close DIR;
+    my ($filescan_time) = tv_interval ($start_filescan_time, [gettimeofday]);
+    &debug("filescan: finished scan of dir \"$ENV{'TMPDIR'}\" in 
+ $filescan_time secs");
+    ## uncomment the following to reject the email iff defined
+    #&reject_email("Rejected VIRUS $quarantine_description",33) if ($has_virus);
+}
