dovecot
给定用户名称,用户密码。dovect程序带我们去看用户邮件文件
dovecot并不负责邮件的投递和储存【mta】它只是将储存在邮件服务器上的邮件显示出来
1 安装服务
yum install dovecot dovecot-mysql -y
2 [root@faxin-mail ~]# vim /etc/dovecot/dovecot.conf
login_trusted_networks = 0.0.0.0/0 信任网络
protocols = imap pop3 lmtp 使用协议
disable_plaintext_auth = no 开启明文认证
[root@faxin-mail ~]# vim /etc/dovecot/conf.d/10-auth.conf
123 !include auth-sql.conf.ext 开启mysql认证方式
3 [root@faxin-mail ~]# cp /usr/share/doc/dovecot-2.2.10/example-config/dovecot-sql.conf.ext /etc/dovecot/dovecot-sql.conf.ext
生成dovecot读取mysql的配置
vim /etc/dovecot/dovecot-sql.conf.ext
driver = mysql 数据库类型
connect = host=localhost dbname=email user=postuser password=postuser 查询时用到的库,用户,密码
password_query = \ 查询密码匹配
SELECT username, domain, password \
FROM users WHERE username = '%u' AND domain = '%d'
user_query = SELECT home, 666 AS uid, 666 AS gid FROM users WHERE userid = '%u'查询邮件内容
default_pass_scheme = plain 默认认证方式为明文
[root@faxin-mail ~]# vim /etc/dovecot/conf.d/10-auth.conf
mail_location = maildir:/home/vmail/%d/%n 制定邮件位置
first_valid_uid = 666 文件查询用户身份
first_valid_gid = 666
本文转自铁骑传说51CTO博客,原文链接:http://blog.51cto.com/ybzbfs/1931163 ,如需转载请自行联系原作者