
Dovecotを効果的な設定でセットアップしました(dovecot -n
)
# 2.3.7.2 (3c910f64b): /etc/dovecot/dovecot.conf
# OS: Linux 5.2.15-200.fc30.x86_64 x86_64 Fedora release 30 (Thirty)
# Hostname: <my hostname>
auth_debug = yes
auth_mechanisms = plain login
auth_verbose = yes
listen = 10.168.0.9,<my external IP>
mail_location = mbox:~/mail:INBOX=/var/mail/%u
mbox_write_locks = fcntl
namespace inbox {
inbox = yes
location =
mailbox Drafts {
special_use = \Drafts
}
mailbox Junk {
special_use = \Junk
}
mailbox Sent {
special_use = \Sent
}
mailbox "Sent Messages" {
special_use = \Sent
}
mailbox Trash {
special_use = \Trash
}
prefix =
}
passdb {
driver = pam
}
protocols = imap
ssl_cert = </etc/letsencrypt/live/<my hostname>/cert.pem
ssl_cipher_list = PROFILE=SYSTEM
ssl_key = # hidden, use -P to show it
userdb {
args = blocking=no
driver = passwd
}
verbose_ssl = yes
Thunderbird 60.9.0 でこれに接続しようとしていますが、ポート 143 または 993 のどちらを使用しても認証は行われません。journalctl -efu dovecot.service
出力:
Sep 21 21:43:58 <myhostname> dovecot[31705]: auth: Debug: auth client connected (pid=2668)
Sep 21 21:43:58 <myhostname> dovecot[31705]: imap-login: Debug: SSL: where=0x10, ret=1: before SSL initialization
Sep 21 21:43:58 <myhostname> dovecot[31705]: imap-login: Debug: SSL: where=0x2001, ret=1: before SSL initialization
Sep 21 21:43:58 <myhostname> dovecot[31705]: imap-login: Debug: SSL: where=0x2002, ret=-1: before SSL initialization
Sep 21 21:43:58 <myhostname> dovecot[31705]: imap-login: Debug: SSL: where=0x2001, ret=1: before SSL initialization
Sep 21 21:43:58 <myhostname> dovecot[31705]: imap-login: Debug: SSL: where=0x2001, ret=1: SSLv3/TLS read client hello
Sep 21 21:43:58 <myhostname> dovecot[31705]: imap-login: Debug: SSL: where=0x2001, ret=1: SSLv3/TLS write server hello
Sep 21 21:43:58 <myhostname> dovecot[31705]: imap-login: Debug: SSL: where=0x2001, ret=1: SSLv3/TLS write certificate
Sep 21 21:43:58 <myhostname> dovecot[31705]: imap-login: Debug: SSL: where=0x2001, ret=1: SSLv3/TLS write key exchange
Sep 21 21:43:58 <myhostname> dovecot[31705]: imap-login: Debug: SSL: where=0x2001, ret=1: SSLv3/TLS write server done
Sep 21 21:43:58 <myhostname> dovecot[31705]: imap-login: Debug: SSL: where=0x2002, ret=-1: SSLv3/TLS write server done
Sep 21 21:43:58 <myhostname> dovecot[31705]: imap-login: Debug: SSL: where=0x2002, ret=-1: SSLv3/TLS write server done
Sep 21 21:43:58 <myhostname> dovecot[31705]: imap-login: Debug: SSL: where=0x2002, ret=-1: SSLv3/TLS write server done
Sep 21 21:43:58 <myhostname> dovecot[31705]: imap-login: Debug: SSL: where=0x2002, ret=-1: SSLv3/TLS write server done
Sep 21 21:43:58 <myhostname> dovecot[31705]: imap-login: Debug: SSL: where=0x2001, ret=1: SSLv3/TLS write server done
Sep 21 21:43:58 <myhostname> dovecot[31705]: imap-login: Debug: SSL: where=0x2001, ret=1: SSLv3/TLS read client key exchange
Sep 21 21:43:58 <myhostname> dovecot[31705]: imap-login: Debug: SSL: where=0x2001, ret=1: SSLv3/TLS read change cipher spec
Sep 21 21:43:58 <myhostname> dovecot[31705]: imap-login: Debug: SSL: where=0x2001, ret=1: SSLv3/TLS read finished
Sep 21 21:43:58 <myhostname> dovecot[31705]: imap-login: Debug: SSL: where=0x2001, ret=1: SSLv3/TLS write session ticket
Sep 21 21:43:58 <myhostname> dovecot[31705]: imap-login: Debug: SSL: where=0x2001, ret=1: SSLv3/TLS write change cipher spec
Sep 21 21:43:58 <myhostname> dovecot[31705]: imap-login: Debug: SSL: where=0x2001, ret=1: SSLv3/TLS write finished
Sep 21 21:43:58 <myhostname> dovecot[31705]: imap-login: Debug: SSL: where=0x20, ret=1: SSL negotiation finished successfully
Sep 21 21:43:58 <myhostname> dovecot[31705]: imap-login: Debug: SSL: where=0x2002, ret=1: SSL negotiation finished successfully
Sep 21 21:43:58 <myhostname> dovecot[31705]: imap-login: Aborted login (no auth attempts in 0 secs): user=<>, rip=10.168.0.53, lip=<myhostextip>, TLS, session=<OvtgaBWT5iUKqAA1>
Sep 21 21:43:58 <myhostname> dovecot[31705]: imap-login: Debug: SSL alert: close notify
エラーは、最後から 2 番目の行に「0 秒以内に認証試行がありません」と表示されているようです。 Ubuntu にインストールされた dovecot に Thunderbird クライアントを接続する際の問題証明書の例外に関する潜在的な問題が示されました。Thunderbird (Windows 版) に保存されている証明書を削除し、証明書の管理で再度取得して、セキュリティ例外を追加しました。それでも解決しませんでした。また、上記のログ ファイルには、証明書ダイアログが正常に実行されたことが示されています。
cram-md5
サポートされている認証メカニズムとして追加すると、auth: Fatal: CRAM-MD5 mechanism can't be supported with given passdbs
ログに追加されます。
何が見えないのか、何を誤解しているのか、あるいは間違っているのか? どうすればうまく動作するのでしょうか?
編集: 完全に新しいプロファイルを使用する Thunderbird x64 でテストしました。動作しません。Thunderbird を 60 から 68 にアップグレードしてみましたが、役に立ちませんでした。認証と IMAP トラフィックをログに記録するために、Mozilla のログ機能を使用しました。認証では何も記録されず、IMAP トラフィックでは dovecot サービスについては何も記録されません。
答え1
問題は証明書にあります。証明書は信頼されていますが、サーバーの公開されている名前に割り当てられています。内部 IP アドレスを使用して、内部ネットワークからサーバーにアクセスしていました。そのため、Thunderbird はサーバーとの通信を拒否しました。
セキュリティ例外を確認してもこの件は解決しませんでしたが、接続セキュリティを「なし」に、認証方法を「通常のパスワード」に設定することで、初期アカウント設定構成ウィンドウを終了できました。その後、アカウント設定を SSL/TLS と通常のパスワードに戻すと、Thunderbird がセキュリティ例外を要求したので、それを確認したところ、動作するようになりました。