1)邮件发送示例

方法1:echo "This is a test mail" | mail -s '邮件测试' 452666750@qq.com
方法2:mail -s '服务运行报告' 452666750@qq.com < /root/messages.txt

2)网易邮箱证书申请

mkdir /root/.certs
echo -n | openssl s_client -connect smtp.163.com:465 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > ~/.certs/163.crt
certutil -A -n "GeoTrust Global CA" -t "C,," -d ~/.certs -i ~/.certs/163.crt
certutil -A -n "GeoTrust SSL CA" -t "C,," -d ~/.certs -i ~/.certs/163.crt
certutil -L -d /root/.certs
certutil -A -n "GeoTrust SSL CA - G3" -t "Pu,Pu,Pu" -d ~/.certs/ -i ~/.certs/163.crt

3)网易邮箱配置示例

set ssl-verify="ignore"
set smtp-auth="login"
set from="mds302587@163.com"
set smtp="smtps://smtp.163.com:465"
set smtp-auth-user="mds302587@163.com"
set smtp-auth-password="djbhbhyhzedfcaij"
set nss-config-dir="/root/.certs"

4)QQ邮箱证书申请

mkdir /root/.certs
echo -n | openssl s_client -connect smtp.qq.com:465 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > ~/.certs/qq.crt
certutil -A -n "GeoTrust Global CA" -t "C,," -d ~/.certs -i ~/.certs/qq.crt
certutil -A -n "GeoTrust SSL CA" -t "C,," -d ~/.certs -i ~/.certs/qq.crt
certutil -L -d /root/.certs
certutil -A -n "GeoTrust SSL CA - G3" -t "Pu,Pu,Pu" -d ~/.certs/ -i ~/.certs/qq.crt

5)QQ邮箱配置示例

set ssl-verify="ignore"
set smtp-auth="login"
set from="452666750@qq.com"
set smtp="smtps://smtp.qq.com:465"
set smtp-auth-user="452666750@qq.com"
set smtp-auth-password="djbhbhyhzedfcaij"
set nss-config-dir="/root/.certs"

6)阿里邮箱证书申请

mkdir /root/.certs
echo -n | openssl s_client -connect smtp.aliyun.com:465 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > ~/.certs/ali.crt
certutil -A -n "GeoTrust Global CA" -t "C,," -d ~/.certs -i ~/.certs/ali.crt
certutil -A -n "GeoTrust SSL CA" -t "C,," -d ~/.certs -i ~/.certs/ali.crt
certutil -L -d /root/.certs
certutil -A -n "GeoTrust SSL CA - G3" -t "Pu,Pu,Pu" -d ~/.certs/ -i ~/.certs/ali.crt

7)阿里邮箱配置示例

set ssl-verify="ignore"
set smtp-auth="login"
set from="mds302587@aliyun.com"
set smtp="smtps://smtp.aliyun.com:465"
set smtp-auth-user="mds302587@aliyun.com"
set smtp-auth-password="djbhbhyhzedfcaij"
set nss-config-dir="/root/.certs"

8)邮件发送总结

1、配置hosts映射、并安装Postfix服务、安装完成以后在 /etc/postfix/main.cf 配置文件当中进行相应的参数修改

2、安装mailx工具、它用来发送邮件

3、按照上面申请示例、在可以访问外网的服务器上申请证书即可、配置基本一样、可以直接复制粘贴

3、申请完证书以后、编辑 /etc/mail.rc 配置文件、将上面的配置示例添加到底部即可、配置示例均为发件人

4、mail.rc 这个配置文件、只有安装了mailx 工具之后才有

【只是为了打发时间】

