Bug 727894

Summary: Broken config for clamav-milter
Product: [Fedora] Fedora EPEL Reporter: Milan Kerslager <milan.kerslager>
Component: clamavAssignee: Jan-Frode Myklebust <janfrode>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: el6CC: janfrode, nathanael, nb, redhat-bugzilla, steve
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: clamav-0.97.2-5.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-08-23 19:30:46 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
A patch for clamav-milter.conf config file none

Description Milan Kerslager 2011-08-03 14:49:28 UTC
Created attachment 516528 [details]
A patch for clamav-milter.conf config file

The config file /etc/clamav-milter.conf is broken, non-working:

ClamdSocket has wrong syntax (mandatory)
PidFile is not set (should be set to be able to send signals)
MilterSocket is not set (should be set to proper path with right permission)

In the attached patch, there is settings for logging to be similar to spamass-milter which is in EPEL too. I vote to set them to be closer to wide-use-

Comment 1 Jan-Frode Myklebust 2011-08-04 07:07:14 UTC
I agree that the provided config should be working, but I think your suggested patch is doing a little more than just make it work. IMHO overriding the upstream defaults for AddHeader, LogSyslog, LogFacility and LogInfected should probably be up to the sysadmin to configure.

Then the change would be the following to clamav.spec:

[janfrode@oc1046828364 clamav]$ git diff
diff --git a/clamav.spec b/clamav.spec
index 567babb..46c6dce 100644
--- a/clamav.spec
+++ b/clamav.spec
@@ -166,7 +166,9 @@ xz -dc %{SOURCE0} | (cd .. ; tar xvvf -)
 %{__perl} -pi.orig -e '
                s|^(Example)|#$1|;
                s|^#(User) .+$|$1 clam|;
-               s|^#(ClamdSocket) .+$|$1 %{_localstatedir}/run/clamav/clamd.sock|;
+               s|#MilterSocket inet.+$|MilterSocket /var/run/clamav/clamav-milter.sock|;
+               s|#PidFile .+$|PidFile /var/run/clamav/clamav-milter.pid|;
+               s|^#(ClamdSocket) .+$|$1 unix:%{_localstatedir}/run/clamav/clamd.sock|;
        ' etc/clamav-milter.conf

which should give us the following changes:

-#MilterSocket inet:7357
+MilterSocket /var/run/clamav/clamav-milter.sock
-#PidFile /var/run/clamav-milter.pid
+PidFile /var/run/clamav/clamav-milter.pid
-#ClamdSocket /var/run/clamav/clamd.sock
+ClamdSocket unix:/var/run/clamav/clamd.sock


Agree ?

Comment 2 Milan Kerslager 2011-08-04 07:15:05 UTC
Yes. Thank you.

Comment 3 Fedora Update System 2011-08-04 08:26:16 UTC
clamav-0.97.2-5.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/clamav-0.97.2-5.el6

Comment 4 Fedora Update System 2011-08-05 08:33:32 UTC
Package clamav-0.97.2-5.el6:
* should fix your issue,
* was pushed to the Fedora EPEL 6 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=epel-testing clamav-0.97.2-5.el6'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/clamav-0.97.2-5.el6
then log in and leave karma (feedback).

Comment 5 Fedora Update System 2011-08-23 19:30:12 UTC
clamav-0.97.2-5.el6 has been pushed to the Fedora EPEL 6 stable repository.  If problems still persist, please make note of it in this bug report.