Dovecot インストール/設定
DovecotをインストールしてPOP/IMAPサーバーを構築します。
PostfixにSASL機能が提供できるように設定します。
1.Dovecotインストール
1 |
# yum -y install dovecot |
2.Dovecot設定
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 |
# vi /etc/dovecot/dovecot.conf 22 # A comma separated list of IPs or hosts where to listen in for connections. 23 # "*" listens in all IPv4 interfaces, "::" listens in all IPv6 interfaces. 24 # If you want to specify non-default ports or anything more complex, 25 # edit conf.d/master.conf. 26 listen = * // 26行目:変更 ( 今回は、IPv4のみ為、IPv6は外します) # vi /etc/dovecot/conf.d/10-auth.conf 1 ## 2 ## Authentication processes 3 ## 4 5 # Disable LOGIN command and all other plaintext authentications unless 6 # SSL/TLS is used (LOGINDISABLED capability). Note that if the remote IP 7 # matches the local IP (ie. you're connecting from the same computer), the 8 # connection is considered secure and plaintext authentication is allowed. 9 disable_plaintext_auth = no 10 // 9行目:コメント解除し変更(プレーンテキスト認証も許可する) 93 # Space separated list of wanted authentication mechanisms: 94 # plain login digest-md5 cram-md5 ntlm rpa apop anonymous gssapi otp skey 95 # gss-spnego 96 # NOTE: See also disable_plaintext_auth setting. 97 auth_mechanisms = plain login 98 // 97行目:loginを追記 # vi /etc/dovecot/conf.d/10-mail.conf 22 # See doc/wiki/Variables.txt for full list. Some examples: 23 # 24 # mail_location = maildir:~/Maildir 25 # mail_location = mbox:~/mail:INBOX=/var/mail/%u 26 # mail_location = mbox:/var/mail/%d/%1n/%n:INDEX=/var/indexes/%d/%1n/%n 27 # 28 # <doc/wiki/MailLocation.txt> 29 # 30 mail_location = maildir:~/Maildir 31 // 30行目:Maildir形式のため、コメント解除して追記 # vi /etc/dovecot/conf.d/10-master.conf 75 service auth { 76 # auth_socket_path points to this userdb socket by default. It's typically 77 # used by dovecot-lda, doveadm, possibly imap process, etc. Its default 78 # permissions make it readable only by root, but you may need to relax these 79 # permissions. Users that have access to this socket are able to get a list 80 # of all usernames and get results of everyone's userdb lookups. 81 #unix_listener auth-userdb { 82 # mode = 0600 83 # user = postfix 84 # group = postfix 85 #} 86 87 # Postfix smtp-auth 88 unix_listener /var/spool/postfix/private/auth { 89 mode = 0666 90 user = postfix 91 group = postfix 92 } 93 // 88-92行目:コメント解除し追記 |
3.Dovecot起動
1 2 3 |
# /etc/rc.d/init.d/dovecot start Starting Dovecot Imap: [ OK ] # chkconfig dovecot on |