Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 264952 - app-antivirus/clamav-0.95: clamav-milter won't start with default config
Summary: app-antivirus/clamav-0.95: clamav-milter won't start with default config
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Antivirus Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-04-05 10:23 UTC by Robert S
Modified: 2009-04-21 22:06 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Robert S 2009-04-05 10:23:04 UTC
I've just installed clamav-0.95.  clamav-milter won't start with the default config file (/etc/clamav-milter.conf).  The following changes are required:

"Example" on line 6 needs to be commented out

The following needs to be added as a minimum:

MilterSocket /var/run/clamav/clmilter.sock
ClamdSocket unix:/var/run/clamav/clamd.sock
User clamav

These changes should be in the default config file.

Reproducible: Always

Actual Results:  
clamav-milter won't start with the rest of /etc/init.d/clamd
Comment 1 Thomas Raschbacher gentoo-dev 2009-04-09 11:54:38 UTC
I assume it's the same for 0.95.1 right?
Comment 2 Robert S 2009-04-10 10:53:12 UTC
(In reply to comment #1)
> I assume it's the same for 0.95.1 right?
> 

Yes.  It just requires a few simple changes to the config file.
Comment 3 Thomas Raschbacher gentoo-dev 2009-04-16 14:22:50 UTC
added some sed magic (similar to ones for clamd.conf and freshclam.conf) to 0.95.1 ebuild (will prolly remove 0.95 soonish) ..
Comment 4 Robert S 2009-04-17 22:41:39 UTC
Line 85 of /etc/clamav-milter.conf should be as such:

ClamdSocket unix:/var/run/clamav/clamd.sock

Not

ClamdSocket /var/run/clamav/clamd.sock
Comment 5 Robert S 2009-04-18 14:00:38 UTC
I've actually discovered that messages are not being passed to clamav-milter.  I've copied my sendmail config from another server (which has clamav-0.94 installed and works OK) and it still doesn't work.  My logs show no evidence that messages have been scanned and there are no headers in the messages.  I've tried using the unix: and tcp: sockets - no joy.

I've just downgraded back to 0.94.2 and everything works OK now.
Comment 6 Thomas Raschbacher gentoo-dev 2009-04-20 05:49:46 UTC
hmm not sure if that has anything to do with that original bug report .. I don't use clamav-milter .. did you try upstream?
Comment 7 VinnieNZ 2009-04-20 05:56:21 UTC
(In reply to comment #5)
> I've actually discovered that messages are not being passed to clamav-milter. 
> I've copied my sendmail config from another server (which has clamav-0.94
> installed and works OK) and it still doesn't work.  My logs show no evidence
> that messages have been scanned and there are no headers in the messages.  I've
> tried using the unix: and tcp: sockets - no joy.
> 
> I've just downgraded back to 0.94.2 and everything works OK now.
> 

Robert, I'm seeing messages hitting clamav-milter ok, but not being passed to clamd at all.  It tells me that:
    No clamd server appears to be available

And then rejects them.

I get this for both the local unix socket and the tcp one even after configuring clamd to listen on both for the machine.  Is this what you were referring to?
Comment 8 Robert S 2009-04-20 11:58:53 UTC
I've just reinstalled 0.95.1.  I've sent myself one of the clamav test files and it gets correctly identified as being infected and dealt with (quarantine in my case).  However, there is no logging of clean messages, and no "X-Virus-Scanned:" headers appearing in the message.

There is some discussion of this at http://www.nabble.com/clamav-milter-0.95.1-logging-deficiencies-td23063251.html
Comment 9 Thomas Raschbacher gentoo-dev 2009-04-21 09:17:23 UTC
if i understand this right then this isn'T really a gentoo bug right?
Comment 10 Robert S 2009-04-21 09:54:39 UTC
No its not.  I've put a query on the clamav ML about this.
Comment 11 VinnieNZ 2009-04-21 21:06:38 UTC
OK, my problem was different in the end.

Just to watch out for, this comment section in the clamav-milter.conf file, isn't strictly right:

# Waiting for data from clamd will timeout after this time (seconds).
# Value of 0 disables the timeout.
#
# Default: 120
#ReadTimeout 300


Setting the ReadTimeout to 0 no longer disables the timeout.  It will actually timeout after 0 seconds.  This is why I was seeing the "No clamd server appears to be available" message as it was timing out trying to connect to the local socket (or rather, it basically didn't even have time to try and connect).
Comment 12 Robert S 2009-04-21 22:06:43 UTC
I have fixed my problem by adding this to the end of /etc/clamav-milter.conf

AddHeader yes

I think that this should be added to the default config to match the behaviour of the old version.  It appears that everything is working now.