文章類別

Hard Ware (3) iSCSI (2) Joomla (1) Linux (9) MySQL (3) NAS (2) Postfix (3) SAN (2) VMWare (1)

2010年9月9日 星期四

F-prot 6 + MailScanner

clamav是個不錯的free防毒軟體
不過在最近的版本更新後掃描變得非常緩慢
連cpu loading都衝好高
所以這邊我改用了另一套也不錯的防毒軟體 f-prot
一、安裝方法:
1.先到官方網站下載 RPM or source code
http://www.f-prot.com/
這裡要下載正確,一邊是一般end-user使用是free的
另一邊是企業使用這是要收費的
我們要下載的是: F-PROT Antivirus for Linux
download center 選擇
F-PROT Antivirus for Linux Workstations GZIP-ed TAR file 6.0.2
這是最新的6.0版
2.下載完把檔案放到預設目錄 /opt 下面解壓縮後進入該目錄
3.執行安裝 ./install-f-prot.pl
安裝過程會問你一下預設目錄的問題
基本上建議都用預設比較好
因為在後面 MailScanner 會使用內定的預設目錄呼叫 F-prot ,
不去更改他比較好
4.手動更新一下, 執行 fpupdate
5.安裝完後會自動加入排程 /etc/crontab
27 * * * * root /opt/f-prot/fpupdate > /dev/null
建議這邊改一下 ,也不太需要每隔半小時就更新... 1 天一次差不多
27 2 * * * root /opt/f-prot/fpupdate > /dev/null (每天深夜2點27分更新)
6.試跑一次 command 掃毒
語法: fpscan 參數 目錄
例如: fpscan /home
基本常用語法:
fpscan -a 掃全部檔案,包含啟動磁區boot sectors
fpscan -l 掃本地的local disks/partitions
fpscan --version 看版本
fpscan -h 看help檔
要注意有些參數是windows版專用,先用 fpscan -h 看看
7. 與MailScanner 連結
先去看一下MailScanner目錄裡
virus.scanners.conf 裡面的設定
f-prot-6 的預設目錄為 /opt/f-prot ,
如果當初在安裝f-prot時沒更改,這裡也不用改了
再來修改 MailScanner 的參數:
vi /etc/MailScanner/MailScanner.conf
Virus Scanning = yes
Virus Scanners = f-prot-6 (這邊要小心,6.0版要用 f-prot-6)
重跑MailScanner
/etc/rc.d/init.d/MailScanner restart
8. 到這個網站下載病毒:
http://www.eicar.org/anti_virus_test_file.htm
把病毒寄給自己,看看MailScanner 和 f-prot 有沒有聯手把病毒檔下
後記:
f-prot 掃描真的是超快
比起clamav實在是天差地別
用TOP看 f-prot 只會出現一下子馬上就ok了

2010年9月5日 星期日

Sendmail 轉換成 Postfix

Sendmail 轉換成 Postfix
平台 RHEL / CentOS / Redhat / Fedora

1. 安裝 postfix 及 system-switch-mail
yum install postfix system-switch-mail

2. 設定 postfix
先設定好以免手忙腳亂

3. 開始轉換
方法有兩種 a. 使用 system-switch-mail 切換 b. 手動
不管如何, system-switch-mail 與手動所做的動作是一樣的

a. 執行 system-switch-mail 轉換 MTA 為 postfix
system-switch-mail-nox
or system-switch-mail-nox
執行後,自動將 sendmail 切換 postfix ,自動會停止 sendmail 啟動 postfix。但還是請 check process 以防萬一。

b. 手動 alternatives --config mta 選 postfix
alternatives --set mta /usr/sbin/sendmail.postfix
(or alternatives --config mta 選 postfix)
chkconfig sendmail off (檢查一下是否關閉)
chkconfig --list sendmail
service sendmail stop

chkconfig postfix on
chkconfig --list postfix (檢查一下是否開啟)
service postfix start