[執行步驟] 設定 key cd /etc/postfix openssl req -new -x509 -nodes -out cert.pem Country Name (2 letter code) [AU]:TW Stat...
[執行步驟]
設定 key
cd /etc/postfix
openssl req -new -x509 -nodes -out cert.pem
Country Name (2 letter code) [AU]:TW
State or Province Name (full name) [Some-State]:Taiwan
Locality Name (eg, city) []:Taipei
Organization Name (eg, company) [Internet Widgits Pty Ltd]:example.com
Organizational Unit Name (eg, section) []:admin
Common Name (eg, YOUR name) []:fjufirefox
Email Address []:root@example.com
chown root:postfix cert.pem privkey.pem
chmod 640 cert.pem privkey.pem
修改 main.cf
nano /etc/postfix/main.cf
# TLS parameters
smtpd_tls_cert_file = /etc/postfix/cert.pem
smtpd_tls_key_file = /etc/postfix/privkey.pem
smtpd_use_tls=yes
tls_random_source = dev:/dev/urandom
tls_daemon_random_source = dev:/dev/urandom
修改 master.cf
nano /etc/postfix/master.cf
smtps inet n - - - - smtpd -v -o smtpd_tls_wrappermode=yes -o smtpd_sasl_auth_enable=yes