centos7邮件服务器SSL配置
在上篇文章centos7搭建postfix邮件服务器的搭建中我们没有配置SSL,接下来我们在这篇文章中讲讲centos7邮件服务器SSL配置。
1. 创建SSL证书
[root@www ~]# cd /etc/pki/tls/certs [root@www certs]# make server.key umask ; \
/usr/bin/openssl genrsa -aes128 > server.key Generating RSA private key, bit long modulus
......................................................++++++
.............++++++
e is (0x10001)
Enter pass phrase:# set passphrase Verifying - Enter pass phrase:# confirm # remove passphrase from private key [root@www certs]# openssl rsa -in server.key -out server.key Enter pass phrase for server.key:# input passphrase writing RSA key
[root@www certs]#
[root@www certs]# make server.csr umask ; \
/usr/bin/openssl req -utf8 -new -key server.key -out server.csr 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 ( letter code) [XX]:JP
# country State or Province Name (full name) [e]:Hiroshima
# state Locality Name (eg, city) [Default City]:Hiroshima
# city Organization Name (eg, company) [Default Company Ltd]:GTS
# company Organizational Unit Name (eg, section) []:Server World
# department Common Name (eg, your server's hostname) []:www.srv.world
# server's FQDN Email Address []:xxx@srv.world
# email address Please enter the following 'extra' attributes
to be sent with your certificate request
A challenge password []:# Enter An optional company name []:# Enter [root@www certs]#
[root@www certs]# openssl x509 -in server.csr -out server.crt -req -signkey server.key -days Signature ok
subject=/C=JP/ST=Hiroshima/L=Hiroshima/O=GTS/OU=Server World/CN=www.srv.world/emailAddress=xxx@srv.world Getting Private key
[root@www certs]# chmod server.*
2.配置Postfix和Dovecot
[root@mail ~]# vim /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 =
smtpd_tls_auth_only = yes [root@mail ~]# vim /etc/postfix/master.cf
# -18行: 取消注释
smtps inet n - n - - smtpd
-o smtpd_tls_wrappermode=yes [root@mail ~]# vim /etc/dovecot/conf.d/-ssl.conf
# 6行: 取消注释
ssl = yes
# ,13行: 指定证书
ssl_cert = </etc/pki/tls/certs/server.crt
ssl_key = </etc/pki/tls/certs/server.key
#开放SSL端口(端口的话,SMTP使用的是465, POP3使用995, IMAP使用993)
firewall-cmd --add-port={465/tcp,995/tcp,993/tcp} --permanent
firewall-cmd --reload
# 重启postfix
[root@mail ~]# systemctl restart postfix
Shutting down postfix: [ OK ]
Starting postfix: [ OK ] # 重启dovecot
[root@mail ~]# systemctl restart dovecot
Stopping Dovecot Imap: [ OK ]
Starting Dovecot Imap: [ OK ]
3. 使用SSL登录
配置好了以后,我们在使用Foxmail等客户端的时候,就可以勾选SSL.

