switching from clamavmodule -> clamd... source?

Ugo Bellavance ugob at lubik.ca
Tue Jul 10 19:21:33 IST 2007


Julian Field wrote:
>>>>>     I'd like to switch from clamavmodule to clamd.  I used to use a 
>>>>> source-install of clamav.  I've read that the easiest way to get 
>>>>> clamd running is using dag's RPM.  However, a dependency for clamd 
>>>>> is clamav and clamav-db.  How will that play with my current source 
>>>>> install of clamav?  Should I move to using exclusively rpm clamav?
>>>> <answering myself>
>>>>
>>>> It looks like the source install is overwritten by the RPM.  This 
>>>> answers my question...
>>> The source install by default goes in /usr/local, while the RPMs most 
>>> often go into /usr/bin, /etc and so on.
>> You're right.  And if we remove /usr/local/freshclam, MailScanner 
>> can't update clamav.
> Make sure that /etc/MailScanner/virus.scanners.conf points to the right 
> installation (i.e. /usr or /usr/local). Then it will call 
> /usr/bin/freshclam for you.

Ok.

>> Anyone really documented all the process of switching from clamav or 
>> clamavmodule to clamd?  I could do it, if I can gather all the 
>> information.
> I would proceed like this:
> 
> 1. Make sure you have a sufficiently recent MailScanner installed so 
> that you have direct support of clamd. Version 4.61.7-2 at least. I 
> don't believe in running betas once there is a stable release of the 
> same version.

Ok

> 2. Install ClamAV from the RPMs at dag.wieers.com. You need the correct 
> builds of clamav, clamav-db and clamd. This way you get the init.d 
> script for free.

Ok

> 3. Install my ClamAV+SpamAssassin package, telling it not to install 
> ClamAV. Tell it you ClamAV installation lives at /usr/bin (or /usr, or 
> /usr/bin/clamscan, it will work out what you meant).

Why is that necessary if SA 3.2.1 is already installed on the system?

> 4. Check your clam* entries in /etc/MailScanner/virus.scanners.conf all 
> point to /usr.

Ok.  I guess this means that MailScanner assumes a source install by 
default.  This probably means that any user that wants to switch from 
source to dag's rpm would have to do this right?

> 5. Set your "Virus Scanners =" entry in 
> /etc/MailScanner/MailScanner.conf to include "clamd".

Ok

5.5. Set the Incoming Work Group and Incoming Work Permission settings 
accordingly:

        Incoming Work Group = clamav
        Incoming Work Permissions = 0640

> 6. Set up the Clamd-specific entries in 
> /etc/MailScanner/MailScanner.conf to the same values as you use in 
> /etc/clamd.conf. By default I *think* you can just leave them alone. But 
> if you are running a system with more than 1 CPU (or more than 1 CPU 
> core), then switch on "Clamd Use Threads = yes" in MailScanner.conf.

Ok

> 7. chkconfig clamd on

I think the RPM does it by default.

> 8. service clamd start
> 9. service MailScanner restart
> 
> I'm sure others will correct any mistakes in the above guide.
> 
> I have just updated my ClamAV+SA package so that it prints more 
> instructions to inform your choice of whether you want it to install 
> ClamAV or not, and tells you where to get the RPMs if you decide to take 
> that route.
> 
> Please can someone add this, and my previous recent HOWTO, to the Wiki 
> for me?

Will do as soon as I have all the info.

Ugo



More information about the MailScanner mailing list