实验一:
环境:
yum install dovecot dovecot-mysql -y
yum install dovecot* -y
chkconfig docevot on(注意此次实验与上次实验有一定的关系)
步骤:
(1)vi /etc/dovecot/conf.d/10-mail.conf
mail_location = maildir:/home/vmail/%d/%n
first_valid_uid = 600
(2) vi /etc/dovecot/conf.d/10-auth.conf
!include auth-system.conf.ext
!include auth-sql.conf.ext
(3)cp /usr/share/doc/dovecot-2.0/example-config/dovecot-sql.conf.ext /etc/dovecot/
vi /etc/dovecot/dovecot-sql.conf.ext
# Database driver: mysql, pgsql, sqlite
driver = mysql
default_pass_scheme = PLAIN
# Examples:
# connect = host=192.168.1.1 dbname=users
connect = host=localhost dbname=sushan user=vmail password=vmail
# connect = /etc/dovecot/authdb.sqlite
注意:connect = host=localhost dbname=sushan user= vmail password=vmail
(注意host=localhost之间没有空格哦,否则不成功的)
password_query = \
SELECT username, domain, password \
FROM sushanshan WHERE username = '%u'(该句也可一写成FROM sushanshan(表名) WHERE username = '%u' AND domain = ‘%d’)
# Examples:
user_query = SELECT mailbox, 600 AS uid, 600 AS gid FROM sushanshan WHERE username = '%u'
(4)/etc/init.d/dovecot restart
netstat -antlp 会看到与dovecot相关的端口四个。
测试:
telnet localhost 110
出现OK说明成功。
user test@westos.org
+OK
pass sushan
+OK logged in
list
+OK 1/0 message
quit(退出)
(5) yum install thunderbird -y
postfix+mysql+dovecot
原创
©著作权归作者所有:来自51CTO博客作者sushanshan的原创作品,请联系作者获取转载授权,否则将追究法律责任
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
Mysql+Postfix+Dovecot+Extmail
mysql+postfix+dovecot+extmail搭建邮件服务器,基于开源版的ExtMail 邮件系统,提供更强大功能,支持分布式、高可用和集群等。这里先记下部署extmail基本邮件系统。
Mysql Postfix Dovecot Extmail rhel6