RedHat 5.4下构建postfix全功能电子邮(七)-extmail extman平台(上集)
基于Perl 语言开发的中文Webmail管理平台
套件:ExtMail --Web 界面的邮件操作
Extman –Web 界面的邮件系统管理
1.1平台安装
3个倚赖包
[root@mail Maildir]# cd /soft
[root@mail soft]# ll
[root@mail soft]# tar -zxf Unix-Syslog-1.1.tar.gz -C /usr/local/src/
[root@mail soft]# cd /usr/local/src/Unix-Syslog-1.1/
[root@mail Unix-Syslog-1.1]# perl Makefile.PL && make && make install
[root@mail Unix-Syslog-1.1]# cd / soft
[root@mail mail]# ll
[root@mail soft]# tar -zxf DBI-1.616.tar.gz -C /usr/local/src/
[root@mail soft]# cd /usr/local/src/DBI-1.616/
[root@mail DBI-1.616]# perl Makefile.PL && make && make install
[root@mail DBI-1.616]# cd /soft
[root@mail soft]# ll
[root@mail soft]# tar -zxf DBD-mysql-4.020.tar.gz -C /usr/local/src/
[root@mail soft]# cd /usr/local/src/DBD-mysql-4.020/
[root@mail DBD-mysql-4.020]# perl Makefile.PL && make && make install
#注意以上三个包在编译安装过程可能会提示 警告信息 隐式函数 计算出的变量值未被使用等,只要没有error信息就一切ok
安装ExtMail
[root@mail DBD-mysql-4.020]# cd /soft
[root@mail soft]# tar -zxf extmail-1.2.tar.gz -C /usr/local/apache2/htdocs/
[root@mail soft]# cd /usr/local/apache2/htdocs/
[root@mail htdocs]# mv extmail-1.2 extmail
[root@mail htdocs]# cd extmail/
[root@mail extmail]# chown -R postfix:postfix cgi/
[root@mail extmail]# ll
[root@mail extmail]# cp webmail.cf.default webmail.cf
[root@mail extmail]# ll
1.2 修改配置文件
[root@mail extmail]# vim webmail.cf
2 SYS_CONFIG = /usr/local/apache2/htdocs/extmail/
5 SYS_LANGDIR = /usr/local/apache2/htdocs/extmail/lang
8 SYS_TEMPLDIR = /usr/local/apache2/htdocs/extmail/html
127 SYS_MAILDIR_BASE = /mailbox
139 SYS_MYSQL_USER = extmail
140 SYS_MYSQL_PASS = extmail
141 SYS_MYSQL_DB = extmail
142 SYS_MYSQL_HOST = localhost
143 SYS_MYSQL_SOCKET = /tmp/mysql.sock
1.3 修改apache服务,添加虚拟主机
[root@mail extmail]# vim /usr/local/apache2/conf/httpd.conf
66 User postfix
67 Group postfix
412 NameVirtualHost *:80
413 <VirtualHost *:80>
414 ServerName mail.shuiyong.com
415 DocumentRoot /usr/local/apache2/htdocs/extmail/html/
416 ScriptAlias /extmail/cgi/ "/usr/local/apache2/htdocs/extmail/cgi/"
417 Alias /extmail "/usr/local/apache2/htdocs/extmail/html/"
418 </VirtualHost>
#这里由于前面我们并没有启用Suexec 所以我们没有在虚拟主机中添加 SuexecUerGroup postfix postfix
#重启apache
[root@mail extmail]# /usr/local/apache2/bin/apachectl restart
2.1 安装包
4个倚赖包
[root@mail extmail]# cd /soft
[root@mail soft]# tar -zxf GD-2.46.tar.gz -C /usr/local/src/
[root@mail soft]# cd /usr/local/src/GD-2.46/
[root@mail GD-2.46]# perl Makefile.PL && make && make install
[root@mail GD-2.46]# cd /soft
[root@mail soft]# tar -zxf File-Tail-0.99.3.tar.gz -C /usr/local/src/
[root@mail soft]# cd /usr/local/src/File-Tail-0.99.3/
[root@mail File-Tail-0.99.3]# perl Makefile.PL && make && make install
[root@mail File-Tail-0.99.3]# cd /soft
[root@mail soft]# rpm -ivh rrdtool-1.2.23-3.el5.i386.rpm
[root@mail soft]# rpm -ivh perl-rrdtool-1.2.23-1.el5.rf.i386.rpm
Extman 套件
[root@mail mail]# tar -zxf extman-1.1.tar.gz -C /usr/local/apache2/htdocs/
[root@mail mail]# cd /usr/local/apache2/htdocs/
[root@mail htdocs]# ll
[root@mail htdocs]# mv extman-1.1 extman
[root@mail htdocs]# ll
[root@mail htdocs]# cd extman/
[root@mail extman]# chown -R postfix:postfix cgi/
[root@mail extman]# mkdir /tmp/extman
[root@mail extman]# chown -R postfix:postfix /tmp/extman/
2.2 修改配置文件
[root@mail extman]# cp webman.cf.default webman.cf
[root@mail extman]# ll
[root@mail extman]# vim webman.cf
2 SYS_CONFIG = /usr/local/apache2/htdocs/extman/
5 SYS_LANGDIR = /usr/local/apache2/htdocs/extman/lang
8 SYS_TEMPLDIR = /usr/local/apache2/htdocs/extman/html
12 SYS_MAILDIR_BASE = /mailbox
127 SYS_MYSQL_USER = webman
128 SYS_MYSQL_PASS = webman
129 SYS_MYSQL_DB = extmail
130 SYS_MYSQL_HOST = localhost
131 SYS_MYSQL_SOCKET = /tmp/mysql.sock
2.3 调整apache主配文件。添加extman相关目录别名
[root@mail extman]# vim /usr/local/apache2/conf/httpd.conf
412 NameVirtualHost *:80
413 <VirtualHost *:80>
414 ServerName mail.shuiyong.com
415 DocumentRoot /usr/local/apache2/htdocs/extmail/html/
416 ScriptAlias /extmail/cgi/ "/usr/local/apache2/htdocs/extmail/cgi/"
417 Alias /extmail "/usr/local/apache2/htdocs/extmail/html/"
418 ScriptAlias /extman/cgi "/usr/local/apache2/htdocs/extman/cgi/"
419 Alias /extman "/usr/local/apache2/htdocs/extman/html/"
420 </VirtualHost>
[root@mail extman]# /usr/local/apache2/bin/apachectl restart
2.4 现在在客户端访问
http://mail.shuiyong.com 就可以看见ExtMail的登录界面了。在客户端访问
http://mail.shuiyong.com/extman 就可以看见Extman后台管理登录界面了
默认管理员账户:[email protected]
默认密码:extmail*123*
#如无法登录禁用校验码,将1改为0
#[root@mail ~]# vim /usr/local/apache2/htdocs/extman/webman.cf
#21 SYS_CAPTCHA_ON = 1
本文出自 “xmshuiyong’blog” 博客,请务必保留此出处http://xmshuiyong.blog.51cto.com/1980172/1028133