と言う記述で逃げていて、編集箇所は目的部分のみ必要最低限と なる様(よう)に変更されている!include conf.d/*.con
このディレクトリの下には以下のファイル群が収められて いるので、/etc/dovecot/conf.d
ファイル数が意外と多くて逆に分かりにくく感じるのは私だけで あろうか...10-auth.conf
10-director.conf
10-logging.conf
10-mail.conf
10-master.conf
10-ssl.conf
10-tcpwrapper.conf
15-lda.conf
15-mailboxes.conf
20-pop3.conf
90-acl.conf
90-plugin.conf
90-quota.conf
auth-checkpassword.conf.ext
auth-deny.conf.ext
auth-dict.conf.ext
auth-master.conf.ext
auth-passwdfile.conf.ext
auth-sql.conf.ext
auth-static.conf.ext
auth-system.conf.ext
auth-vpopmail.conf.ext
ただし、全ての設定値を表示し切れて いるのかは不明dovecot -n
apt-get install dovecot-pop3d
Dovecot のメール受信対象をユーザ毎のメールボックスファイルから Maildir に変更したいので、以下の設定箇所を変更するmkdir /home/[user]/Maildir
chown sensui.sensui /home/[user]/Maildir
chmod 700 Maildir
cd /etc/dovecot/conf.d/
cp -p 10-mail.conf 10-mail.conf.org
vi 10-mail.conf
変更前
mail_location = mbox:~/mail:INBOX=/var/mail/%u
これで、各ユーザへ配送されたメールをメール クライアントで受信する事が可能と なる変更後
#mail_location = mbox:~/mail:INBOX=/var/mail/%u
mail_location = maildir:~/Maildir
/home/[user]/Maildir/new
この箇所は標準動作が不暗号化 + PLAIN TEXT 認証の拒絶なので、この設定行から変更する必要は無いが、敢えて明示的にcat 10-auth.conf
#disable_plaintext_auth = yes
と指定しても良いdisable_plaintext_auth = yes
cp -p 10-ssl.conf 10-ssl.conf.org
vi 10-ssl.conf
変更前
ssl = no
なお、SSL 通信を強要し不暗号化通信を遮断したいので あれば、変更後
#ssl = no
ssl = yes
と指定するssl = required
変更前
#ssl_cert = </etc/dovecot/dovecot.pem
#ssl_key = </etc/dovecot/private/dovecot.pem
念のため、以下を確認しておく変更後
ssl_cert = </etc/dovecot/dovecot.pem
ssl_key = </etc/dovecot/private/dovecot.pem
TCP Port 110 と 995 は標準値らしく、コメントされている状態でも有効と なる らしい10-master.conf
service pop3-login {
inet_listener pop3 {
#port = 110
}
inet_listener pop3s {
#port = 995
#ssl = yes
}
}
ついでに、この箇所も明示的にprotocols = pop3 pop3s
と指定しても良いservice pop3-login {
inet_listener pop3 {
port = 110
}
inet_listener pop3s {
port = 995
ssl = yes
}
}
以前は この箇所がcat 10-auth.conf
auth_mechanisms = plain
で あった記憶も あるが、どうやら変更された らしいmechanisms = plain
cd /etc/dovecot/
vi dovecot.conf
変更前
#listen = *, ::
個人的には もう このファイルを変更したく無いので、限定指定は吝(やぶさ)かでは無いが変更したくは無いと言う、何とも微妙な所では ある変更後
listen = *
これは以下でも良いのかも知れないが、/etc/init.d/dovecot restart
[ ok ] Restarting dovecot (via systemctl): dovecot.service.
これだと [ ok ] も何も表示されないので、本当に restart されたのかが良く分からないservice dovecot restart
同様に、以下を実行しても [ ok ] が返らないので、不親切では あるservice dovecot reload
[ ok ] Reloading IMAP/POP3 mail server: dovecot.
daemon 再起動後の message は以下の通りservice dovecot reload
これはメールを受信後、表示されなくなる らしいRestarting IMAP/POP3 mail server: dovecotIf you have trouble with authentication failures, enable auth_debug setting. See http://wiki.dovecot.org/WhyDoesItNotWork
This message goes away after the first successful login.


正常に受信された事を確認出来た>>> 2015/05/27 20:37:35 <<<
>>> Connecting to "[POP IPaddress]" (SSL/TLS) [2015/05/27 20:37:37] <<<
+OK Dovecot ready.
USER [userID]
+OK
PASS ********
+OK Logged in.
STAT
+OK 2 1982
LIST
+OK 2 messages:
1 991
2 991
.
UIDL
+OK
1 0000002b538890c4
2 0000002c538890c4
.
RETR 1
+OK 991 octets
DELE 1
+OK Marked to be deleted.
RETR 2
+OK 991 octets
DELE 2
+OK Marked to be deleted.
QUIT
+OK Logging out, messages deleted.
non-secure 通信上に おける Plaintext 認証メール受信が disallowed で あると言う事で、正常に遮断される事が確認された>>> 2015/05/29 21:33:26 <<<
>>> Connecting to "[POP IPaddress]" (SSL/TLS) [2015/05/29 21:33:28] <<<
+OK Dovecot ready.
USER [userID]
-ERR [AUTH] Plaintext authentication disallowed on non-secure (SSL/TLS) connections.
QUIT
+OK Logging out.
# netstat -a 稼働中のインターネット接続 (サーバと確立) Proto 受信-Q 送信-Q 内部アドレス 外部アドレス 状態 tcp 0 0 *:pop3 *:* LISTEN tcp 0 0 lun.:domain *:* LISTEN tcp 0 0 localhost:domain *:* LISTEN tcp 0 0 *:ssh *:* LISTEN tcp 0 0 *:smtp *:* LISTEN tcp 0 0 localhost:953 *:* LISTEN tcp 0 0 *:pop3s *:* LISTEN tcp6 0 0 [::]:pop3 [::]:* LISTEN tcp6 0 0 [::]:domain [::]:* LISTEN tcp6 0 0 [::]:ssh [::]:* LISTEN tcp6 0 0 ip6-localhost:953 [::]:* LISTEN tcp6 0 0 [::]:pop3s [::]:* LISTEN udp 0 0 lun.:domain *:* udp 0 0 localhost:domain *:* udp 0 0 lun.ac:ntp *:* udp 0 0 localhost:ntp *:* udp 0 0 *:ntp *:* udp6 0 0 [::]:domain [::]:* udp6 0 0 fe80::215:58ff:fec6:ntp [::]:* udp6 0 0 ip6-localhost:ntp [::]:* udp6 0 0 [::]:ntp [::]:*