前提条件:一/#yum install perl*
二/下载perl-Text-Iconv-1.7-2.el5.i386.rpm
(http://www.openwebmail.org/openwebmail/download/redhat/rpm/packages/rhel5/perl-Text-Iconv/perl-Text- Iconv-1.7-2.el5.i386.rpm)
#rpm -ivh perl-Text-Iconv-1.7-2.el5.i386.rpm
三/关闭selinux
启动postfix + dovecot服务过程:
# service postfix start
Starting postfix: [ 确定 ]
# service dovecot start
启动 Dovecot Imap: [ 确定 ]
修改/etc/dovecot.conf文件:
#protocols = imap imap3
更改为:
protocols = imap imap3 pop3 pop3s (启动imap imap3 pop3 pop3s功能)
# service dovecot restart(重新启动dovecot服务)
停止 Dovecot Imap: [ 确定 ]
启动 Dovecot Imap: [ 确定 ]
修改/etc/postfix/main.cf文件:
#myhostname = host.domain.tld
更改为:
myhostname = mail.test.org (指定运行Postfix邮件系统的主机名称)
#mydomain = domain.tld
更改为:
mydomain = test.org (指定Postfix邮件系统使用的域名)
#myorigin = $mydomain
更改为:
myorigin = test.org (指定发件人所在的域名)
#inet_interfaces = all
更改为:
Inet_interfaces =all (指定Postfix邮件系统监视的网络接口)
#mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain, mail.$mydomain
更改为:
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain, mail.$mydomain(指定Postfix接收邮件时收件人的域名)
#mynetworks = host
更改为:
mynetworks = host (指定您所在的网络地址192.168.10.0/24)
# service postfix restart (重新启动postfix服务)
Shutting down postfix: [ 确定 ]
Starting postfix: [ 确定 ]
端口测试:
# telnet mail.test.org 25 (测试25端口)Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
220 mail.easy.com ESMTP Postfix
quit
221 Bye
Connection closed by foreign host.
# telnet mail.test.org 110 (测试110端口)Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
+OK dovecot ready.
quit
+OK Logging out
Connection closed by foreign host.
配置openwebmail:
# service httpd restart (启动httpd服务)
停止 httpd: [ 确定 ]
启动 httpd: [ 确定 ]
# cd /var/www/cgi-bin/openwebmail/
# ./openwebmail-tool.pl --init
Please change './etc/dbm.conf' from
dbm_ext .db
dbmopen_ext none
dbmopen_haslock no
to
dbm_ext .db
dbmopen_ext .db
dbmopen_haslock no
And execute './openwebmail-tool.pl --init' again!
ps: If you are running openwebmail in persistent mode,
don't forget to 'touch openwebmail*.pl', so speedycgi
will reload all scripts, modules and conf files in --init.
修改 /var/www/cgi-bin/openwebmail/etc/openwebmail.conf 文件:
domainnames auto
更改为:
domainnames test.org (更改为自己定义的域名)
default_language en
更改为:
default_language zh_CN.GB2312 (更改为简体中文版介面)
default_iconset Cool3D.Englist
更改为:
default_iconset Cool3D.Chinese.Simplified (更改为中文3D按键)
修改/var/www/cgi-bin/openwebmail/etc/defaults/openwebmail.conf文件:
smtpserver 127.0.0.1
更改为:
smtpserver 192.168.10.1 (更改smtp服务器的地址)
authpop3_server localhost
更改为:
authpop3_server 192.168.10.1 (更改pop3服务器的地址)
修改/var/www/cgi-bin/openwebmail/etc/defaults/dbm.conf文件:
dbmopen_ext none
更改为:
dbmopen_ext .db
dbmopen_haslock no
更改为:
dbmopen_haslock yes
smtpserver 192.168.10.1 (添加smtp服务器的地址)
继续运行openwebmail-tool.pl文件:
# ./openwebmail-tool.pl --init
creating db /var/www/cgi-bin/openwebmail/etc/maps/b2g ...done.
creating db /var/www/cgi-bin/openwebmail/etc/maps/g2b ...done.
creating db /var/www/cgi-bin/openwebmail/etc/maps/lunar ...done.
Welcome to the Open WebMail!
This program is going to send a short message back to the developer,
so we could have the idea that who is installing and how many sites are
using this software, the content to be sent is:
.......
Send the site report?(Y/n) y (输入y,然后按回车键)
sending report...
Thank you.
增加用户发送电子邮:
增加本地用户:
# useradd user1
# useradd user2
# useradd user3
设置本地yer用户的密码
# passwd user1
Changing password for user yer.
New UNIX password:
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
# passwd user2
Changing password for user fandy.
New UNIX password:
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
# passwd user3
Changing password for user biao.
New UNIX password:
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
测试webmail方式收发电子邮件:
在ie中输入以下地址:
http://mail.test.org/cgi-bin/openwebmail/openwebmail.pl
试验成功。
二/下载perl-Text-Iconv-1.7-2.el5.i386.rpm
(http://www.openwebmail.org/openwebmail/download/redhat/rpm/packages/rhel5/perl-Text-Iconv/perl-Text- Iconv-1.7-2.el5.i386.rpm)
#rpm -ivh perl-Text-Iconv-1.7-2.el5.i386.rpm
三/关闭selinux
启动postfix + dovecot服务过程:
# service postfix start
Starting postfix: [ 确定 ]
# service dovecot start
启动 Dovecot Imap: [ 确定 ]
修改/etc/dovecot.conf文件:
#protocols = imap imap3
更改为:
protocols = imap imap3 pop3 pop3s (启动imap imap3 pop3 pop3s功能)
# service dovecot restart(重新启动dovecot服务)
停止 Dovecot Imap: [ 确定 ]
启动 Dovecot Imap: [ 确定 ]
修改/etc/postfix/main.cf文件:
#myhostname = host.domain.tld
更改为:
myhostname = mail.test.org (指定运行Postfix邮件系统的主机名称)
#mydomain = domain.tld
更改为:
mydomain = test.org (指定Postfix邮件系统使用的域名)
#myorigin = $mydomain
更改为:
myorigin = test.org (指定发件人所在的域名)
#inet_interfaces = all
更改为:
Inet_interfaces =all (指定Postfix邮件系统监视的网络接口)
#mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain, mail.$mydomain
更改为:
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain, mail.$mydomain(指定Postfix接收邮件时收件人的域名)
#mynetworks = host
更改为:
mynetworks = host (指定您所在的网络地址192.168.10.0/24)
# service postfix restart (重新启动postfix服务)
Shutting down postfix: [ 确定 ]
Starting postfix: [ 确定 ]
端口测试:
# telnet mail.test.org 25 (测试25端口)Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
220 mail.easy.com ESMTP Postfix
quit
221 Bye
Connection closed by foreign host.
# telnet mail.test.org 110 (测试110端口)Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
+OK dovecot ready.
quit
+OK Logging out
Connection closed by foreign host.
配置openwebmail:
# service httpd restart (启动httpd服务)
停止 httpd: [ 确定 ]
启动 httpd: [ 确定 ]
# cd /var/www/cgi-bin/openwebmail/
# ./openwebmail-tool.pl --init
Please change './etc/dbm.conf' from
dbm_ext .db
dbmopen_ext none
dbmopen_haslock no
to
dbm_ext .db
dbmopen_ext .db
dbmopen_haslock no
And execute './openwebmail-tool.pl --init' again!
ps: If you are running openwebmail in persistent mode,
don't forget to 'touch openwebmail*.pl', so speedycgi
will reload all scripts, modules and conf files in --init.
修改 /var/www/cgi-bin/openwebmail/etc/openwebmail.conf 文件:
domainnames auto
更改为:
domainnames test.org (更改为自己定义的域名)
default_language en
更改为:
default_language zh_CN.GB2312 (更改为简体中文版介面)
default_iconset Cool3D.Englist
更改为:
default_iconset Cool3D.Chinese.Simplified (更改为中文3D按键)
修改/var/www/cgi-bin/openwebmail/etc/defaults/openwebmail.conf文件:
smtpserver 127.0.0.1
更改为:
smtpserver 192.168.10.1 (更改smtp服务器的地址)
authpop3_server localhost
更改为:
authpop3_server 192.168.10.1 (更改pop3服务器的地址)
修改/var/www/cgi-bin/openwebmail/etc/defaults/dbm.conf文件:
dbmopen_ext none
更改为:
dbmopen_ext .db
dbmopen_haslock no
更改为:
dbmopen_haslock yes
smtpserver 192.168.10.1 (添加smtp服务器的地址)
继续运行openwebmail-tool.pl文件:
# ./openwebmail-tool.pl --init
creating db /var/www/cgi-bin/openwebmail/etc/maps/b2g ...done.
creating db /var/www/cgi-bin/openwebmail/etc/maps/g2b ...done.
creating db /var/www/cgi-bin/openwebmail/etc/maps/lunar ...done.
Welcome to the Open WebMail!
This program is going to send a short message back to the developer,
so we could have the idea that who is installing and how many sites are
using this software, the content to be sent is:
.......
Send the site report?(Y/n) y (输入y,然后按回车键)
sending report...
Thank you.
增加用户发送电子邮:
增加本地用户:
# useradd user1
# useradd user2
# useradd user3
设置本地yer用户的密码
# passwd user1
Changing password for user yer.
New UNIX password:
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
# passwd user2
Changing password for user fandy.
New UNIX password:
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
# passwd user3
Changing password for user biao.
New UNIX password:
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
测试webmail方式收发电子邮件:
在ie中输入以下地址:
http://mail.test.org/cgi-bin/openwebmail/openwebmail.pl
试验成功。
但是如果要用
http://mail.test.org替代繁琐的
http://mail.test.org/cgi-bin/openwebmail/openwebmail.pl
#vi /et
c/httpd/conf/httpd.conf
去除972行注释,改为 NameVirtualHost *:80
最后添加
ServerName mail.test.org
DocumentRoot "/var/www"
DirectoryIndex /cgi-bin/openwebmail/openwebmail.pl
<使用mail.test.org代替mail.test.org/cgi-bin/openwebmail/openwebmail.pl 来登录Open Webmail>
ScriptAlias /openwebmail "/var/www/cgi-bin/openwebmail"
ScriptAlias /openwebmail "/var/www/cgi-bin/openwebmail"
<因为有一些Openwebmail的根路径(例如图片的路径)是从/openwebmail开始,而实际却是在/var/www/cgi-bin/openwebmail下>
AllowOverride All
Options ExecCGI
Order allow,deny
Allow from all