Openwebmail 2.40 安裝


 
Open WebMail 官方網站

 
中文安裝說明網站 (成大)
必須安裝的套件(以tar檔方式安裝為例)

 
CGI.pm-3.05.tar.gz

 
MIME-Base64-3.01.tar.gz(處理附件MIME編碼解碼)

 
Digest-1.08.tar.gz
 

 
Digest-MD5-2.33.tar.gz
 

 
libnet-1.19.tar.gz

 
Text-Iconv-1.2.tar.gz(多國的字集轉換功能)

ftp://ftp2.tnc.edu.tw/cdperl/Text/


 
libiconv-1.9.1.tar.gz (if system doesn't support iconv) (多國語言內碼轉換)

以上套件下載處:http://turtle.ee.ncku.edu.tw/openwebmail/download/packages/

ftp://ftp.tnc.edu.tw/pub/OpenWebMail/packages

   

perl-suidperl-5.8.0-88.3.i386.rpm

或由此處下載http://turtle.ee.ncku.edu.tw/openwebmail/download/redhat/rpm/packages/rh9/

openwebmail-2.40.tar.gz主程式

其他版本下載

http://turtle.ee.ncku.edu.tw/openwebmail/download/release/

 

開始安裝的套件

 
1. 安裝 CGI.pm

 

 
執行 perl -MCGI -e 'print $CGI::VERSION' 看看 CGI.pm 的版本是否大於 2.74

 

 
tar -zxvf CGI.pm-3.05.tar.gz

 

 
cd CGI.pm-3.05

 

 
perl Makefile.PL

 

 
Make

 

 
make install

 
2. 安裝 MIME-Base64(處理附件MIME編碼解碼)

 

 
tar -zxvf MIME-Base64-3.01.tar.gz

 

 
cd MIME-Base64-3.01

 

 
perl Makefile.PL

 

 
make

 

 
make install

 
3. 安裝 Digest-1.08.tar.gz

 

 
tar -zxvf Digest-1.08.tar.gz

 

 
cd Digest-1.08

 

 
perl Makefile.PL

 

 
make ; make test
 

 

 
make install

 
4. 安裝 Digest-MD5-2.33.tar.gz

 

 
tar -zxvf Digest-MD5-2.33.tar.gz

 

 
cd Digest-MD5-2.33

 

 
perl Makefile.PL

 

 
make

 

 
make install

 
5. 安裝 libnet

 

 
tar -zxvf libnet-1.19.tar.gz

 

 
cd libnet-1.19

 

 
perl Makefile.PL (ans 'no' if asked to update configuration)

 

 
make

 

 
make install

 
6. 安裝 libiconv(多國語言內碼轉換)

 

 
tar -zxvf libiconv-1.9.1.tar.gz

 

 
cd libiconv-1.9.1

 

 
./configure

 

 
make

 

 
make install

 
7. 安裝 Text-Iconv(多國的字集轉換功能)

 

 
tar -zxvf Text-Iconv-1.2.tar.gz

 

 
cd Text-Iconv-1.2

 

 
perl Makefile.PL

 

 
make

 

 
make test

 

 
make install

 
8. 安裝 perl-suidperl

 

 
rpm -ivh perl-suidperl-5.8.0-88.3.i386.rpm

 
9. 安裝 Openwebmail主程式

 

 
tar -zxvBpf openwebmail*gz

 
10. 將 openwebmail 相關程式搬到 cgi-bin 的預設路徑中

 

 
mv cgi-bin/openwebmail /var/www/cgi-bin/

 
11. 將 openwebmail 之說明文件搬到 主網頁

 

 
mv data/openwebmail /var/www/html

 
12. 移除空的data 目錄

 

 
rmdir data
修改 組態檔 openwebmail.conf (  檔案位置在 /var/www/cgi-bin/openwebmail/etc/  )
    執行vi /var/www/cgi-bin/openwebmail/etc/openwebmail.conf

紅色字為修改後內容


 

 
domainnames          auto
auth_module          auth_unix.pl
mailspooldir         /var/spool/mail
ow_cgidir            /var/www/cgi-bin/openwebmail
ow_cgiurl            /cgi-bin/openwebmail
ow_htmldir           /var/www/html/openwebmail
ow_htmlurl           /openwebmail
logfile              /var/log/openwebmail.log

enable_viruscheck    no
enable_spamcheck     no
enable_learnspam     no

< default_signature>
--
寫在這兒的文字為每一位使用者的預設簽名檔內容
< /default_signature>
修改 dbm.conf (   檔案位置在 /var/www/cgi-bin/openwebmail/etc/defaults/dbm.conf   )

 

 
cd /var/www/cgi-bin/openwebmail/etc/defaults/

cp dbm.conf /var/www/cgi-bin/openwebmail/etc/    (在/openwebmail/etc 下建一副本 )

修改副本

vi dbm.conf
紅色字為修改後內容


 

 
dmb_ext              .db
dbmopen_ext          .db
dbmopen_haslock      yes
 
修改 auth_unix.conf  (  檔案位置在 /var/www/cgi-bin/openwebmail/etc/defaults/auth_unix.conf  )
  cd /var/www/cgi-bin/openwebmail/etc/defaults/

cp auth_unix.conf /var/www/cgi-bin/openwebmail/etc/    (在/openwebmail/etc 下建一副本 )


修改副本

 vi auth_unix.conf
紅色字為修改後內容


 

 
my $unix_passwdfile_plaintext   /etc/passwd
my $unix_passwdfile_encrypted   /etc/shadow
my $unix_passwdmkdb             none
 
最後步驟,執行 /var/www/cgi-bin/openwebmail/openwebmail-tool.pl --init 進行dbm的測試及初始化產生 b2g.db, g2b.sb, lunar.db 三檔
如何使用

 

 
在網址列 輸入 http://Server IP位址/cgi-bin/openwebmail/openwebmail.pl
設一轉址網頁

新增mail.html檔案,放在/var/www/html目錄底下,內容如下:

vi mail.html


 

 
<html><head>
<meta http-equiv="Refresh" content="0;URL= http://伺服器IP/cgi-bin/openwebmail/openwebmail.pl">
</head></html>
  以後只要輸入http://網站位址/mail.html就可以連到openwebmail了

Q&A

Text-Iconv-1.2.tar.gz做make test時發生Iconv.so錯誤,安裝完後會無法編寫新信。
解決方法:

1.切換目錄

cd /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi/auto/Text/Iconv

2.在別台主機取得Iconv.so檔

ncftp -u webadmin 163.26.161.130

cd  /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi/auto/Text/Iconv

get Iconv.so