这样我们就配置好了SSL了。
centos7邮件服务器SSL配置的更多相关文章
- linux邮件服务器postfix配置实例
linux邮件服务器postfix配置实例(超级详细!!!) 2013-03-13 13:30:21 标签:邮件服务器 linux 1. 系统安装:1)centos4.3 选上MAIL组件里的全部.2 ...
- ECMall如何支持SSL连接邮件服务器的配置
首先,主要是ecmall使用的phpmailer版本太低,不支持加密连接. 然后,得对相应代码做一定调整. 1. 覆盖phpmailer 请从附件进行下载: http://files.cnblogs. ...
- CentOS7 系统服务器初始化配置、安全加固、内核升级优化常用软件安装的Shell脚本分享
转载自:https://www.bilibili.com/read/cv13875630?spm_id_from=333.999.0.0 描述: 适用于企业内部 CentOS7 系列操作服务器初始化. ...
- IBM Z上邮件服务器的配置相关内容
https://www.ibm.com/support/knowledgecenter/SSLTBW_1.13.0/com.ibm.zos.r13.halz002/sen.htm#sen 每次搜太费劲 ...
- centos7搭建postfix邮件服务器
在使用qq等邮件服务器厂商提供的邮件服务后,发现他们的邮件发送数量是有限制的,随着公司的业务的需求下,我们需要搭建一个邮件服务器,邮件服务器可以帮助我们在一些提醒方面和消息推送方面起到帮助. 理论性语 ...
- Confluence6.9配置邮件服务器
一.调整confluence服务 1.在confluence安装目录下的server.xml中加一段邮件服务器的配置,加在confluence的Context中 <Context path=&q ...
- kubuntu+roundcube搭建邮件服务器(包含LAMP)
好久之前写的了,偶然翻到然后拿出来看看,里面文字图片都没改,有错误请见谅 步骤: 一.关于ubuntu的安装二.ubuntu配置LAMP(Linux+Apache+Mysql+Perl/PHP/Pyt ...
- Windows Server 2003搭建邮件服务器
Windows Server 2003搭建邮件服务器 由于Windows Server 2003默认是没有安装我们搭建邮件服务器所需要的POP3和SMTP服务的,因此需要我们自己来安装.方法如下: 1 ...
- Exchange 2010邮件服务器的搭建和部署
Exchange主要是针对内部网或者企业网用户进行搭建的邮件服务器软件,利用它能够很快地搭建安全性较高的内部网邮件系统. 本次搭建在个人环境中实践,纯属爱好折腾,分四步骤,1.搭建windows 20 ...
随机推荐
- FPGA基础之逻辑单元(LE or LC)的基本结构
原帖地址: https://blog.csdn.net/a8039974/article/details/51706906/ 逻辑单元在FPGA器件内部,是完成用户逻辑的最小单元.逻辑单元在ALTER ...
- Structured Exception Handling
https://docs.microsoft.com/en-us/windows/desktop/Debug/structured-exception-handling An exception is ...
- Docker中部署Mysql5.7和DbAdmin的docker-compose.yml
一.简述 本文讲Docker通过docker-compose.yml部署Mysql5.7和dbAdmin的方法. 二.文件 1.docker-compose.yml内容如下: version: ' s ...
- SpringBoot2.0微信小程序支付多次回调问题
SpringBoot2.0微信小程序支付多次回调问题 WxJava - 微信开发 Java SDK(开发工具包); 支持包括微信支付.开放平台.公众号.企业微信/企业号.小程序等微信功能的后端开发. ...
- glog日志库使用笔记
日志能方便地诊断程序原因.统计程序运行数据,是大型软件系统必不可少的组件之一.glog 是google的开源日志系统,相比较log4系列的日志系统,它更加轻巧灵活. 在Github上下载glog,解压 ...
- Windows下python3生成UTF8的CSV文件和sha256sum踩坑记录
CSV的坑 在Ubuntu下是简单的写入完事 import csv ... with open(filename, 'w') as output: f = csv.writer(output) f.w ...
- MATLAB 程序处理结果出现 NAN 问题
1)0/0 或者说 任意常数/0 也就是0不能做分母. (nan出现的情况绝大部分是分母出现0了) 若分子为0的情况,(分母不为0),结果也应该是0而非 NAN. 2)如果是 无穷大比无穷大 ...
- android mat 转 bitmap
Bitmap bmp = null; Mat tmp = new Mat (height, width, CvType.CV_8U, new Scalar(4)); try { //Imgproc.c ...
- 批量替换存储过程内容脚本sp_SqlReplace
开始 在数据库开发过程中,如果某一个表字段名被重命名.那么在使用到该字段的存储过程,对应的表字段名也要修改. 当存在多个存储都有使用该表字段,需要逐个去修改替换,是一件比较繁琐的事情,我们需要一个能实 ...
- Google I/O 官方应用中的动效设计
版权声明:本文为博主原创文章,未经博主同意不得转载. https://blog.csdn.net/jILRvRTrc/article/details/82881743 作者:Nick Butcher, ...