[root@mail ~]# vim /etc/dovecot.conf
增加一行:
mail_location = maildir:/var/mailbox/%d/%n/Maildir
注释掉796、829、897、904行、


打开870、872、874行,修改872行:

打开931、933、934行,修改933行:

[root@mail ~]# vim /etc/postfix/main.cf

编辑新文件dovecot-mysql.conf
[root@mail ~]# 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'
启动dovecot
[root@mail ~]# service dovecot start
[root@mail ~]# chkconfig dovecot on
