配置postfix和dovecot启用SSL。
[[email protected] ~]# vi /etc/postfix/main.cf
# 添加如下到末尾。
smtpd_use_tls = yes
smtpd_tls_cert_file = /etc/pki/tls/certs/server.crt
smtpd_tls_key_file = /etc/pki/tls/certs/server.key
smtpd_tls_session_cache_database = btree:/etc/postfix/smtpd_scache
[[email protected] ~]# vi /etc/postfix/master.cf
# 第17-18行: 去掉注释
smtps inet n - n - - smtpd
-o smtpd_tls_wrappermode=yes
[[email protected] ~]# vi /etc/dovecot/conf.d/10-ssl.conf
# 第6行:
ssl = yes
# 第12,13行:
ssl_cert = </etc/pki/tls/certs/server.crt
ssl_key = </etc/pki/tls/certs/server.key
配置完成后,重新启动postfix和dovecot。
[[email protected] ~]# /etc/rc.d/init.d/postfix restart
Shutting down postfix: [ OK ]
Starting postfix: [ OK ]
[[email protected] ~]# /etc/rc.d/init.d/dovecot restart
Stopping Dovecot Imap: [ OK ]
Starting Dovecot Imap: [ OK ]
原文地址:https://www.cnblogs.com/enumx/p/12408979.html
时间: 2024-09-30 06:02:34