###########dovecot###########
1.
dovecot 用来提供收件协议
pop3110
imap143
imaps993
pop3s995
给定用户名称,用户密码,dovecot程序带你去看这个用户的邮件文件
2.服务的安装
[[email protected] ~]# yum install dovecot -y
3.配置
[[email protected] ~]# vim /etc/dovecot/dovecot.conf ##主配置文件(谁能访问并通过认证)
24 protocols = imap pop3 lmtp ##可用来提供收件的协议
48 login_trusted_networks = 0.0.0.0/0 ##允许所有人登陆(同all)
49 disable_plaintext_auth = no ##允许明文认证
[[email protected] westos]# vim /etc/dovecot/conf.d/10-mail.conf ##子配置文件
30 mail_location = mbox:~/mail:INBOX=/var/mail/%u ##%u表示用户名称
##指定相应用户的邮件的自动存放目录
[[email protected] ~]# systemctl restart dovecot
[[email protected] .imap]# su westos
[[email protected] .imap]# passwd westos ##一定要设定密码
Changing password for user westos.
New password:
BAD PASSWORD: The password is shorter than 8 characters
Retype new password:
passwd: all authentication tokens updated successfully.
**用户已经存在:
[[email protected] ~]$ mkdir /home/westos/mail/.imap
[[email protected] ~]$ touch /home/westos/mail/.imap/INBOX
**用户未建立
[[email protected] ~]# mkdir /etc/skel/mail/.imap -p ##用此方法,在骨架文件下建立目录,但已经存在的用户不会生效(需单独建立)
[[email protected] ~]# touch /etc/skel/mail/.imap/INBOX
测试:
使用该命令之前
[[email protected] Desktop]# yum install mutt -y
[[email protected] Desktop]# mutt -f pop://[email protected]
7 kept, 0 deleted.
##用用户和密码登陆