[root@node1 soft]# wget http://www.cpan.org/authors/id/M/MH/MHARNISCH/Unix-Syslog-1.1.tar.gz
[root@node1 soft]# tar fzvx Unix-Syslog-1.1.tar.gz
[root@node1 soft]# cd Unix-Syslog-1.1
[root@node1 Unix-Syslog-1.1]# perl Makefile.PL
[root@node1 Unix-Syslog-1.1]# make && make install
注意:不安装此补丁的话使用extmail会报如下错误:
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.
5)在shell下面执行如下命令:
[root@node1 ~]# perl -e shell -MCPAN
CPAN is the world-wide archive of perl resources. It consists of about
300 sites that all replicate the same contents around the globe. Many
countries have at least one CPAN site already. The resources found on
CPAN are easily accessible with the CPAN.pm module. If you want to use
CPAN.pm, lots of things have to be configured. Fortunately, most of
them can be determined automatically. If you prefer the automatic
configuration, answer 'yes' below.
If you prefer to enter a dialog instead, you can answer 'no' to this
question and I'll let you configure in small steps one thing after the
other. (Note: you can revisit this dialog anytime later by typing 'o
conf init' at the cpan prompt.)
Would you like me to configure as much as possible automatically? [yes] yes
.....
.....
.....
cpan shell -- CPAN exploration and modules installation (v1.9402)
Enter 'h' for help.
cpan[1]> install CGI
......
.....
...
..
.
Checking if your kit is complete...
Looks good
Warning: prerequisite FCGI 0.67 not found.
Warning: prerequisite Test::More 0.98 not found. We have 0.92.
Writing Makefile for CGI
Could not read '/root/.cpan/build/CGI.pm-3.65-nKc3sL/META.yml'. Falling back to other methods to determine prerequisites
---- Unsatisfied dependencies detected during ----
---- MARKSTOS/CGI.pm-3.65.tar.gz ----
Test::More [requires]
FCGI [requires]
Shall I follow them and prepend them to the queue
of modules we are processing right now? [yes] yes
......
.....
....
...
..
.
Warning (usually harmless): 'YAML' not installed, will not store persistent state
cpan[2]> quit
Terminal does not support GetHistory.
Lockfile removed.
注意:不执行上面的命令使用extmail会报如下类似错误:
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.
6)重启服务器
[root@node1 soft]# cd /etc/dovecot/
[root@node1 dovecot]# vi dovecot.conf
protocols = imap pop3
!include conf.d/*.conf
listen = *
base_dir = /var/run/dovecot/
[root@node1 dovecot]# cd conf.d/
[root@node1 conf.d]# vi 10-auth.conf
disable_plaintext_auth = no
[root@node1 conf.d]# vi 10-mail.conf
mail_location = maildir:~/Maildir
mail_location = maildir:/var/mailbox/%d/%n/Maildir
mail_privileged_group = mail
[root@node1 conf.d]# vi 10-ssl.conf
ssl = no
[root@node1 conf.d]# vi 10-logging.conf
log_path = /var/log/dovecot.log
info_log_path = /var/log/dovecot.info
log_timestamp = "%Y-%m-%d %H:%M:%S "
[root@node1 conf.d]# cp auth-sql.conf.ext auth-sql.conf
[root@node1 conf.d]# vi auth-sql.conf
passdb {
driver = sql
args = /etc/dovecot/dovecot-sql.conf
}
userdb {
driver = sql
args = /etc/dovecot/dovecot-sql.conf
}
3)编辑dovecot通过mysql认证的文件
[
root@node1 conf.d]# vi /etc/dovecot-mysql.conf
driver = mysql
connect = host=localhost dbname=extmail user=extmail password=extmail
default_pass_scheme = CRYPT
password_query = SELECT username AS user,password AS password FROM mailbox WHERE username = '%u'
user_query = SELECT maildir, uidnumber AS uid, gidnumber AS gid FROM mailbox WHERE username = '%u'
[root@node1 extman]# cd docs/
[root@node1 docs]# vi extmail.sql
将文件里面所有的TYPE=MyISAM改为ENGINE=MyISAM、命令如下:
:% s/TYPE/ENGINE/g
[root@node1 docs]# mysql -u root < extmail.sql
[root@node1 docs]# mysql -u root < init.sql
5)授予用户extmail访问extmail数据库的权限
[root@node1 soft]# mysql -u root
MariaDB [(none)]> GRANT all privileges on extmail.* TO extmail@localhost IDENTIFIED BY 'extmail';
Query OK, 0 rows affected (0.52 sec)
MariaDB [(none)]> GRANT all privileges on extmail.* TO extmail@127.0.0.1 IDENTIFIED BY 'extmail';
Query OK, 0 rows affected (0.05 sec)
MariaDB [(none)]> quit
Bye
注意:不启动cmdserver的话,extmail登录管理后台,系统信息里会报Connection refused错误
如果出现如下错误:Undefined subroutine &Ext::Utils::sort2name called at /var/www/extsuite/extmail/libs/Ext/App/Folders.pm line 387.
解决办法: