...FreeBSDのPortsに感謝して、TLS版のPostfixをportsよりinstallする。
他のOSについては
Postfix/TLS - Installing the patchkitを見た感じだとpatchを当てて
makeすれば同じようにいけるとおもいます。
# mkdir /usr/local/etc/postfix/certs
# cd /usr/local/etc/postfix/certs
# openssl req -new -x509 -nodes -out cert.pem
このときに色々と質問されますが、適宜答えると/usr/local/etc/postfix/certsに privkey.pemとcert.pemが作成されます。
おふざけで書いているのでこのまま書かないようにしてください(^^;
% openssl req -new -x509 -nodes -out cert.pem Using configuration from /etc/ssl/openssl.cnf Generating a 1024 bit RSA private key ..........................++++++ ..........++++++ writing new private key to 'privkey.pem' ----- 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]:Nagano (県名) Locality Name (eg, city) []:New Tokyo City No.3 (市町村名) Organization Name (eg, company) [Internet Widgits Pty Ltd]:NERV JAPAN (組織名) Organizational Unit Name (eg, section) []:Evangelion Dept. (部署) Common Name (eg, YOUR name) []:Magi.NERV.JP (SMTP Serverのホスト名) Email Address []:postmaster@NERV.JP (管理者のメールアドレス) %
# chmod -R go-rwx /usr/local/etc/postfix/certs
smtpd_tls_cert_file = /usr/local/etc/postfix/certs/cert.pem
smtpd_tls_key_file = /usr/local/etc/postfix/certs/privkey.pem
smtpd_use_tls = yes
tls_random_source = dev:/dev/urandom
tls_daemon_random_source = dev:/dev/urandom
smtp_use_tls = yes
さっきはsmtp*d*で、今回はsmtpなので注意してください。
smtp_tls_note_starttls = yes
© 2001 Yoshisato YANAGISAWA PCC-Software.org. All rights reserved.