教学之友,学习之友。

站长教学网

如何在Debian5.0下源代码安装openwebmail(2)

时间:2012-03-26 00:00来源:未知 作者:ken 点击:

二,下载OpenWebmail并安装配置。
下载当前稳定版:
#cd /usr/local/src/openwebmail
#wget http://www.openwebmail.org/openwebmail/download/release/openwebmail-2.53.tar.gz
#tar -zxvf openwebmail-2.53.tar.gz
有两个目录data和cgi-bin:
drwxr-xr-x 3 root staff     4096 2008-01-24 02:59 cgi-bin
drwxr-xr-x 3 root staff     4096 2008-01-24 02:59 data

这里我要先说明一下:
我的html文件是存放在:/home/www/html下
cgi程序存放在:/home/www/cgi-bin下
详见我的apache配置[你如果位置跟我不一样,请做要应的变动,否则在后面的运行过程中会出现没有权限访问的提示。]:
DocumentRoot "/home/www/html"

ScriptAlias /cgi-bin/ "/home/www/cgi-bin/"
# "/usr/local/apache2/cgi-bin" should be changed to whatever your ScriptAliased
# CGI directory exists, if you have that configured.
#
#<Directory "/usr/local/apache2/cgi-bin">
<Directory "/home/www/cgi-bin/">

因此:
#cd /usr/local/src/openwebmail
#mv date/openwebmail /home/www/html/.
#mv cgi-bin /home/www/.

以下就可以开始更改相关配置:
1,修改openwebmail相关文件的位置,依你个人的设定而变化:
# vi /home/www/cgi-bin/openwebmail/etc/openwebmail.conf
更改成以下内容:
domainnames     auto
auth_module     auth_unix.pl
#mailspooldir       /var/mail
mailspooldir        /var/spool/mail                                     #用户邮件存放的地方
#ow_cgidir      /usr/local/www/cgi-bin/openwebmail
ow_cgidir       /home/www/cgi-bin/openwebmail             #cgi-bin文件夹的位置
ow_cgiurl       /cgi-bin/openwebmail
#ow_htmldir     /usr/local/www/data/openwebmail
ow_htmldir      /home/www/html/openwebmail               #html即openwebmail帮助网页存放的位置
ow_htmlurl      /openwebmail
logfile         /var/log/openwebmail.log

2,修改用户认证配置:
# vi /home/www/cgi-bin/openwebmail/etc/defaults/auth_unix.conf              #旧版的openwebmail是存放在etc目录下,没有defaults这个子目录。
更改成以下内容:
passwdfile_plaintext    /etc/passwd
#passwdfile_encrypted   /etc/master.passwd
passwdfile_encrypted    /etc/shadow
#passwdmkdb     /usr/sbin/pwd_mkdb
passwdmkdb      none
check_expire        no
check_nologin       no
check_shell     no
check_cobaltuser    no
change_smbpasswd    no

3,修改dbm.conf文件,否则在下面的初始化时会出错,并提示你修改:
# vi /home/www/cgi-bin/openwebmail/etc/defaults/dbm.conf
修改后的内容如下:
#dbm_ext            .db
dbm_ext         .pag
dbmopen_ext     none
dbmopen_haslock     no


4,初始化openwebmail:

# /home/www/cgi-bin/openwebmail/openwebmail-tool.pl --init

creating db /home/www/cgi-bin/openwebmail/etc/maps/b2g ...done.
creating db /home/www/cgi-bin/openwebmail/etc/maps/g2b ...done.
creating db /home/www/cgi-bin/openwebmail/etc/maps/lunar ...done.

Creating UTF-8 locales...
langconv ar_AE.CP1256 -> ar_AE.UTF-8
langconv ar_AE.ISO8859-6 -> ar_AE.UTF-8
langconv bg_BG.CP1251 -> bg_BG.UTF-8
langconv ca_ES.ISO8859-1 -> ca_ES.UTF-8
langconv cs_CZ.ISO8859-2 -> cs_CZ.UTF-8
langconv da_DK.ISO8859-1 -> da_DK.UTF-8
langconv de_DE.ISO8859-1 -> de_DE.UTF-8
langconv el_GR.ISO8859-7 -> el_GR.UTF-8
langconv en_US.ISO8859-1 -> en_US.UTF-8
langconv es_AR.ISO8859-1 -> es_AR.UTF-8
langconv fi_FI.ISO8859-1 -> fi_FI.UTF-8
langconv fr_FR.ISO8859-1 -> fr_FR.UTF-8
langconv he_IL.CP1255 -> he_IL.UTF-8
langconv hr_HR.ISO8859-2 -> hr_HR.UTF-8
langconv hu_HU.ISO8859-2 -> hu_HU.UTF-8
langconv id_ID.ISO8859-1 -> id_ID.UTF-8
langconv it_IT.ISO8859-1 -> it_IT.UTF-8
langconv ko_KR.eucKR -> ko_KR.UTF-8
langconv lt_LT.CP1257 -> lt_LT.UTF-8
langconv nl_NL.ISO8859-1 -> nl_NL.UTF-8
langconv no_NO.ISO8859-1 -> no_NO.UTF-8
langconv pl_PL.ISO8859-2 -> pl_PL.UTF-8
langconv pt_BR.ISO8859-1 -> pt_BR.UTF-8
langconv pt_PT.ISO8859-1 -> pt_PT.UTF-8
langconv ro_RO.ISO8859-2 -> ro_RO.UTF-8
langconv ru_RU.KOI8-R -> ru_RU.UTF-8
langconv sk_SK.ISO8859-2 -> sk_SK.UTF-8
langconv sl_SI.CP1250 -> sl_SI.UTF-8
langconv sr_CS.ISO8859-2 -> sr_CS.UTF-8
langconv sv_SE.ISO8859-1 -> sv_SE.UTF-8
langconv th_TH.TIS-620 -> th_TH.UTF-8
langconv tr_TR.ISO8859-9 -> tr_TR.UTF-8
langconv uk_UA.KOI8-U -> uk_UA.UTF-8
...done.

Welcome to the OpenWebMail!

This program is going to send a short message back to the developer,
to give us statistics for future developments. The content to be sent is:

OS: Linux 2.6.24-686 i686
Perl: 5.008008
WebMail: OpenWebMail 2.53 20090205 revision 335

Send the site report?(Y/n) y
sending report...

Thank you.

三,调试系统及注意事项。
用IE或FireFox等浏览器访问:http://yourserver/cgi-bin/openwebmail/openwebmail.pl

如果你懒一些,或者说让用户更方便一些,可以这样做:
编写openwebmail的index.html文件:

vi /home/www/html/index.html
内容如下:
<html>
<head>
    <meta http-equiv="Refresh" content="0;URL=http://yourserver/cgi-bin/openwebmail/openwebmail.pl">
</head>
</html>

这样,只要访问: http://yourserver/就可以访问openwebmail了。


注意:在更改apache的配置文件时要记的重启apache。

 
(责任编辑:ken)
TAG标签: linux Debian mail 邮件 openwebmail
顶一下
(0)
0%
踩一下
(0)
0%
------分隔线----------------------------
发表评论
请自觉遵守互联网相关的政策法规,严禁发布色情、暴力、反动的言论。
评价:
表情:
注册登录:不允许匿名留言,登录后留言无需输入验证码。
最新评论 进入详细评论页>>
栏目列表
最新内容
热点内容