LoginSignup
5

More than 5 years have passed since last update.

Postfixに入れたSSL証明書の更新手順

Posted at

Postfixに入れたSSL証明書の更新を行ったので、そのときの作業ログです。

環境

更新に必要なものは以下になります。
ファイル名は適宜読み替えてください。
また、PostfixはCentOSで動かしているとします。

更新に必要なもの ファイル名
証明書 server.crt
秘密鍵 private.key
中間証明書 intermediate.crt

手順

1. 中間証明書を証明書にくっつける

cat intermediate.crt >> server.crt # 順番に気を付けること

2. 設定ファイルの更新

/etc/postfix/main.cf
# 証明書, 秘密鍵の場所は適宜読み替えて
smtpd_tls_cert_file = /etc/postfix/server.crt
smtpd_tls_key_file = /etc/postfix/private.key

3. Postfixの再起動

sudo service postfix restart

4. 確認

SMTPSの場合になりますが、以下のコマンドで証明書の情報を確認。

openssl s_client -connect localhost:465 -showcerts

一応実際にメールも送ってみて、正しく届けばおk。

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
5