blob: 42b397b4d91f8ecc52c15455f95bbddb48f16e73 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
Nick Hadaway
raker@gentoo.org
10/27/2003
Setting up clamav-milter on Gentoo Linux
Step 1 - Configure clamd
mv /etc/clamav.conf /etc/clamav.conf.dist
nano -w /etc/clamav.conf
# This is my /etc/clamav.conf
LogFile /tmp/clamd.log
LogFileMaxSize 16M
LogTime
LogSyslog
PidFile /var/run/clamd.pid
DataDirectory /usr/share/clamav
LocalSocket /var/run/clamd.sock
StreamSaveToDisk
MaxDirectoryRecursion 15
ScanMail
ScanArchive
ArchiveMaxFileSize 10M
ArchiveMaxRecursion 5
ArchiveMaxFiles 1000
Step 2 - Tell the init script to start clamd as well as freshclam
nano -w /etc/conf.d/clamd
START_CLAMD=yes
Step 3 - Start clamd
/etc/init.d/clamd start
Step 4 - Edit sendmail.mc
Add these lines to sendmail.mc before any any other
INPUT_MAIL_FILTER lines and before MAILER(local)
NOTE: ANY INPUT_MAIL_FILTER definitions put before these lines
will be discarded due to the use of confINPUT_MAIL_FILTERS
Make this your first mail filter. :)
INPUT_MAIL_FILTER(`clmilter',`S=local:/var/run/clmilter.sock, F=, T=S:4m;R:4m')dnl
define(`confINPUT_MAIL_FILTERS', `clmilter')dnl
Step 5 - Rebuild sendmail.cf
cd /etc/mail
m4 sendmail.mc > sendmail.cf
Step 6 - Start clamav-milter
/usr/sbin/clamav-milter -blo /var/run/clmilter.sock
Step 7 - Restart sendmail
/etc/init.d/sendmail restart
|