On Sat, 2004-02-14 at 00:00, Chris Conn wrote: > Hello, > > I get the following error after installing unrar-3.3.6 (from a > unrar-3.3.6-0.lvn.1.rh90 rpm I built for RH9) > > Feb 13 18:33:25 MailScanner[5160]: ProcessClamAVOutput: unrecognised > line "UNRAR 3.30 freeware Copyright (c) 1993-2004 Eugene Roshal". > Please contact the authors! > Feb 13 18:33:25 MailScanner[5160]: No files to extract > Feb 13 18:33:25 MailScanner[5160]: ProcessClamAVOutput: unrecognised > line "No files to extract". Please contact the authors! > These are MailScanner errors, you should really post them to the MailScanner list. The unrecognised line errors don't matter (just unexpected output that is being ignored, however the 'no files to extract' is probably a symptom of running clam as root. It tries to use /root/tmp as temporary space - but because it drops privileges it cannot write to there. I've attached my own updated clamav-wrapper which addresses this issue. You will need to uncomment the lines about unrar in it.
BMRB International http://www.bmrb.co.uk +44 (0)20 8566 5000 _________________________________________________________________ This message (and any attachment) is intended only for the recipient and may contain confidential and/or privileged material. If you have received this in error, please contact the sender and delete this message immediately. Disclosure, copying or other action taken in respect of this email or in reliance on it is prohibited. BMRB International Limited accepts no liability in relation to any personal emails, or content of any email which does not directly relate to our business.
#!/bin/sh # clamav-wrapper -- invoke ClamAV for use with mailscanner # # Adrian Bridgett <[EMAIL PROTECTED]>, 14/12/01 # # MailScanner - SMTP E-Mail Virus Scanner # Copyright (C) 2001 Julian Field # # $Id: clamav-wrapper,v 1.4.2.3 2003/08/15 16:30:58 jkf Exp $ # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # The author, Julian Field, can be contacted by email at # [EMAIL PROTECTED] # or by paper mail at # Julian Field # Dept of Electronics & Computer Science # University of Southampton # Southampton # SO17 1BJ # United Kingdom # # # Modifications by Kevin Spicer <[EMAIL PROTECTED]> to get # external unpackers working correctly. 9 Nov 2003 # Removed --unzip from ScanOptions, as its already in ExtraScanOptions # (Clam usually uses own unzipper, -unzip just allows it to use external # program so should be in ExtraScanOptions as it could cause a failure) # Separate all unpackers and add missing ones. # Add tmpdir (and check for it) in MailScanner incoming dir # (to take advantage of ramdisk) - needed by external unpacker ###### IF YOU ARE RUNNING MAILSCANNER AS ROOT ###### # You need to set the following in MailScanner.conf so that external # unpackers can be used... # Incoming Work Group = clamav # Incoming Work Permissions = 0640 # You may want to check this script for bash-isms MailScannerWorkDir="/var/spool/MailScanner/incoming" ClamUser="clamav" ClamGroup="clamav" ScanOptions="" ExtraScanOptions="" # Extra options we try to pass to clam but we handle it failing # For each option there are two alternatives... # --option # if the required program is in the PATH # --option=/path/to/program # If its in a non standard location # If you use the second option make sure you set the correct path in each case # Note that clam internally supports Zip, Gzip and Rar (v2.0) files, # so for these the extra options are just a fallback should the internal # unpacker fail (the internal unzipper should also support .jar files). # Common external unpackers you probably have installed (hence # enabled by default) # Uncomment ONE of the following lines if you have unzip installed ExtraScanOptions="$ExtraScanOptions --unzip" #ExtraScanOptions="$ExtraScanOptions --unzip=/path/to/unzip" # Uncomment ONE of the following lines if you have unzip installed # And want to be able to use it to scan jar files should the internal # unzipper fail ExtraScanOptions="$ExtraScanOptions --jar" #ExtraScanOptions="$ExtraScanOptions --jar=/path/to/unzip" # Uncomment ONE of the following lines if you have tar installed ExtraScanOptions="$ExtraScanOptions --tar" #ExtraScanOptions="$ExtraScanOptions --tar=/path/to/tar" # Uncomment ONE of the following lines if you have tar installed # AND it is GNU tar with gzip support ExtraScanOptions="$ExtraScanOptions --tgz" #ExtraScanOptions="$ExtraScanOptions --tgz=/path/to/tar" # Uncomment ONE of the following lines if you have tar installed and # want to scan debian .deb packages # Must be GNU tar with gzip support ExtraScanOptions="$ExtraScanOptions --deb" #ExtraScanOptions="$ExtraScanOptions --deb=/path/to/tar" # LESS COMMON unpackers, which probably aren't installed by default # (hence disabled) # Uncomment ONE of the following lines if you have unrar installed #ExtraScanOptions="$ExtraScanOptions --unrar" #ExtraScanOptions="$ExtraScanOptions --unrar=/path/to/unrar" # Uncomment ONE of the following lines if you have unarj installed #ExtraScanOptions="$ExtraScanOptions --unarj" #ExtraScanOptions="$ExtraScanOptions --unarj=/path/to/unarj" # Uncomment ONE of the following lines if you have unace installed #ExtraScanOptions="$ExtraScanOptions --unace" #ExtraScanOptions="$ExtraScanOptions --unace=/path/to/unace" # Uncomment ONE of the following lines if you have lha installed #ExtraScanOptions="$ExtraScanOptions --lha" #ExtraScanOptions="$ExtraScanOptions --lha=/path/to/lha" # Uncomment ONE of the following lines if you have zoo installed #ExtraScanOptions="$ExtraScanOptions --zoo" #ExtraScanOptions="$ExtraScanOptions --zoo=/path/to/unzoo" # Uncomment next line if you need to disable Clam's DoS protection #ExtraScanOptions="--max-files=0 --max-space=0 --max-recursion=0 $ExtraScanOptions" ClamScan=$1/bin/clamscan shift if [ ! -x $ClamScan ]; then ClamScan=/usr/bin/clamscan fi if [ "x$1" = "x-IsItInstalled" ]; then [ -x $ClamScan ] && exit 0 exit 1 fi umask 0077 # Check that the tmpdir exists, if not create it. if [ ! -x "${MailScannerWorkDir}/clamav" ]; then mkdir "${MailScannerWorkDir}/clamav" if [ $? ]; then ExtraScanOptions="$ExtraScanOptions --tempdir=${MailScannerWorkDir}/clamav" # If we are root chmod it to the clamav user/group if [ `whoami` = "root" ]; then chown ${ClamUser}:${ClamGroup} "${MailScannerWorkDir}/clamav" fi fi else ExtraScanOptions="$ExtraScanOptions --tempdir=${MailScannerWorkDir}/clamav" fi $ClamScan $ExtraScanOptions $ScanOptions "$@" if [ "$?" = "40" ]; then # Clam complained we passed an illegal command-line option exec $ClamScan $ScanOptions "$@" else exit $? fi