Bug 67621

Summary: Amavisd doesn't work with clamd(ClamAV Daemon).
Product: Ports & Packages Reporter: Yoshisato Yanagisawa <osho>
Component: Individual Port(s)Assignee: freebsd-ports-bugs (Nobody) <ports-bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   

Description Yoshisato Yanagisawa 2004-06-06 07:50:04 UTC
	[1] When amavisd.conf is wrote not to run anti-virus software
	except clamd, clamd doesn't run and cause following error.
	"All virus scanners failed - mail requeued (message-id=<20040606145041.61fef741.osho@pcc-software.org>)"
	It must be caused by that socket for clamd doesn't made.

	[2] Even if correct [1] problem, amavisd ignore virus warning
	by clamd.

Fix: replace amavisd/files/patch-amavis-av-clamavd into
	following patch.



I am sorry not to notice [1] and [2] problem at last time.--E1W6aIrywdEwcxFeW7pnnaVAkSi4bgV909eGE8KWOnTriHQr
Content-Type: text/plain; name="file.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="file.diff"

--- amavis/av/clamavd.orig      Tue Feb 25 11:42:54 2003
+++ amavis/av/clamavd   Sun Jun  6 15:29:11 2004
@@ -5,7 +5,7 @@
 
 if ($clamd) {
     do_log(2,"Using clamd");
-    my $sock = IO::Socket::INET->new('127.0.0.1:3310');
+    my $sock = IO::Socket::UNIX->new(Peer => '/var/run/clamav/clamd');
     if (defined $sock) {
        $sock->print("SCAN $TEMPDIR/parts\n");
        $sock->flush;
@@ -15,7 +15,7 @@
        if ($output =~ /FOUND$/) {      # no errors, a virus was found
            $scanner_errors = 0;
            @virusname = ($output =~ /: (.+) FOUND/g);
-           return 1;  # 'true' indicates virus found and stops further checking
+           do_virus($output);
        } elsif ($output =~ /OK$/) {            # no errors, no viruses
            $scanner_errors = 0;
        } elsif ($output =~ /ERROR$/) {
How-To-Repeat: 	[1] Just install clamav and amavisd, and remove antivirus settings
	except clamd from amavisd.conf.

	[2] fix [1] problem.
Comment 1 Pav Lucistnik freebsd_committer freebsd_triage 2004-06-07 00:18:44 UTC
State Changed
From-To: open->closed

Committed, thanks!