因為已經取得 免費的 SSL 憑證:Let’s Encrypt!
所以就想把這個 SSL憑證 也用在 Dovecot 上,讓 pop3 和 imap 都可以使用 SSL/TLS 加密
環境說明
- CentOS 7 x64
- Dovecot 2.2.10
Dovecot 原始設定
- disable_plaintext_auth = no
- auth_mechanisms = plain login
設定流程
範例 Domain: ezbox.idv.tw
- 修改 /etc/dovecot/conf.d/10-ssl.conf
- 修改 /etc/dovecot/conf.d/10-auth.conf
- 修改 /etc/pki/dovecot/dovecot-openssl.cnf
- 重新啟動 dovecot
這樣就完成了!
鸚鵡一開始一直卡在第2步驟沒有做,登入驗證一直失敗
最後修改 10-logging.conf 檔案,設定 verbose_ssl = yes 也開啟 debug 模式
才在 log 檔案中交叉比對找到登入帳號的差異
另外
MUA (Mail User Agent) 設定連線的 伺服器 也要填上申請SSL憑證的 domain 才行
也就是說,如果是獨立的 mail server ,例如:mail.domain.tw
那就得在這台 mail server 上申請SSL憑證囉
有提供 WebMail 就用 webroot 的方式申請
沒有提供 WebMail 可以使用 standalone 的方式申請,但記得 80/443 port 都要能通
參考資料
Dovecot SSL configuration
延伸閱讀