服务器搭建手册之FREEBSDUNIX邮件服务器建设(十一)

六、防病毒与防垃圾邮件功能建立.

1、安装Clamav

#cd /usr/ports/security/clamav

 

# make install clean

正确选择:

要想clamav能自动的启动,要在/etc/rc.conf中加入:

clamav_clamd_enable=”YES”

clamav_freshclam_enable=”YES”

重启服务器.

2、测试杀毒

# clamscan -r -i /usr/local/www/data

———– SCAN SUMMARY ———–
Known viruses: 40460
Engine version: 0.87
Scanned directories: 63
Scanned files: 1166
Infected files: 0
Data scanned: 13.06 MB
Time: 63.233 sec (1 m 3 s)

3、升级病毒库

# freshclam

ClamAV update process started at Sun Oct 16 14:32:00 2005
main.cvd is up to date (version: 34, sigs: 39625, f-level: 5, builder: tkojm)
Downloading daily.cvd [*]
daily.cvd updated (version: 1136, sigs: 948, f-level: 6, builder: ccordes)
Database updated (40573 signatures) from database.clamav.net (IP: 140.128.9.18) Clamd successfully notified about the update.

4、安装MailScanner

# cd /usr/ports/mail/mailscanner

# make install

第一次执行安装因此需执行make initial-config以建立基本配置文件

# make initial-config

# make clean