[Mimedefang] HOW TO install clamd on Fedora 11 for use by mimedefang

Cliff Hayes chayes at afo.net
Fri Jan 22 15:14:19 EST 2010


HOW TO install clamd on Fedora 11 for use by mimedefang.

This is for the archive for when someone wants to install clamd on a Fedora
11 box and have it work with mimedefang.
I could not find instructions anywhere so maybe I'm the only person in the
world that wanted to do this particular thing.
Thanks to everyone who provided input.  I used your inputs, plus a bunch of
research, plus a bunch of trial and error.
Please feel free to reply with corrections.
One thing I would like to add to this list is a way to verify clamd is still
checking emails.  Once I turn off LogClean (I have to or the logs will
explode), everything goes silent.  clamdtop is useless for this purpose, and
so is the clamd STATS command.  I sure wish I could access stats like
sendmail mailstats whereby it shows x number of files have been checked.
I'd appreciate any input on this :)

1) Don't try yum.  This is the first time the yum system has let me down.
There are 18 different clam related packages.  I dove into this and couldn't
get it to work.
2) Go to http://www.clamav.net/download/sources and scroll down to the
latest stable relaese.  It was 0.95.3 for me.  Download it.
3) tar -zxvf clamav-0.95.3.tar.gz
4) useradd clamav
5) cd clamav-0.95.3
6) ./configure
7) make
8) make check (optional)
9) make install
10) cd /usr/local/etc/
11) vi freshclam.conf
12) comment out the Example line
13) set DatabaseMirror db.us.clamav.net (or whatever your country)
14) run freshclam to update
15) yum install socat
16) put this in a daily script to update:
/usr/local/bin/freshclam
echo RELOAD | socat - /tmp/clamd.socket
17) cd /usr/local/etc
18) vi clamd.conf
I made the following changes:
#Example
LogFile /var/log/clamd.log
LogTime yes
LogClean yes
LogVerbose yes
Note:  with LogClean set to yes, you will be able to see if clamd is doing
anything.  Don't leave it like that or the log will get too big.
19) Run clamd.  This will start the daemon.  pgrep clamd to verify.
Now you can cd to any directory and run clamdscan and it will scan the
directory and put results in the log.  Or, you can run clamscan to get all
the results at the console.  clamscan does the same thing as clamd only it's
not a daemon so it loads all the signatures every time you run it so it's
slower.  mimedefang doesn't use it but it comes with the package.
20) use clamdtop to get a nifty status window.
21) configure clamd to start on boot by editing /etc/rc.d/rc.local and
adding: /usr/local/sbin/clamd
22) configure mimedefang to use clamd by editing /usr/bin/mimedefang.pl
old:
$Features{'Virus:CLAMD'}    = ('/bin/false' ne '/bin/false' ? '/bin/false' :
0);
new:
$Features{'Virus:CLAMD'}    = ('/usr/local/sbin/clamd' ne '/bin/false' ?
'/usr/local/sbin/clamd' : 1);
old:
#$ClamdSock  = "/var/spool/MIMEDefang/clamd.sock";
new:
$ClamdSock  = "/tmp/clamd.socket";
23) restart mimedefang (I use service mimedefang reread)
You should see clamd.log start to scroll as it checks emails.






More information about the MIMEDefang mailing list