Dear reader,
ever since I've installed version 0.90.1-3 of ClamAV on our mailsystem, I can't get clamDscan to work anymore. In the hope to solve the issue, I installed version 0.90.2-2 (downloaded from http://www.sosdg.org/clamav-win32), but this also doesn't help. Before I installed the first mentioned version, everything was o.k. The latest installed version that worked fine was 0.88.6-1, but I had to upgrade because Freshclam told me to do so.
The problem is that if I run clamDscan (while clamD is running of course), I get a message saying "lstat() failed. ERROR". The funny thing is that when I start clamD in DEBUG mode ("clamd --debug"), AND I run clamDscan.exe from the bin directory (current dir is c:\clamav-devel\bin), that it works perfectly then. But then when I run clamDscan from another directory (let's say c:\clamav-devel, by typing the command "bin\clamdscan.exe test\clam-error.rar", also while ClamD is running in debug mode) that I get the same error again. Again: if I run clamD in normal (non-debug) mode and run clamDscan from the bin directory, it doesn't work (while it works when running clamD in debug mode).
Does anyone have a clue what might be the problem? Maybe the problem is caused by OS updates instead of the new versions of ClamAV, I don't know.
System information:
- Microsoft Windows Server 2003, Standard Edition, Service Pack 1
- All recent OS updates installed
- ClamAV Win32 version: 0.90.2-2
- ClamAV directory: c:\clamav-devel
Thanks in advance for your suggestions!
Best regards,
Peter van der Meer
The Netherlands
What your running into is a
What your running into is a glitch with Windows and the compat. layer.
If you use clamdscan, you have to specify full paths and either double slash \ or use / instead of \. If you don't, clamd will have issues trying to find the file you want to scan.
Try using the full path and let me know if it clears things up.
Brie Bruns
The Summit Open Source Development Group
http://www.sosdg.org / http://blog.sosdg.org/bruns
Issue seems to be caused by something else...
Hi Brie,
first of all: thanks for your reply! Indeed, when I use the full path, everything is o.k.
That brought me back to the original problem: why does the virus scanning of the incoming messages on our mailserver doesn't work anymore? We use MxGuard - ClamAV combination to filter spam and virusses on our iMail server. We switched from using clamscan.exe to clamDscan.exe sometime ago, because this worked much better, faster and efficient. Or, to say it different: we can't use clamscan.exe, because it consumes a lot of time and resources each time a message is received by our mailserver. Anyway, the clamDscan construction worked fine, up to and including version 0.88.6-1.
By using a trick (batch file) I just found out that mxguard executes the following command:
c:\clamav-devel\bin\clamdscan.exe --quiet --disable-summary --infected --mbox "d:\programfiles\imail\spool\mx_d40e4000c0060fc0b.smd"
This results in the following error:
WARNING: Ignoring option --infected (-i)
/cygdrive/c/clamav-devel/bin/clamdscan: unrecognized option `--mbox'
ERROR: Unknown option passed.
ERROR: Can't parse the command line
It seems like clamdscan accepted the --mbox option in the 0.88.6-1 version, but now it doesn't anymore.
I don't have influence on the arguments that mxguard sends to clam(d)scan.
What to do?
Best regards,
Peter
The --mbox command is
The --mbox command is depreciated. I didn't even realize this until after the 0.90.x versions came out.
I'm going to see about adding a dummy flag that does nothing so that it doesn't error anymore, but that will take some time.
If MX guard is still using --mbox, contact their support to find out how to change it.
Brie Bruns
The Summit Open Source Development Group
http://www.sosdg.org / http://blog.sosdg.org/bruns
Thanks!
o.k., thanks for the reply again! I've contacted the mxGuard support team, awaiting their response.
Best regards,
Peter