おのたく日記 YouTubeも始めました→
2011-01-08(Sat) [長年日記]
■ [Dovecot] メールサーバーDovecotのSSL証明書
おうちサーバのSSLサーバ証明書は、無料言うこともあり去年の1月4日の日記に書いたようにStartSSLを使っているのだけど、このSSLサーバ証明書は、中間CA証明書が必要なのでApache HTTPサーバの場合には
SSLCertificateFile /etc/ssl/certs/www_server.pem
SSLCertificateKeyFile /etc/ssl/private/www_privatekey.pem
SSLCertificateChainFile /etc/ssl/certs/StartComClass1PrimaryIntermediateServerCA.pem
[/etc/apache/conf.d/SSLより引用]
のように中間CA証明書を指定していた。
しかし、メールサーバのDovecotは
> When I install an SSL certificate, I can't find a config option to set configure the Server Certificate Chain
> file...
> Is this not possible or can I do it another way?
> (When I connect, I am being told the Signature status is uncheckable...)
You need put all certificates in one file in correct order. Look for
example here
[[Dovecot] SSL certificate?より引用]
ってことで、SSLCertificateChainFileのような指定方法が無いので、
というような警告がthunderbirdに出た。ここで「セキュリティ例外」として登録するのは格好悪い。調べてみると、
Chained SSL certificates
Put all the certificates in the ssl_cert_file file. For example when using a certificate signed by TDC the correct order is:
...
[Dovecot SSL configurationより引用]
ってことで、/etc/dovecot/dovecot.confでssl_cert_fileで指定するファイルに、SSLサーバ証明書と、中間CA証明書を入れれば良いらしいので、StartSSLで作ったwww_cert.pemと、StartSSLの中間CA証明書のStartComClass1PrimaryIntermediateServerCA.pem(これは最近はsub.class1.server.ca.pemというファイル名が正しいらしい)をcatして
# cat www_cert.pem StartComClass1PrimaryIntermediateServerCA.pem >www_server.pem
としたら、Apache HTTPサーバでもDovecotでもうまく行くようになった。
|