The mail server set up: Detailed Dovecot configuration

Dovecot is a safe source of POP3 / IMAP server software, fast response and good scalability
POP3 / IMAP protocol is used when the MUA read mail from the mail server. Which, POP3 e-mail is downloaded from the mail server, and IMAP e-mail sucked remain on the server side mail management, operation directly.
Dovecot manner using PAM (Pluggable Authentication Module, pluggable authentication modules) for authentication, and verification system to identify a user, the authenticated user is allowed to receive mail from the mailbox. For dovecot RPM installed, it will automatically create the PAM file
RHEL6 system Dovecot comes with software that can be installed via yum between

[root@rhel6 ~]# yum -y install dovecot\* 
[root@rhel6 ~]# vi /etc/dovecot/dovecot.conf  
protocols = imap pop3  //使用的协议
login_trusted_networks = 192.168.0.0/24                         //设置允许连接的地址 
!include conf.d/*.conf                                          //说明conf.d下的所以conf结尾的文件均有效 
 
[root@rhel6 ~]# cat /etc/dovecot/conf.d/10-mail.conf  //设置邮件存放的路径
mail_location = mbox:~/mail:INBOX=/var/mail/%u 

Based POP3 / IMAP settings

[root@rhel6 ~]# vi /etc/dovecot/conf.d/10-ssl.conf  
ssl = no                                                         //关闭SSL加密 
[root@rhel6 ~]# /etc/init.d/dovecot restart         
[root@rhel6 ~]# netstat -lntp | grep dovecot                        //只开放了110、143端口 
tcp        0      0 0.0.0.0:110                 0.0.0.0:*                   LISTEN      2434/dovecot         
tcp        0      0 0.0.0.0:143                 0.0.0.0:*                   LISTEN      2434/dovecot         
tcp        0      0 :::110                      :::*                        LISTEN      2434/dovecot         
tcp        0      0 :::143                      :::*                        LISTEN      2434/dovecot 

[email protected] Send a message to the user, the windows system to receive mail through outlook testing:
[rhel6, the root @ ~] # mail -s 'postfix' [email protected] </ etc / the hosts

Encrypted POP3s / IMAPs provided

[root@rhel6 ~]# vi /etc/dovecot/conf.d/10-auth.conf  
disable_plaintext_auth = yes                                        //设置密文传输 
 
[root@rhel6 ~]# vi /etc/dovecot/conf.d/10-ssl.conf  
ssl=required  //开启SSL
ssl_cert = </etc/pki/dovecot/certs/dovecot.pem  //公钥路径
ssl_key = </etc/pki/dovecot/private/dovecot.pem  //私钥路径
 
[root@rhel6 ~]# vi /etc/dovecot/conf.d/10-master.conf  
service imap-login { 
  inet_listener imap { 
    port = 0 
  } 
  inet_listener imaps { 
    #port = 993 
    #ssl = yes 
  } 
} 
 
service pop3-login { 
  inet_listener pop3 { 
    port = 0 
  } 
  inet_listener pop3s { 
    #port = 995 
    #ssl = yes 
  } 
} 
                                      
[root@rhel6 ~]# /etc/init.d/dovecot restart          
[root@rhel6 ~]# netstat -lntp | grep dovecot         
tcp        0      0 0.0.0.0:993                 0.0.0.0:*                   LISTEN      2547/dovecot         
tcp        0      0 0.0.0.0:995                 0.0.0.0:*                   LISTEN      2547/dovecot         
tcp        0      0 :::993                      :::*                        LISTEN      2547/dovecot         
tcp        0      0 :::995                      :::*                        LISTEN      2547/dovecot 

Guess you like

Origin www.cnblogs.com/enumx/p/12416769.html