Sendmail+Mailscanner+ClamAV | Until The Twelve of Never

E-mail is a kind of ways to exchange messages that many people use now . But it s an undisputable fact that e-mail become the shortcut of the virus dissemination , and advertise letter is also a severe problem with the most internet users currently.

The MailScanner is a free and well-known mail anti-virus software and is also the tool that defends the advertisement letter mail.It supports various anti-virus softwares, including ClamAV etc..
The ClamAV is also a free E-mail anti-virus software, and then provides an on-line immediately real time service. It can detect more than 40,000 kinds of viruses, worms, the Trojan programs. ClamAV has a set of anti-virus experts who distribute in the world everywhere currently and renew for 24 hours and safeguard the virus database. If anyone finds the suspicious virus can also make contact with them at any time and them renew the virus yard immediately to be the latest protection action in cutty time.

Install(Suppose you have already installed sendmail.)

Step 1

Install MailScanner

Download from offical websitehttp://www.mailscanner.info/

Download Stable versionVersion 4.54.6-1 for RedHat, Fedora and Mandrake Linux (and other RPM-based Linux distributions)

this version for Fedora Core.

And command

#tar zxvf MailScanner-4.56.8-1.rpm.tar.gz
#cd MailScanner-4.56.8-1

#./install.sh

Installing............(Come some coffee ^.^)

When process be down. Then check the content in this file

/etc/MailScanner/MailScanner.conf

Max Children = 5

//How many MailScanner processes do you want to run at a time?

Virus Scanning = yes

//Open the anti-virus function.

Virus Scanners = clamav

//Which Virus Scanning package to use.
  Use SpamAssassin = yes

//Do you want to find spam using the "SpamAssassin" package?

//You must install spamassassin before.

Save it.

Step 2

Install ClamAV

You must add account for clamav before install clamav.

#groupadd clamav

#useradd -g clamav -s /bin/false -c "Clam AntiVirus" clamav

#cd /usr/local/src

Download ClamAV tarball package from http://www.clamav.net/stable.php

#wget http://nchc.dl.sourceforge.net/sourceforge/clamav/clamav-0.88.6.tar.gz

#tar zxvf clamav-0.88.6.tar.gz

#cd clamav-0.88.6

#./configure --sysconfdir=/etc

#make

#su -c "make install"

..........wait line......... ....

#vim /etc/clamd.conf

1.Add a # front the word "Example" (disable Example)

2.Alter "User clamav" to be "User root" and enable.(Remove #)

#vim /etc/freshclam.conf

1.Disable the "Example".

2.Enable the "Check=24".

Step 3

Restart MailScanner

#service MailScanner stop

#chkconfig sendmail off

(Hereafter will be started sendmail by MailScanner. We must prohibit sendmail to run

at a time)
#killall sendmail

(Kill all sendmail process in the memory.)
#service MailScanner start

Installing is well done. ^^

The reference website

http://cha.homeip.net/blog/archives/2005/01/sendmail_mailsc.html

http://www.neo.com.tw/archives/000323.html


E-mail是現在許多人使用的一種傳遞訊息的方式,但是變成病毒散播的捷徑卻是不爭的事實,而且廣告信也是也是目前許多網際網路使用者最頭痛的問題。

MailScanner是一個免費且著名的郵件掃毒軟體,也是防廣告信郵件的工具。它支援多種防毒軟體,包含ClamAV等。

ClamAV也是免費的電子郵件防毒軟體,又提供線上即時更新的服務。目前可以偵測超過40,000 種病毒、蠕蟲、木馬程式,並且有一組分佈在世界各地的病毒專家,24小時更新及維護病毒資料庫,任何人發現可疑病毒也可以隨時跟他們取得聯繫,立刻更新病毒碼,在極短的時間內完成最新的防護動作。

步驟1(假設Sendmail已安裝完成)

安裝MailScanner

從官方網站下載Stable的版本

Version 4.54.6-1 for RedHat, Fedora and Mandrake Linux (and other RPM-based Linux distributions)

然後

#tar zxvf MailScanner-4.56.8-1.rpm.tar.gz

#cd MailScanner-4.56.8-1

#./install.sh

等待......

接著修改/etc/MailScanner/MailScanner.conf裡的幾個設定

Max Children = 5

//這表示你開機時要執行多少個MAilScanner子程序,主記憶體在64MB以下建議設為1

Virus Scanning = yes

//開啟防毒功能

Virus Scanners = clamav

//您要使用的防毒軟體為何,這裡設為ClamAV
  Use SpamAssassin = yes

# 如果你要使用SpamAssassin才開啟,但是你之前必須先安裝。

儲存

步驟 2

安裝ClamAV

安裝之前先建立clamav帳號

#groupadd clamav

#useradd -g clamav -s /bin/false -c "Clam AntiVirus" clamav

#cd /usr/local/src

下載ClamAV 穩定版本 http://www.clamav.net/stable.php

或直接下載下面的連結的版本

#wget http://nchc.dl.sourceforge.net/sourceforge/clamav/clamav-0.88.6.tar.gz

#tar zxvf clamav-0.88.6.tar.gz

#cd clamav-0.88.6

#./configure --sysconfdir=/etc

#make

等待.......

#su -c "make install"

等待....

編輯Clamav的設定檔

#vim /etc/clamd.conf

1. Example 之前加個# (disable Example)

2.修改 "User clamav" to "User root" 然後 enable.(Remove #)

再編輯freshclam設定檔

#vim /etc/freshclam.conf

1.一樣在 Example 前加上#.

2.拿掉 Check=24 前的#。可以修改數字,此為24小時更新一次。

步驟 3

重起MailScanner

#service MailScanner stop

#chkconfig sendmail off

(停止sendmail在開機時自動執行的設定)
#killall sendmail

(刪除所有sendmail可能存在記憶體的process)
#service MailScanner start

安裝完成 ^^

參考網站:

http://cha.homeip.net/blog/archives/2005/01/sendmail_mailsc.html

http://www.neo.com.tw/archives/000323.html

0 Responses