Openwebmail. 安裝 openwebmail 必要套件 yum -y install gcc perl-Text-Iconv perl-CGI perl- YAML...
-
Upload
derek-marsh -
Category
Documents
-
view
274 -
download
0
Transcript of Openwebmail. 安裝 openwebmail 必要套件 yum -y install gcc perl-Text-Iconv perl-CGI perl- YAML...
openwebmail
安裝 openwebmail 必要套件• yum -y install gcc perl-Text-Iconv perl-CGI perl-
YAML perl-CPAN perl-suidperl httpd• service httpd start• chkconfig httpd on
下載 openwebmail 所有程式 ( 主要是 .pl) tar ball
• cd /tmp; rm -rf /tmp/*• mkdir /tmp/op; cd /tmp/op• wget http://mylady.tw/public/linux/op/openwebmail-current.tar.gz• tar -xvz -f openwebmail-current.tar.gz
將 .pl 與設定檔搬到 /var/www
• mv cgi-bin/openwebmail /var/www/cgi-bin/• cp -r data/openwebmail /var/www/html• mv data /var/www• rm -rf /tmp/op
設定 .pl 的 權限為 4755
• cd /var/www/cgi-bin/openwebmail• chmod 4755 openwebmail*.pl – set uid runtime 時 , 一般 user 暫時變為 file
owner• 再將 wrapsuid.pl permission > 660– chmod 660
/var/www/cgi-bin/openwebmail/misc/tools/wrapsuid/wrapsuid.pl
原 /usr/bin/suidperl perm 為 0755, 4555
• ll /usr/bin/suidperl > 請改為 4555• chmod 4555 /usr/bin/suidperl– 還記得 set uid 嗎 ? 參考 ll /usr/bin/passwd, run
time 時變成 root
建立 openwebmail 的 log file
• touch /var/log/openwebmail.log• ll /var/log/openwebmail.log– -rw-r--r-- root root /var/log/openwebmail.log
• chown root:mail /var/log/openwebmail.log• ll /var/log/openwebmail.log– -rw-r--r-- root mail /var/log/openwebmail.log
copy redirect.html 到 /var/www/html/index.html就不用打很長的網址
• http://axp1.csie.ncu.edu.tw– http://
axp1.csie.ncu.edu.tw/cgi-bin/openwebmail/openwebmail.pl
• cp -p /var/www/html/openwebmail/redirect.html /var/www/html/index.html– (cp -p 檔案的擁有者屬性也複製過去 )
• 可以看一下 index.html 的 refresh content 就是 /cgi-bin/openwebmail/openwebmail.pl
修改 openwebmail.conf• vim /var/www/cgi-bin/openwebmail/etc/openwebmail.conf
– ow_cgidir >> cgi 檔預設目錄 , 改到 /var/www/cgi-bin/openwebmail– ow_htmldir >> html 檔預設目錄 , 改到 /var/www/data/openwebmail– default_language en >> # 改成中文版:
default_language zh_TW.Big5
複製預設認證檔到 /var/www/cgi-bin/openwebmail/etc/.
• cp /var/www/cgi-bin/openwebmail/etc/defaults/auth_unix.conf /var/www/cgi-bin/openwebmail/etc/.
• 修改認證檔 auth_unix.conf 的– passwdfile_encrypted & passwdmkdb, 其他不用改
• vim /var/www/cgi-bin/openwebmail/etc/auth_unix.conf– passwdfile_encrypted /etc/master.passwd >>>
passwdfile_encrypted /etc/shadow– passwdmkdb /usr/sbin/pwd_mkdb >>> none
copy 預設 dbm.conf 到 正確的資料夾
• cp /var/www/cgi-bin/openwebmail/etc/defaults/dbm.conf /var/www/cgi-bin/openwebmail/etc/.
• vim /var/www/cgi-bin/openwebmail/etc/dbm.conf– 三個參數值 , 請改為 :• .pag
noneno
openwebmail 初始化• cd /var/www/cgi-bin/openwebmail/– ./openwebmail-tool.pl --init
產生 openwebmail 的 Template 樣板
• perl -MCPAN -e 'install HTML::Template‘– yes
( 跑蠻久的 )
win7 開兩個 IE test
• win7 開兩個 IE– http://www.qlapita.com
aa & bb 第一次 login 的 page左 aa, 右 bb
先不用改
剛剛用 outlook 寄的 email 還在