EDM邮件营销 – Linux邮件服务器SSL配置

之前写过Linux系统下邮件服务器的搭建(Postfix+Dovecot),现在来介绍一下如何安装SSL。

1. 创建SSL证书

创建SSL证书请参考:Create SSL Certificates

2.配置Postfix和Dovecot

[[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
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_tls_loglevel = 0
smtpd_tls_auth_only = yes

[[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
[[email protected] ~]# /etc/rc.d/init.d/postfix restart 
Shutting down postfix: [ OK ]
Starting postfix: [ OK ]

# 重启dovecot
[[email protected] ~]# /etc/rc.d/init.d/dovecot restart 
Stopping Dovecot Imap: [ OK ]
Starting Dovecot Imap: [ OK ]

3. 使用SSL登录

配置好了以后,我们在使用Foxmail等客户端的时候,就可以勾选SSL,端口的话,SMTP使用的是465, POP3使用995, IMAP使用993。

By: http://lomu.me/

已有 0 条评论