The short answer is:
You need the clamav-milter-sysvinit and clamav-scanner-sysvinit packages to be able to use the 'service' command.
The -upstart package(s) work a little differently, by using:
Code:
start clamav-milter
status clamav-milter
stop clamav-milter
I believe upstart was introduced in Fedora 9. I haven't looked at it much, since it seems to work fine.
The 'long' answer is:
I have it working, but it did take some fiddling with.
/usr/share/doc/clamav-milter-0.95.2/README.fedora tells what's needed to get it set-up. Basically, I had to edit:
In /etc/clamd.d/scan.conf:
Remove (or comment out) the 'Example' line.
Uncomment the 'LocalSocket' line like:
Code:
LocalSocket /var/run/clamd.scan/clamd.sock
I also uncommented the 'LogFile' line. I think I also had to:
Code:
touch /var/log/clamd.scan # create the log file
chgrp clamscan /var/log/clamd.scan # change the file's group
chmod g+w /var/log/clamd.scan # make it writeable by the group
In /etc/mail/clamav-milter.conf:
Remove (or comment out) the 'Example' line.
Uncomment the 'MilterSocket' line like:
Code:
MilterSocket /var/run/clamav-milter/clamav-milter.socket
Add a 'ClamdSocket' line like:
Code:
ClamdSocket unix:/var/run/clamd.scan/clamd.sock
The example 'ClamdSocket' line listed in the file is somewhat different from what's needed. It needs to match the 'LocalSocket' line in /etc/clam.d/scan.conf.
I also added a line:
So it adds 'X-Virus-Status:' and 'X-Virus-Scanned:' headers to the e-mails (so I would know it was working).
Finally, in /etc/mail/sendmail.mc:
Add a line like:
Code:
INPUT_MAIL_FILTER(`clamav', `S=local:/var/run/clamav-milter/clamav-milter.socket, F=, T=S:4m;R:4m')dnl
This needs to match the 'MilterSocket' line in /etc/mail/clamav-milter.conf.
/usr/share/doc/clamav-milter-0.95.2/README.fedora gives the details if you want to run them on different machines.
To rebuild /etc/mail/sendmail.mc:
You'll also need the sendmail-cf package, if you don't already have it.
Since I used the upstart packages, I also had to edit /etc/event.d/clamd.scan and /etc/event.d/clamav-milter (see the comments in those files) and then enter:
Code:
start clamd.scan
start clamav-milter
If you use the -sysvinit packages, you can (probably):
Code:
service clamd.scan start
service clamav-milter start
And (re)start sendmail
Code:
service sendmail start