postfix、dovecot の証明書の作成(Ubuntu 8.04)
| $ sudo -i |
# cd /etc/ssl/private # openssl genrsa -des3 1024 > mail.key Generating RSA private key, 1024 bit long modulus ...++++++ ....................++++++ e is 65537 (0x10001) Enter pass phrase: Verifying - Enter pass phrase: |
<---適当に入力 <---適当に入力 |
| # chown root.ssl-cert mail.key # chmod 640 mail.key |
# openssl rsa -in mail.key -out mail.key Enter pass phrase for test.key: writing RSA key |
<--- 1.で入力した パスフレーズを入力 |
# cd ../certs # openssl req -utf8 -new -key ../private/mail.key -x509 -days 365 -out mail.pem -set_serial 0 You are about to be asked to enter information that will be incorporated into your certificate request. What you are about to enter is what is called a Distinguished Name or a DN. There are quite a few fields but you can leave some blank For some fields there will be a default value, If you enter '.', the field will be left blank. ----- Country Name (2 letter code) [AU]:JP State or Province Name (full name) [Some-State]:Tokyo Locality Name (eg, city) []:Bunkyo-ku Organization Name (eg, company) [Internet Widgits Pty Ltd]:Terra Corp. Organizational Unit Name (eg, section) []:HQ Common Name (eg, YOUR name) []:mail.la-terre.co.jp Email Address []:postmaster.la-terre.co.jp |
<--- 国コードを入力 <--- 都道府県名を入力 <--- 市区町村名を入力 <--- 会社名を入力 <--- 組織名称を入力 <--- サーバのホストネーム <--- 連絡先 |

24 # smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem 25 # smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key 26 smtpd_tls_cert_file=/etc/ssl/certs/mail.pem 27 smtpd_tls_key_file=/etc/ssl/private/mail.key 28 smtpd_use_tls=yes |
<--- この行を追加 <--- この行を追加 |
95 #ssl_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem 96 #ssl_key_file = /etc/ssl/private/ssl-cert-snakeoil.key 97 ssl_cert_file = /etc/ssl/certs/mail.pem 98 ssl_key_file = /etc/ssl/private/mail.key |
<--- この行を追加 <--- この行を追加 |