CentOS使用465端口发送邮件的更多相关文章

  1. centos上mailx通过465端口发送邮件

    最近在看zabbix发送邮件的时候,发现自己的邮件总是无法发送,这里可能是外网防火墙禁止25端口,那么如何绕过25端口呢?  我使用的是163邮箱的TSL加密协议465端口 由于mailx基本配置很简 ...

  2. 阿里云 Linux 启用465端口发送邮件

    阿里云 Linux 启用465端口发送邮件 环境:阿里云 Linux Centos 7.4 x64 注:阿里云默认禁用25邮件端口,需要启动465端口加密进行邮件发送. 注:确保邮箱开启SMTP服务, ...

  3. jumpservice使用465端口发送邮件

    阿里云.华为云等云服务器默认屏蔽掉了25端口后,内网服务器如何通过跳板机发送邮件到外网邮箱. 如果是可联网的阿里云机器,可以直接配置mailx使用465端口发送邮件.需要进行ssl验证配置. Cent ...

  4. Spring Boot 使用465端口发送邮件

    2017年10月27日 15:04:24 伊宇紫 阅读数:2710 标签: 465端口邮件springboot 更多 个人分类: Java   版权声明:本文为博主原创文章,未经博主允许不得转载. h ...

  5. java 465端口发送邮件

    package com.fr.function; import java.io.IOException; import java.security.Security; import java.util ...

  6. python3使用465端口发送邮件来解决阿里云封闭25端口问题

    import smtplibfrom email.mime.text import MIMETextfrom email.utils import formataddr #发件人邮箱账号my_send ...

  7. mailx使用465端口发邮件

    centos上mailx通过465端口发送邮件   最近在看zabbix发送邮件的时候,发现自己的邮件总是无法发送,这里可能是外网防火墙禁止25端口,那么如何绕过25端口呢?  我使用的是163邮箱的 ...

  8. 使用JavaMail发送邮件,465端口开启ssl加密传输

    package com.wangxin.test; import java.security.Security; import java.util.Date; import java.util.Pro ...

  9. 阿里云ECS屏蔽25端口,官方建议使用465 SSL端口发送邮件

    阿里云ECS  VPC网络,搭建了zabbix,想通过三方邮件系统发送邮件,本机开虚拟机测试发邮件一切正常,到阿里ECS的时候邮件各种发不出去,到处找原因,最后度娘告诉了我真想,原来阿里把25端口屏蔽 ...

随机推荐

  1. Antd组件库使用方法

    零.介绍: Ant design,是阿里巴巴的蚂蚁金服公司设计的一套适应用于web端和移动端网页的Ui组件库,组件好看,非常适合React框架使用. 官网:https://ant.design/ind ...

  2. Go Web 编程之 程序结构

    概述 一个典型的 Go Web 程序结构如下,摘自<Go Web 编程>: 客户端发送请求: 服务器中的多路复用器收到请求: 多路复用器根据请求的 URL 找到注册的处理器,将请求交由处理 ...

  3. 【转】13个JavaScript图表(JS图表)图形绘制插件

    现在网络上又有越来越多的免费的(JS 图表)JavaScript图表图形绘制插件.我之前给一家网站做过复杂的图形,我们用的是 highchart.在那段时间,没有很多可供选择的插件.但现在不同了,很容 ...

  4. 【C_Language】---C语言const用法总结

    C语言关键字const相信对于不少C语言新手是既陌生又熟悉的,好像经常见,但是却不知道为何用,怎么用?学习至此,总结一下const的用法,使用程序来帮助你理解该关键字,希望能帮到像我一样的新手. 我看 ...

  5. dp-完全背包

    (  推荐 : http://blog.csdn.net/insistgogo/article/details/11081025 ) 问题描述 : 已知一个容量为 V 的背包 和 N 件物品 , 第 ...

  6. 深入理解es6中的Promise

    https://www.jianshu.com/p/9e4af5b77253 https://zhuanlan.zhihu.com/p/30797777 https://segmentfault.co ...

  7. 轻松弄懂var、let、const之间的区别

    ECMAScript 6(简称ES6)是JavaScript语言的下一代标准,于2015年6月正式发布,也称ECMAScript 2015. ES6的好处 ES6的出现为我们前端带来了很多方便之处,以 ...

  8. iocp性能分析

    网络上找iocp性能分析的文章很少,因工作关系,花了点时间特意从客观数据和理论角度分析了下iocp的性能 环境 CPU i7 4核8线程 1G网卡,echo方式测试(一个客户机模拟多个客户端模式,模拟 ...

  9. [分块][bitset][RMQ]区间

    源自 ditoly 大爷的 FJ 省队集训模拟赛题 Statement 给定一个长度为 \(n\) 的序列 \(a\) ,有 \(m\) 次询问 每次询问给出一个 \(k\) ,再给出 \(k\) 个 ...

  10. Windows10 java环境配置

    1.下载 JDK 下载地址:https ://www.oracle.com/technetwork/java/javase/downloads/index-jsp-138363.html 点击下载按钮 ...