diff --recursive -u qmail-scanner-2.01/configure qmail-scanner-2.01.PATCH/configure
--- qmail-scanner-2.01/configure	2006-04-04 23:37:03.000000000 +0200
+++ qmail-scanner-2.01.PATCH/configure	2006-08-16 10:25:17.000000000 +0200
@@ -38,7 +38,7 @@
 VERSION=`grep '^# Version: ' qmail-scanner-queue.template`
 VERSION=`echo $VERSION|awk '{print $NF}'`
 
-SUPPORTED_SCANNERS="avgd,clamdscan,clamscan,bitdefender,nod32,clamuko,sweep,sophie,vscan,trophie,uvscan,csav,antivir,kavscanner,AvpLinux,kavdaemon,AvpDaemonClient,fsav,fprot,inocucmd,ravlin,vexira,verbose_spamassassin,fast_spamassassin"
+SUPPORTED_SCANNERS="avgd,clamdscan,clamscan,bitdefender,nod32,clamuko,sweep,sophie,vscan,trophie,uvscan,csav,antivir,kavscanner,aveclient,AvpLinux,kavdaemon,AvpDaemonClient,fsav,fprot,inocucmd,ravlin,vexira,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'
 
@@ -109,6 +109,7 @@
 MAX_ZIP_SIZE="1000000000"
 MAX_SCAN_SIZE="100000000"
 SA_EXAMPLE_QUARANTINE="5"
+AVE_SOCKET="/var/run/aveserver"
 
 while [ -n "$1" ]
 do
@@ -149,6 +150,7 @@
         --mime-unpacker) if [ "$2" != "" ] ; then  shift ; fi ; MIME_UNPACKER="$1" ;;
 	--sa-quarantine) if [ "$2" != "" -a "`echo $2|grep '\-'`" = "" ]; then shift ; fi ; SA_TEMP="$1" ;;
 	--install) INSTALLIT="1" ; if [ "$2" != "" -a "`echo $2|grep '\-'`" = "" ] ; then  shift ; fi ;;
+        --aveclient-socket) if [ "$2" != "" ]; then shift ; fi ; AVE_SOCKET="$1" ;;
         *) cat <<EOF >&2
 
 valid options:
@@ -341,6 +343,9 @@
 			  binary. This is only EVER set when doing a manual 
 			  install.
 
+  --aveclient-socket      Defaults to "/var/run/aveserver". Specifies the socket to use 
+                          for aveclient.
+
 
 This script must be run as root so it can detect problems with setuid
 perl scripts! 
@@ -940,6 +945,22 @@
 	    fi
        fi
     fi
+    if test -x $dir/aveclient
+    then
+        if [ "`echo $FIND_SCANNERS|grep ' aveclient '`" != "" -a "$AVECLIENT" = "" ]; then
+            if test -f "sub-aveclient.pl"
+            then
+               #if [ "`setuidgid $QS_USER $dir/aveclient -p $AVE_SOCKET -s $TMP_DIR/* 2>&1|egrep -i 'virus|test'`" != "" ]; then
+                if [ "`$dir/aveclient -p $AVE_SOCKET -s $TMP_DIR/* 2>&1|egrep -i 'virus|test'`" != "" ]; then
+                    AVPSCAN=""
+                    AVPDAEMON=""
+                    AVECLIENT="${AVECLIENT:-$dir/aveclient}"
+                    INSTALLED_SCANNERS="$INSTALLED_SCANNERS
+aveclient"
+                fi
+            fi
+        fi
+    fi
     if test -x $dir/fsav
     then
         if [ "`echo $FIND_SCANNERS|grep ' fsav '`" != "" -a "$FSECURE" = "" ]; then
@@ -1513,6 +1534,11 @@
     SCANNER_ARRAY="$SCANNER_ARRAY,\"avpdaemon_scanner\""
 fi
 
+if [ "$AVECLIENT" != "" ]; then
+    echo "aveclient=$AVECLIENT"
+    SCANNER_ARRAY="$SCANNER_ARRAY,\"aveclient_scanner\""
+fi
+
 if [ "$FPROT" != "" ]; then
     echo "fprot=$FPROT"
     SCANNER_ARRAY="$SCANNER_ARRAY,\"fprot_scanner\""
@@ -1790,6 +1816,8 @@
 s?HBEDV?$HBEDV?g;
 s?AVPSCAN?$AVPSCAN?g;
 s?AVPDAEMON?$AVPDAEMON?g;
+s?AVECLIENT?$AVECLIENT?g;
+s?AVE_SOCKET?$AVE_SOCKET?g;
 s?FPROT?$FPROT?g;
 s?FSECURE?$FSECURE?g;
 s?INOCUCMD?$INOCUCMD?g;
diff --recursive -u qmail-scanner-2.01/qmail-scanner-queue.template qmail-scanner-2.01.PATCH/qmail-scanner-queue.template
--- qmail-scanner-2.01/qmail-scanner-queue.template	2006-04-04 04:00:17.000000000 +0200
+++ qmail-scanner-2.01.PATCH/qmail-scanner-queue.template	2006-08-16 10:13:01.000000000 +0200
@@ -226,6 +226,8 @@
 my $hbedv_options='HBEDV_OPTIONS';
 my $avp_binary='AVPSCAN';
 my $avpdaemon_binary='AVPDAEMON';
+my $aveclient_binary='AVECLIENT';
+my $aveclient_socket='AVE_SOCKET'; 
 my $fprot_binary='FPROT';
 my $fsecure_binary='FSECURE';
 my $inocucmd_binary='INOCUCMD';
@@ -1791,6 +1793,15 @@
 	}
       }
       close(AVP);
+    } elsif ($scanner eq "aveclient") {
+      open(AVE,"$aveclient_binary -v 2>&1 |")||die "failed to call $aveclient_binary -v  - $!";
+      while (<AVE>) {
+        chomp;
+        if (/server (.*), compiled/){
+          $SCANINFO .= "aveclient: $1. ";
+        }
+      close(AVE);
+      }
     } elsif ($scanner eq "ravlin") {
       open(RAV,"$ravlin_binary --version 2>&1 |")||die "failed to call  $ravlin_binary --version  - $!";
       while (<RAV>) {
