how to upgrade clamav?

John Rudd jrudd at ucsc.edu
Fri Jul 14 02:43:51 IST 2006


On Jul 13, 2006, at 18:29, spart cus wrote:

> hi guys,
> how can i upgrade my clamav without affecting my mail server. im using 
> centos4.2 mailscanner, spamassassin and clamav. i recently found some 
> logs when i issued freshclam, saying i have to upgrade it.
>

If you're building/installing from source:

1) In a new directory, build and compile ("make" but don't "make 
install") the new clamav.  Run any tests using the copy that is built 
in this directory, so make sure it works.

2) disable your cron job for "check_mailscanner"

3) stop mailscanner WITHOUT stopping sendmail/your-mta-of-choice.  Ex: 
kill `cat /opt/mailscanner/var/*`

4) if you're using clamd, stop clamd (though, clamd is actually a bad 
idea with mailscanner, better to use the perl module or clamscan)

5) install the new clamav ("make install")

6) if you're using clamd, start clamd

7) start mailscanner (again, without re-starting 
sendmail/your-mta-of-choice) Ex: just run check_mailscanner

8) re-enable the cron job for check_mailscanner


Steps 2-7 should go by in less than a minute or two, which shouldn't 
cause you too much backlog of unscanned messages.  Because you haven't 
stopped sendmail, you wont have interrupted your service.  You'll just 
have a brief backlog of unscanned messages which shouldn't take too 
long to recover from.  If you do have a high mail volume, then pick a 
relatively low-activity time for doing this (midnight?  1am?  5am?).


Actually, if you're using clamscan, you may not even have to stop 
mailscanner.  On one pass of scanning, it'll use your old clamscan 
binary, and on the next pass it'll use the new one (with you having run 
"make install" in between).  This is similar in principle to how the 
major-sophos update happens.  But, it would be safest to stop 
mailscanner right before you do the "make install".



More information about the MailScanner mailing list