一、前言
Extmail 是一个以perl语言编写,面向大容量/ISP级应用,免费的高性能Webmail软件,主要包括ExtMail、Extman两个部分的程序套件。ExtMail套件用于提供从浏览器中登录、使用邮件系统的Web操作界面,而Extman套件用于提供从浏览器中管理邮件系统的Web操作界面。它以GPL版权释出,设计初衷是希望设计一个适应当前高速发展的IT应用环境,满足用户多变的需求,能快速进行开发、改进和升级,适应能力强的webmail系统。
二、环境
1.系统环境
CentOS6.4 32位
2.6.32-358.el6.i686
2.环境配置
Development tool
Additional Development
Server Platform Development
3.更改主机名
七、出现的错误及解决方法
错误1:
Can't locate CGI.pm in @INC (@INC contains: /var/www/extsuite/extmail/libs /usr/local/lib/perl5 /usr/local/share/perl5 /usr/lib/perl5/vendor_perl
/usr/share/perl5/vendor_perl /usr/lib/perl5 /usr/share/perl5) at /var/www/extsuite/extmail/libs/Ext/CGI.pm line 20. BEGIN failed--compilation aborted at
/var/www/extsuite/extmail/libs/Ext/CGI.pm line 20. Compilation failed in require at /var/www/extsuite/extmail/libs/Ext/App.pm line 23. BEGIN failed--compilation
aborted at /var/www/extsuite/extmail/libs/Ext/App.pm line 23. Compilation failed in require at /var/www/extsuite/extmail/libs/Ext/App/Login.pm line 16. BEGIN failed--
compilation aborted at /var/www/extsuite/extmail/libs/Ext/App/Login.pm line 16. Compilation failed in require at /var/www/extsuite/extmail/cgi/index.cgi line 20.
解决办法:安装perl-CGI和perl-CGI-Session
# yum install perl-CGI perl-CGI-Session
错误2:
Unix::Syslog not found, please install it first! (in cleanup) Undefined subroutine &Ext::Logger::do_closelog called at /var/www/extsuite/extmail/libs/Ext/Logger.pm
line 86.
解决办法:安装Unix-Syslog补丁
# tar -zxvf Unix-Syslog-0.100.tar.gz -C /usr/local/src/
# cd /usr/local/src/Unix-Syslog-0.100/
# perl Makefile.PL
# make && make install
错误3
Can't open /tmp/extman//sid_7c6f62cdb13d7028d93c0b267aa2b02c, No such file or directory
解决办法:
# mkdir /tmp/extman
# chown postfix.postfix /tmp/extman
错误4:无法发送邮件(针对mysql源码安装不一定成功)
解决办法:# vim /etc/postfix/main.cf 关闭161行
161 #mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
错误5
#!/usr/bin/perl -wT # vim: set cindent expandtab ts=4 sw=4: use vars qw($DIR); BEGIN { if ($ENV{SCRIPT_FILENAME} =~ m!(.*/)cgi!) { $DIR = $1; }else { $DIR = '../'; }
my $path = $DIR . 'libs'; unshift @INC, $path unless grep /^$path$/, @INC; #print "content-type: text/html\r\n\r\n"; #$SIG{__WARN__} = $SIG{__DIE__} = sub { print @_
}; } use strict; eval { require Ext::App::Login; my $app = Ext::App::Login->new( config => $DIR.'webmail.cf', directory => $DIR ); $app->run; }; if ($@) { print
"Content-type: text/html\r\n\r\n"; print "$@"; }
解决办法:加载cgid模块
# vim /etc/httpd/conf/httpd.conf
LoadModule cgid_module modules/mod_cgid.so
错误6 (针对mysql源码安装)
Can't locate /var/www/extsuite/extman/lang/en_US in @INC (@INC contains: /usr/local/apache/htdocs/extsuite/extman/libs /usr/local/lib/perl5 /usr/local/share/perl5
/usr/lib/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib/perl5 /usr/share/perl5 .) at /usr/local/apache/htdocs/extsuite/extman/libs/Ext/Lang.pm line 65.
解决办法:更改/usr/local/apache/htdocs/extsuite/extmail/webmail.cf以及extman/webmail.cf配置中的路径
错误7
install_driver(mysql) failed: Can't locate DBD/mysql.pm in @INC (@INC contains: /usr/local/apache/htdocs/extsuite/extman/libs /usr/local/lib/perl5
/usr/local/share/perl5 /usr/lib/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib/perl5 /usr/share/perl5 .) at (eval 14) line 3. Perhaps the DBD::mysql perl
module hasn't been fully installed, or perhaps the capitalisation of 'mysql' isn't right. Available drivers: DBM, ExampleP, File, Gofer, Pg, Proxy, Sponge. at
/usr/local/apache/htdocs/extsuite/extman/libs/Ext/Mgr/MySQL.pm line 45
解决办法:# yum install perl-DBD-MySQL
错误8 (添加域失败)
DBD::mysql::st execute failed: Incorrect integer value: '' for column 'can_signup' at row 1 at /usr/local/apache/htdocs/extsuite/extman/libs/Ext/Mgr/MySQL.pm line 397
解决办法:将198行can_sign改成can_signup
# vim /usr/local/apache/htdocs/extsuite/extman/libs/Ext/MgrApp/Domain.pm
198 can_signup => $q->cgi('cansignup') ? 1 : 0,
错误9 (无法发送邮件,部分日志信息)
# tail -f /var/log/maillog
Mar 7 19:54:28 mail postfix/trivial-rewrite[4550]: warning: connect to mysql server localhost: Can't connect to local MySQL server through socket
'/var/lib/mysql/mysql.sock' (2)
Mar 7 19:54:28 mail postfix/trivial-rewrite[4550]: fatal: mysql:/etc/postfix/mysql_virtual_domains_maps.cf(0,lock|fold_fix): table lookup problem
Mar 7 19:54:29 mail postfix/smtpd[4541]: warning: problem talking to service rewrite: Success
Mar 7 19:54:29 mail postfix/master[4531]: warning: process /usr/libexec/postfix/trivial-rewrite pid 4550 exit status 1
Mar 7 19:54:29 mail postfix/master[4531]: warning: /usr/libexec/postfix/trivial-rewrite: bad command startup -- throttling
Mar 7 19:54:30 mail postfix/postfix-script[4566]: stopping the Postfix mail system
Mar 7 19:54:30 mail postfix/master[4531]: terminating on signal 15
Mar 7 19:54:30 mail postfix/postfix-script[4633]: warning: not owned by group postdrop: /var/spool/postfix/public
Mar 7 19:54:31 mail postfix/postfix-script[4640]: starting the Postfix mail system
Mar 7 19:54:31 mail postfix/master[4641]: daemon started -- version 2.8.2, configuration /etc/postfix
Mar 7 19:57:33 mail postfix/smtpd[4663]: warning: dict_nis_init: NIS domain name not set - NIS lookups disabled
Mar 7 19:57:33 mail postfix/smtpd[4663]: connect from localhost[127.0.0.1]
解决办法:创建链接
# mkdir /var/lib/mysql/
# ln -s /tmp/mysql.sock /var/lib/mysql/mysql.sock
# vim /etc/postfix/main.cf
#mydestination = $myhostname, localhost.$mydomain, localhost
#mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
#mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain,
错误10
warning: SASL authentication problem: unable to open Berkeley db /etc/sasldb2: No such file or
directory
解决办法
# cp /usr/local/sasl2/lib/sasl2/smtpd.conf /etc/sasl2/
# mkdir /etc/sasldb2/
# cp /usr/local/sasl2/lib/sasl2/smtpd.conf /etc/sasldb2/