文章類別

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

2011年1月13日 星期四

Large Mailbox threshold 40MB之Syslog警訊

發現Syslog只要信箱超過40MB都會出現警訊:

Large Mailbox threshold: 40MB (41943040 bytes)
Warning: Large mailbox: teresa.wu (1151343331)
Warning: Large mailbox: karen.wang (489717393)

GOOGLE了一下知道怎麼改這個設定:

在 [root@mail ~]# vi /usr/share/logwatch/default.conf/services/sendmail-largeboxes.conf中 <==CentOS 5.5內位置有變動

  # Mailbox size threshold

# can add units KB, MB, GB, TB

# can set to 0 to report spool files being created where they shouldn't

sendmail_largeboxes_size = 40MB

# 改為希望的大小就可以了。

2010年12月31日 星期五

Yum - Webmin

系統使用:CentOS 5

1.新增WEBMIN站台
vim /etc/yum.repos.d/webmin.repo

[Webmin]
name = Webmin Distribution Neutral
baseurl = http://download.webmin.com/download/yum
enabled = 1

2.新增WEBMIN站台GPG key

rpm --import http://www.webmin.com/jcameron-key.asc

3.YUM安裝WEBMIN

yum install webmin

4.登入WEBMIN
http://localhost:10000/

2010年11月21日 星期日

在啟動 httpd 時出現 httpd: apr_sockaddr_info_get() failed

在啟動 httpd 時出現 www.ky-zone.net* n$ ]! {# `# Y- F
Starting httpd: httpd: apr_sockaddr_info_get() failed for MYHOST
& n2 R8 f+ O( L; S/ Khttpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName.
; |; b0 R) J# Z; @* f/ owww.ky-zone.net$ h% u3 W# f4 V5 a. m4 N) q5 C. R
這個問題應該是沒有在 /etc/httpd/conf/httpd.conf 中設定 ServerName 所以它會用主機上的名稱來取代,首先會去找 /etc/hosts 中有沒有主機的定義。$ c" d3 a$ H d% e) I

4 q% L" o6 \: cKY - ZONE所以要解決這個問題可以設定 ServerName 或者在 /etc/hosts 中填入自己的主機名稱 MYHOST,像這樣:www.ky-zone.net- Z! M/ N. Z9 o8 [& X0 t* _

4 y9 S, m- }" H1 Q- p>vi /etc/hosts
n) c8 S. R; i- p) o; w, xKY - ZONE; S! X9 x5 w# ]9 c: Y8 |0 X
127.0.0.1 localhost.localdomain localhost MYHOST

Joomla

For XP env
www.appservnetwork.com

Joomla
www.joomla.org.tw

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

2010年7月30日 星期五