10分钟搭建自己的企业邮局!!!!RH9+openwebmail+sendmail+ipop3/imap+apache  BY神仙
提示!我的sendmail服务器和pop3服务器和apache服务器在同一台机子上!ip是10.0.0.11,主机名是mail.6xuan.com

准备工作

我这些安装的都是rpm安装的!tar包安装的一样唯一就是配置目录不一样!本次试验仅仅是简单的邮件收发!如果想支持其他模块,例如用户认证,邮件过滤,虚拟主机和帐号别名,拼写检查支持请阅读readme文档!转贴请注明出处http://www.6xuan.com/(神仙)

首先看看我们需要的软件
http://openwebmail.org/openwebmail/download/redhat/rpm/
下载openwebmail的相应组件,请注意自己下载的版本!否则的话在安装的时候perl-suidperl会出错!

perl-CGI-2.81-88.i386.rpm
perl-Compress-Zlib-1.21-RH9.i386.rpm
perl-suidperl-5.8.0-88.i386.rpm
perl-Text-Iconv-1.2-RH80.i386.rpm'p \!K ? IP8w/Y _ V
MIME-Base64-3.01.tar.gz  (这个tar包一定要安装的!否则后面初始化openwebmail回提示版本太旧而出错,所以我们提前装好)openwebmail-2.52-1.i386.rpm(这个就是主程序)

接下来我们开始配置!

由于安装rh的时候系统自带的sendmail和httpd,所以我这里就不安装!要是你没有的话自己安装!



第一步

我们先来配置httpd

修改/etc/httpd/conf/httpd.conf

只要修改servername 10.0.0.11:80或者mail.6xuan.com:80

启动httpd !
service httpd start
从客户机访问mail.6xuan.com出现apache的界面则这一部安装成功!

第二步
开始配置sendmail

vi /etc/mail/sendmail.cf
将Addr=127.0.0.1修改为10.0.0.11(修改成你自己的服务器ip)

vi /etc/mail/local-host-names
添加
6xuan.com
  mail.6xuan.com

vi /etc/mail/access
添加10.0.0    RELAY

makemap hash /etc/mail/access.db < /etc/mail/access

service sendmail start

从客户机登陆10.0.0.11 25  成功!

第三步
配置pop3协议!
vi /etc/xined.d/ipop3
修改将disable后面的参数改为no

vi /etc/xined.d/imaps
修改将disable后面的参数改为no

vi /etc/xined.d/imap
修改将disable后面的参数改为no

service xinetd reload

客户机访问10.0.0.11 110  成功
10.0.0.11 143   成功

第四步
我们开始配置主要的openwebmail

分别安装那些组件!这一部我就不再废话了!

perl-CGI-2.81-88.i386.rpm
perl-Compress-Zlib-1.21-RH9.i386.rpm
perl-suidperl-5.8.0-88.i386.rpm
perl-Text-Iconv-1.2-RH80.i386.rpm
MIME-Base64-3.01.tar.gz(这一个安装的时候首先解压缩,然后登陆MIME-Base64-3.01,运行perl                         Makefile.pl然后make && make install) 在安装
openwebmail-2.52-1.i386.rpm



一切都安装好了后!我们开始配置!
openwebmail安装好了后,会自动在/var/www生成cgi-bin和data这两个目录!
注意apache的rpm安装的主目录在/var/www/html.....

1。我们将/var/www/cgi-bin/openwebmail/etc/defaults/auth_unix.conf拷贝到/var/www/cgi-bin/openwebmail/etc目录下!
并且修改auth_unix.conf
我们将      passwdfile_encrypted  后面改为  /etc/shadow
           passwdmkdb  后面改为     none


2。修改/var/www/cgi-bin/openwebmail/etc/defaults/dbm.conf
dbm_ext              .db
dbmopen_ext           .db
dbmopen_haslock        yes

3。修改/var/www/cgi-bin/openwebmail/etc/openwebmail.conf修改下面参数
    mailspooldir  /var/spool/mail
    ow_cgidir   /var/www/cgi-bin/openwebmail
    ow_cgiurl   /cgi-bin/openwebmail
    ow_htmldir  /var/www/data/openwebmail
    ow_htmlurl  /data/openwebmail
    default_language  zh_CN.GB2312
    default_iconset         Cool3D.Chinese.Simplified
4。修改/var/www/cgi-bin/openwebmail/etc/default/openwebmail.conf

修改domainnames  6xuan.com
smtpserver 10.0.0.11
authpop3_server  10.0.0.11

好了!基本修改完成了!

5。现在初始化openwebmail
/var/www/cgi-bin/openwebmail/openwebmail-tool.pl --init

出现
Welcome to the Open WebMail!

This program is going to send a short message back to the developer, w1G5o a ~ P e ] p
so we could have the idea that who is installing and how many sites are7u%Q.R7r        ` r
using this software, the content to be sent is:

OS: Linux 2.4.20-8smp i686
Perl: 5.008 m"
WebMail: Open WebMail 2.51 2005022
Send the site report?(Y/n) y
sending report... R H

Thank you


你就成功了!下面通过web访问
http://mail.6xuan.com/cgi-bin/openwebmail/openwebmail.pl就好了!



技术资料 » linux相关 | 评论(0) | 引用(0) | 阅读(1934)
 
发表评论
   
表情
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
emotemotemotemotemot
打开HTML
打开UBB
打开表情
隐藏
昵称   密码   游客无需密码
网址   电邮   [注册]
               

验证码 不区分大小写