月份彙整: 2008 年 1 月

MailScanner+spamassassin+clamav 小抄

由 http://www.mailscanner.info/downloads.html 下載 mailscanner

yum install -y clamav clamav-update perl-Parse-RecDescent perl-Inline

tar zxvf MailScanner-4.66.5-2.rpm.tar.g  

 cd MailScanner-4.66.5-2
 ./install.sh

vi /etc/MailScanner/MailScanner.conf

%org-name% = 輸入你喜歡的名稱但不能有任何空白
File Command = /usr/bin/file
Virus Scanners = clamavmodule #可以先用clamav試試。
Monitors for ClamAV Updates = /usr/local/share/clamav/*.cvd
Detailed Spam Report = yes
Include Scores In SpamAssassin Report = yes
Always Include SpamAssassin Report = yes
Notify Senders = no
Notify Senders Of Viruses = no
Notify Senders Of Blocked Filenames Or Filetypes = no
Notify Senders Of Other Blocked Content = no
Scanned Modify Subject = end #每一封被掃描過的信,主旨都會加一段{Scanned}
Scanned Subject Text = {Scanned} #可以是中文
Spam Subject Text = {Spam?}#可以是中文
High Scoring Spam Subject Text = {Garbage?}#可以是中文
Spam Checks = yes
Use SpamAssassin = yes

Required SpamAssassin Score = 6
High SpamAssassin Score = 10
Spam Actions = deliver
High Scoring Spam Actions = store
SpamAssassin Site Rules Dir = /etc/mail/spamassassin
SpamAssassin Default Rules Dir = /usr/share/spamassassin
Debug SpamAssassin = no

#注意 Debug SpamAssassin 設定成 yes 時,會造成系統負荷大增,除非要debug 不要設定為 yes


/etc/init.d/sendmail stop
 /sbin/chkconfig –level 3 MailScanner on
/sbin/chkconfig –level 3 sendmail off
/etc/init.d/MailScanner start

vi /etc/sysconfig/freshclam
#FRESHCLAM_DELAY=disabled-warn  # REMOVE ME 閱讀全文 MailScanner+spamassassin+clamav 小抄