LoginSignup
18
21

More than 5 years have passed since last update.

Letsencrypt を postfix, dovecotで使う

Last updated at Posted at 2016-01-05

自分用メモ

letsencrypt

postfix & dovecot

postfix

ln -s /etc/letsencrypt/live/domain.tld/privkey.pem /etc/postfix/ssl.key
ln -s /etc/letsencrypt/live/domain.tld/fullchain.pem /etc/postfix/ssl.cert

edit both configs so they point to key and cert
doveadm reload && /etc/init.d/postfix restart

dovecot

/etc/dovecot/conf.d/10-ssl.conf
ssl_cert = </etc/letsencrypt/live/YOURSITE/fullchain.pem
ssl_key = </etc/letsencrypt/live/YOURSITE/privkey.pem

letsencrypt-auto script

encrypt.sh
/tmp/git/letsencrypt/letsencrypt-auto certonly --webroot /var/www/example.jp/www -d example.jp -d www.example.jp -d mail.example.jp

renew SSL

renew-letsencrypt.sh
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib:/opt/rh/python27/root/usr
/lib64
#/etc/init.d/httpd stop
cd /tmp/git/letsencrypt && ./letsencrypt-auto certonly --renew-by-default -d example.jp -d www.example.jp -d mail.example.jp
/etc/init.d/httpd restart
18
21
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
18
21