| How to update clamav via Source |
|
|
|
| Written by Administrator |
| Monday, 06 April 2009 22:22 |
|
Download the latest sorces from here:
#LogFile - multilog will handle logging #LogSysLog no - see LogFile PidFile /var/run/clamav/clamd.pid DatabaseDirectory /var/db/clamav FixStaleSocket yes - optional User - should be uncommented and set to qscand Foreground yes - required to run clamav via daemontools Now we need to edit the freshclam.conf: # vi /usr/local/etc/freshclam.conf (for FreeBSD) DatabaseDirectory /var/db/clamav # UpdateLogFile - multilog will handle logging # LogSyslog no - see UpdateLogFile PidFile /var/run/clamav/freshclam.pid DatabaseOwner - change from clamav to qscand Foreground yes - required to run freshclam via daemontools Now to set some file permissions before we restart clamav (This may vary from system to system): # chown -R qscand:qscand /var/log/clamav
# /usr/local/etc/rc.d/clamav-clamd.sh restart (For FreeBSD) # setuidgid qscand /var/qmail/bin/qmail-scanner-queue.pl -g update the header information you see when you look for the version numbers and such. # setuidgid qscand /var/qmail/bin/qmail-scanner-queue.pl -z The "-z" option causes qmail-scanner-queue.pl to rebuild a file called "qmail-scanner-queue-version.txt", which contains the version numbers of the various virus scanners in use. this text file is read and the contents used to build the header which qmail-scanner adds to each message. it also does a clean-up of any old temporary files which may be laying around in the qmail-scanner directory. The qmail-scanner author recommends that you run this on a daily basis, although it doesn't hurt anything to run it more often. a busy ISP mail server, for example, may choose to run this on an hourly basis. It's not a bad idea to have this file be rebuilt whenever freshclam downloads new virus definitions. i'm doing it on my server using the "OnUpdateExecute" option inside of /etc/freshclam.conf... i've got a shell script which calls "qmail-scanner-queue.pl -z" and then runs clamscan on /home, /root, /www (the root beneath all of my web sites), and /vpop (which on my server is the vpopmail user's home directory.) this way if a new virus comes out and manages to get through clamav with an old set of definitions, as long as the user hasn't retrieved the message from the server it will be removed from their mailbox automatically. Special thanks to John Simpson |
| Last Updated on Saturday, 30 May 2009 15:54 |