[root@mail docs]# cp /etc/dovecot.conf /etc/dovecot.confbak #备份
[root@mail docs]# vim /etc/dovecot.conf
211 #mail_location =
修改为:
211 mail_location = maildir:/var/mailbox/%d/%n/Maildir
795 passdb pam {
828 }
修改为:
795 #passdb pam {
828 #}
869 #passdb sql {
871 #args =
872 #}
修改为:
869 passdb sql {
871 args = /etc/dovecot-mysql.conf
872 }
896 userdb passwd {
903 }
修改为:
896 #userdb passwd {
903 #}
930 #userdb sql {
#args =
933 #}
修改为:
930 userdb sql {
args = /etc/dovecot-mysql.conf
933 }
:wq
[root@mail docs]# postfix reload
postfix/postfix-script: refreshing the Postfix mail system
[root@mail docs]# vim /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@mail docs]# vim /etc/postfix/main.cf
415 #home_mailbox = Maildir/
修改为:
415 home_mailbox = Maildir/
:wq
[root@mail docs]# service dovecot start
[root@mail docs]# chkconfig dovecot on
[root@mail docs]# service postfix restart
[root@mail ~]# mkdir -pv /var/www/extsuite
mkdir: created directory `/var/www/extsuite'
[root@mail ~]# tar -zxvf extmail-1.2.tar.gz -C /usr/local/src/
[root@mail ~]# cd /usr/local/src/
[root@mail src]# mv extmail-1.2/ /var/www/extsuite/extmail
[root@mail src]# mv extman-1.1/ /var/www/extsuite/extman
[root@mail src]# cd /var/www/extsuite
[root@mail extsuite]# ll
total 16
drwxr-xr-x 7 hw hw 4096 Dec 25 2009 extmail
drwxr-xr-x 11 hw hw 4096 Dec 24 2009 extman
[root@mail extsuite]# cd extmail/
[root@mail extmail]# cp webmail.cf.default webmail.cf
[root@mail extmail]# cp webmail.cf webmail.cfbak #备份
[root@mail extmail]# vim webmail.cf
77 SYS_USER_LANG = en_US
修改为:
77 SYS_USER_LANG = zh_CN #语言中文
104 SYS_MESSAGE_SIZE_LIMIT = 5242880 #用户可以发送的最大邮件,使用默认值即可
127 SYS_MAILDIR_BASE = /home/domains
修改为:
127 SYS_MAILDIR_BASE = /var/mailbox #用户邮件的存放目录
139 SYS_MYSQL_USER = db_user
140 SYS_MYSQL_PASS = db_pass
修改为:
139 SYS_MYSQL_USER = extmail #连接数据库服务器所使用的用户名
140 SYS_MYSQL_PASS = extmail #连接数据库服务器所使用的密码
142 SYS_MYSQL_HOST = localhost #指明数据库服务器主机名
145 SYS_MYSQL_TABLE = mailbox
146 SYS_MYSQL_ATTR_USERNAME = username
147 SYS_MYSQL_ATTR_DOMAIN = domain
148 SYS_MYSQL_ATTR_PASSWD = password
以上四项用来指定验正用户登录里所用到的表,以及用户名、域名和用户密码分别对应的表中列的名称;这里默认即可
197 SYS_AUTHLIB_SOCKET = /var/spool/authdaemon/socket
修改为:
197 SYS_AUTHLIB_SOCKET = /usr/local/courier-authlib/var/spool/authdaemon/socket 指明authdaemo socket文件的位置
:wq
[root@mail extmail]# service httpd start
[root@mail extmail]# chkconfig httpd on
由于extmail要进行本地邮件的投递操作,故必须将运行apache服务器用户的身份修改为您的邮件投递代理的用户;本例中打开了apache服务器的suexec功能,故使用以下方法来实现虚拟主机运行身份的指定。此例中的MDA为postfix自带,因此将指定为postfix用户:
[root@mail extmail]# cp /etc/httpd/conf/httpd.conf /etc/httpd/conf/httpd.confbak #备份
[root@mail extmail]# vim /etc/httpd/conf/httpd.conf
231 User apache
232 Group apache
修改为:
231 User postfix
232 Group postfix
在最后添加以下内容:
<VirtualHost 172.16.1.254:80>
ServerName mail.postfix.rog
DocumentRoot /var/www/extsuite/extmail/html/
ScriptAlias /extmail/cgi /var/www/extsuite/extmail/cgi
Alias /extmail /var/www/extsuite/extmail/html
</VirtualHost>
:wq
[root@mail extmail]# chown -R postfix.postfix /var/www/extsuite/extmail/cgi/
[root@mail extmail]# service httpd restart
[root@mail ~]# tar -zxvf Unix-Syslog-1.1.tar.gz -C /usr/local/src/
[root@mail ~]# cd /usr/local/src/
[root@mail src]# cd Unix-Syslog-1.1/
[root@mail Unix-Syslog-1.1]# perl Makefile.PL
[root@mail Unix-Syslog-1.1]# make
[root@mail Unix-Syslog-1.1]# make install
IE浏览器访问输入:http://172.16.1.254/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.
解决方法:
没装perl-Unix-Syslog包,
安装perl-Unix-Syslog-0.100-1hzq.i386.rpm搞定
依赖关系的解决,编译安装Unix-Syslog-0.100.tar.gz
[root@mail ~]# tar -zxvf Unix-Syslog-1.1.tar.gz -C /usr/local/src/
[root@mail ~]# cd /usr/local/src/
[root@mail src]# cd Unix-Syslog-1.1/
[root@mail Unix-Syslog-1.1]# perl Makefile.PL
[root@mail Unix-Syslog-1.1]# make
[root@mail Unix-Syslog-1.1]# make install
[root@mail Unix-Syslog-1.1]# service httpd start
输入:http://172.16.1.254/extmail
选择“登录邮箱管理”即可登入extman进行后台管理,默认管理帐号为:[email protected] 密码为:extmail*123*,如下:
报错:404 Not Found
Not Found
The requested URL /extman/cgi/index.cgi was not found on this server.
解决方法:接如下配置Extman-1.1,继续。。。。。。
上一页|下一页