LoginSignup
2
4

More than 5 years have passed since last update.

CentOS7で無料SSL証明書 Let's Encrypt メールサーバ編

Posted at

前項 CentOS7で無料SSL証明書 Let's Encrypt
http://qiita.com/sin_w/items/931d0ce08c2e275ef650
でwebサービスに証明書を設定しましたが、ついでにメールサーバ機能へも組み込んでみます。

前提条件として
webサーバとmailサーバがおなじホストで動いていること
smtpはpostfix
pop3、imapサーバとしてdovecot
を使用し、オレオレ証明書を使って既に環境は構築済みで動作中とします。

postfixは
smtpd_tls_cert_file
smtpd_tls_key_file
をLet's Encryptで取得した鍵に置き換えます。

/etc/postfix/main.cf

smtpd_tls_cert_file = /etc/letsencrypt/live/www.hoge.com/fullchain.pem
smtpd_tls_key_file = /etc/letsencrypt/live/www.hoge.com/privkey.pem

postfixを再起動します。
systemctl restart postfix

dovecotは
ssl_cert
ssl_key

をLet's Encryptで取得した鍵に置き換えます。

/etc/dovecot/conf.d/10-ssl.conf

ssl_cert = </etc/letsencrypt/live/www.hoge.com/fullchain.pem
ssl_key = </etc/letsencrypt/live/www.hoge.com/privkey.pem

dovecotを再起動します。
systemctl restart dovecot

2
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
4