CentOS使用465端口发送邮件
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端口发送邮件的更多相关文章
- centos上mailx通过465端口发送邮件
最近在看zabbix发送邮件的时候,发现自己的邮件总是无法发送,这里可能是外网防火墙禁止25端口,那么如何绕过25端口呢? 我使用的是163邮箱的TSL加密协议465端口 由于mailx基本配置很简 ...
- 阿里云 Linux 启用465端口发送邮件
阿里云 Linux 启用465端口发送邮件 环境:阿里云 Linux Centos 7.4 x64 注:阿里云默认禁用25邮件端口,需要启动465端口加密进行邮件发送. 注:确保邮箱开启SMTP服务, ...
- jumpservice使用465端口发送邮件
阿里云.华为云等云服务器默认屏蔽掉了25端口后,内网服务器如何通过跳板机发送邮件到外网邮箱. 如果是可联网的阿里云机器,可以直接配置mailx使用465端口发送邮件.需要进行ssl验证配置. Cent ...
- Spring Boot 使用465端口发送邮件
2017年10月27日 15:04:24 伊宇紫 阅读数:2710 标签: 465端口邮件springboot 更多 个人分类: Java 版权声明:本文为博主原创文章,未经博主允许不得转载. h ...
- java 465端口发送邮件
package com.fr.function; import java.io.IOException; import java.security.Security; import java.util ...
- python3使用465端口发送邮件来解决阿里云封闭25端口问题
import smtplibfrom email.mime.text import MIMETextfrom email.utils import formataddr #发件人邮箱账号my_send ...
- mailx使用465端口发邮件
centos上mailx通过465端口发送邮件 最近在看zabbix发送邮件的时候,发现自己的邮件总是无法发送,这里可能是外网防火墙禁止25端口,那么如何绕过25端口呢? 我使用的是163邮箱的 ...
- 使用JavaMail发送邮件,465端口开启ssl加密传输
package com.wangxin.test; import java.security.Security; import java.util.Date; import java.util.Pro ...
- 阿里云ECS屏蔽25端口,官方建议使用465 SSL端口发送邮件
阿里云ECS VPC网络,搭建了zabbix,想通过三方邮件系统发送邮件,本机开虚拟机测试发邮件一切正常,到阿里ECS的时候邮件各种发不出去,到处找原因,最后度娘告诉了我真想,原来阿里把25端口屏蔽 ...
随机推荐
- vue 项目使用JSbrideg.js与app通信
一.建立JSbrideg.js文件 var jsBridge = { isAndroid: null, isIOS: null, callHandlerFunc: functi ...
- String类方法的使用
String类的判断功能: boolean equals(Object obj) //比较字符串内容是否相同(区分大小写). boolean equalsIgnoreCase(String str) ...
- ABA问题怎么解:AtomicStampedReference和AtomicMarkableReference
本博客系列是学习并发编程过程中的记录总结.由于文章比较多,写的时间也比较散,所以我整理了个目录贴(传送门),方便查阅. 并发编程系列博客传送门 并发编程的基石--CAS机制这篇文章中介绍到CAS机制有 ...
- 如何利用Map2Shp进行快速格式转换
有时,用户仅需要进行GIS数据格式的简单转换,对文字注记.制图表达.投影信息无特别要求,可进行快速格式转换.做为MapGIS文件与Shape文件间的格式转换工具,Map2Shp软件操作过程十分简单,只 ...
- 搭建自己的Online Judge
前言 很多人对于做题有点厌烦,但是,如果让你出题给别人做那么可能会很有意思.可是,出题只能出在一些别人的OJ上,甚至只能在自己的Word文档里出.今天我教大家一个厉害点的,叫做搭建自己的Online ...
- 史上最简约的vi教程,复制和粘贴
上一篇博客,讲了"新手"如何"入门"vi,解决了"两眼一抹黑"的情况.知道在vi下如何进行基本的操作,如部署在Linux下的项目,修改配置文 ...
- Java框架之MyBatis 06-全局配置-mapper映射-分步查询
MyBatis MyBatis是Apache的一个开源项目iBatis, iBatis一词来源于“internet”和“abatis”的组合,是一个基于Java的持久层框架. iBatis 提供的持 ...
- idea初使用之自动编译
原文地址:https://blog.csdn.net/diaomeng11/article/details/73826564/ 因为公司需要,方便使用框架以及代码整合,使用同一开发集成环境idea,因 ...
- MVC 记录
ASP.NET MVC框架提供了一个帮助我们构造Html元素的类:TagBuilder ps url cnblogs.com/yibinboy/articles/5187682.html HttpRu ...
- MEF sample
博客里介绍ntier 基于这个框架有一个叫WAF的示例项目. 看 waf(WPF Application Framework)里面这样有句 不是很懂, This page might help you ...