Michael Brown wrote:
Hi Everyone,
I'm new to this list, but a long time user of ClamAV.
For years I've been using this simple procmail (clamscan-procfilter.pl)
script from
http://www.virtualblueness.net/~blueness/clamscan-procfilter/
It's worked great, until I upgraded to the 0.9X ClamAV and it no longer
is able to pass e-mails to the clamav daemon. I'm not sure why, but as
far as I can tell everything is peachy with clamav, freshclam runs just
fine, the clamd process is running. The configuration file is correct.
The only thing I can guess (and after searching the mail list since no
one else has reported this yet) is maybe some scanning parameters for
the new clamav has changed and that's why this script is not working.
The script has a section where it passes the e-mail to the clamdscan
script to scan and then later in the file does other things to redirect
virus infected e-mails, etc. As far as I can tell, the files are being
sent over to scan, but they remain (never removed after a successful
scan). I thought maybe this is not using the right command to scan the
file (updated version has new parameters) and thus that's why e-mails
are not getting a proper clamav scan.
If anyone has experience with this procmail script, any information
would be greatly appreciated.
############################################################
# Where are your binaries?
#
$MKTEMP='/bin/mktemp' ;
$CLAMSCAN='/usr/bin/clamdscan' ;
$FORMAIL='/usr/bin/formail' ;
#
# Read in the email from stdin
#
@file = <> ;
#
# Create/open a temp file for the output of clamscan
#
$TMPFILE=`$MKTEMP /tmp/clamtemp.XXXXXX` ;
chomp $TMPFILE ;
open CLAM, "|$CLAMSCAN --stdout --mbox - > $TMPFILE" ;
Im not running 0.9X but im pretty sure --mbox isnt valid anymore. And
why is the variable CLAMSCAN when its calling clamDscan? Its just a
little confusing...
print CLAM @file ;
close CLAM ;
############################################################
Thanks,
Michael
_______________________________________________
Help us build a comprehensive ClamAV guide: visit http://wiki.clamav.net
http://lurker.clamav.net/list/clamav-users.html
_______________________________________________
Help us build a comprehensive ClamAV guide: visit http://wiki.clamav.net
http://lurker.clamav.net/list/clamav-users.html