歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux綜合 >> Linux資訊 >> Linux業界 >> 用openwebmail架設webmail系統.

用openwebmail架設webmail系統.

日期:2017/2/27 11:13:10   编辑:Linux業界

日前看了"利用twig架設WebMail系統",是用php實現的,不過有網友有說國人開發的openwebmail更強大,沒有語言障礙,於是決定裝openwebmail.根據那位網友hleil([email protected])所說的地址找到了openwebmail的站點.不過還是英文的.所有的文檔也是英文的.一番努力之後,比較順利的裝好了.為方便其它有興趣的網友,在此把安裝的過程與大家一起共享.

簡介:
openwebmail是基於Ernie Miller 開發的Neomail 1.14來開發的.全部用perl編寫成.openwebmail的設計目標是直接在內存中處理大郵件文件目錄,同時也具備許多便於用戶平滑移殖M$-outlook的特征.

系統需求:
支持cgi(perl)的web服務器,當然linux+apache最好.
perl 5.005或更高版本

openwebmail-1.64.tgz (主程序,必需)
CGI.pm-2.74.tar.gz (必需)
MIME-Base64-2.12.tar.gz (必需)
libnet-1.0901.tar.gz (必需)
Authen-PAM-0.12.tar.gz (可選)
ispell-3.1.20.tar.gz (可選)
hc-30.tar.gz (可選)

下載地址:http://turtle.ee.ncku.edu.tw/openwebmail/download/

安裝步驟:

先裝除主程序外的所有必需的程序:

1.下載所有必需的程序到/tmp下.
2.安裝CGI.pm :

cd /tmp
tar -zxvf CGI.pm-2.74.tar.gz
cd CGI.pm-2.74
perl Makefile.PL
make
make install

ps: 安裝這個程序是為了能使用上些比較老的cgi模塊前,裝入它以便順利執行openwebmail.
我們到少要用2.74 或更高版本.查看自己用的cgi模塊版本用如下命令:

perldoc -m CGI.pm | grep CGI::VERSION


3.安裝MIME-Base64 :

cd /tmp
tar -zxvf MIME-Base64-2.12.tar.gz
cd MIME-Base64-2.12
perl Makefile.PL
make
make install

ps: 也許你已經安裝了MIME-Base64的perl模塊,但以源碼方式安裝MIME-Base64可以讓你的系統更好的支持XS,以便以改善MIME附件的編碼解碼速度.


4.安裝libnet:

cd /tmp
tar -zxvf libnet-1.0901.tar.gz
cd libnet-1.0901
perl Makefile.PL (ans 'no' if asked to update configuration)
make
make install


5.安裝OPENWEBMAIL
-------------------

最新版本在此下載:
http://turtle.ee.ncku.edu.tw/openwebmail/

此處的操作在rh7.2+apache1.3.20操作.Apache中DocumentRoot "/home/ntjx"

cd /tmp
tar -zxvf openwebmail.x-xx.tgz
mv openwebmail /home/ntjx/cgi-bin/
mv data/openwebmail /home/ntjx/

文件安裝完畢.

6.配置apache 及 openwebmail

1):配置cgi-bin
vi /etc/httpd/conf/httpd.conf

按如下修改:

<Directory /home/ntjx/cgi-bin>
AllowOverride All
Options ExecCGI
Order allow,deny
Allow from all
</Directory>

請注意 "Order allow,deny" 和 "Allow from all" 缺省沒有時,必需加上.

/etc/init.d/httpd restart

2):配置openwebmail

(1):
openwebmail要正常運行,必需把openwebmail下的所有.pl文件屬性改成:
openwebmail.pl - owner=root, group=mail, mode=4755
openwebmail-main.pl - owner=root, group=mail, mode=4755
.......

命令:
cd /home/ntjx/cgi-bin/openwebmail
chown root:mail openwebmail*.pl
chmod 4755 openwebmail*.pl
(2)
按下面實例修改/home/ntjx/cgi-bin/openwebmail/etc/openwebmail.conf
domainnames auto
auth_module auth_pam.pl
mailspooldir /var/mail
dbm_ext .db
timeoffset +0800
ow_cgidir /home/ntjx/cgi-bin/openwebmail
ow_htmldir /home/ntjx/openwebmail
logfile /var/log/openwebmail.log
spellcheck /usr/local/bin/ispell
default_language zh_CN.GB2312

<default_signature>
--
Open WebMail Project (http://openwebmail.org)
</default_signature>
說明:ow_cgidir是你的openwebmail所在目錄.
ow_htmldir是從data目錄中移過來的openwebmail目錄.
default_language是你的默認語言,我們的當然是中文啦.其它的請看openwebmail/etc/lang.
換其它語言時填成其中的文件名即可.
(3)
按下面實例修改/home/ntjx/cgi-bin/openwebmail/auth_unix.pl
.....
my $unix_passwdfile="/etc/shadow";
my $unix_passwdmkdb="none";
......

(4)

/var/log/openwebmail.log {
postrotate
/usr/bin/killall -HUP syslogd
endscript
}
加到 /etc/logrotate.d/syslog.來記錄openwebmail的日志.日志保存到/var/log/openwebmail.log中.

配置結束.
訪問: http://localhost/cgi-bin/openwebmail/openwebmail.pl

系統實例請訪問http://www.ntjx.org/mail/
正在開發的功能:
1.在線簽入.
2.日志分析.
3.郵件目錄.
4.支持mod_perl.
5.共享目錄.

[email protected]




Copyright © Linux教程網 All Rights Reserved