I just recently upgraded mimedefang and I have run into problems, after few hours of work identified as wrong permisions on files passed for scanning.
But during the troubleshooting, I noticed that currently there is no checking for error returned by clamd in message_contains_virus_clamd function, only in entity_contains_virus_clamd. And even that one is not giving much information, just reports failure.
The attached patch adds more error reporting for easier diagnoists. Hope you find it useful.
Thanks
Tomas
--- mimedefang.pl.in 2004-07-22 05:36:59.000000000 +0930
+++ mimedefang.pl.in.patched 2004-07-27 23:40:52.875000000 +0930
@@ -4256,10 +4256,11 @@
if ($output =~ /: (.+) FOUND/) {
$VirusScannerMessages .= "clamd found the $1 virus.\n";
$VirusName = $1;
- return (wantarray ? (1, 'virus', 'quarantine') : 1);
- } elsif ($output =~ /: .+ERROR$/) {
- return (wantarray ? (999, 'swerr', 'tempfail') : 1);
- }
+ return (wantarray ? (1, 'virus', 'quarantine') : 1);
+ } elsif ($output =~ /^(.+) ERROR$/) {
+ md_syslog('err', "$MsgID: Clamd Daemon returned error: " . $1);
+ return (wantarray ? (999, 'swerr', 'tempfail') : 1);
+ }
return (wantarray ? (0, 'ok', 'ok') : 0);
}
# Could not connect to daemon
@@ -4322,7 +4323,10 @@
$VirusScannerMessages .= "clamd found the $1 virus.\n";
$VirusName = $1;
return (wantarray ? (1, 'virus', 'quarantine') : 1);
- }
+ } elsif ($output =~ /^(.+) ERROR$/) {
+ md_syslog('err', "$MsgID: Clamd Daemon returned error: " . $1);
+ return (wantarray ? (999, 'swerr', 'tempfail') : 999);
+ }
}
else {
# Could not connect to daemon
_______________________________________________ Visit http://www.mimedefang.org and http://www.canit.ca MIMEDefang mailing list [EMAIL PROTECTED] http://lists.roaringpenguin.com/mailman/listinfo/mimedefang

