linux安装mail并发邮件到163邮箱
转载1. 开启smtp服务
登录网易邮箱 https://mail.163.com/ 开启服务,设置授权密码并记录
2. 安装
[root@localhost ~]# yum install mailx
3.修改配置文件
[root@localhost ~]# vim /etc/mail.rc #修改如下
set from=xxxx@163.com
set smtp=smtps://smtp.163.com:465
set smtp-auth-user=xxxx@163.com
set smtp-auth-password=xxxxx
set smtp-auth=login
set ssl-verify=ignore
set nss-config-dir=/root/.certs
--说明
from:对方收到邮件时显示的发件人
smtp:指定第三方发邮件的smtp服务器地址,云服务器必须使用465端口默认25端口被禁用
set smtp-auth-user:第三方发邮件的用户名
set smtp-auth-password: 邮箱的授权码注意不是密码
smtp-auth:SMTP的认证方式,默认是login,也可以改成CRAM-MD5或PLAIN方式
set ssl-verify: 使用证书,也就是用465端口
nss-config-dir: 证书存放的目录
4. 生成证书
[root@localhost ~]# mkdir -p /root/.certs/
[root@localhost ~]# echo -n | openssl s_client -connect smtp.qq.com:465 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > ~/.certs/163.crt
5. 添加证书到证书数据库
[root@localhost ~]# certutil -A -n "GeoTrust SSL CA" -t "C,," -d ~/.certs -i ~/.certs/163.crt
[root@localhost ~]# certutil -A -n "GeoTrust Global CA" -t "C,," -d ~/.certs -i ~/.certs/163.crt
6. 信任证书
[root@localhost ~]# cd /root/.certs/
[root@localhost ~]# certutil -A -n "GeoTrust SSL CA - G3" -t "Pu,Pu,Pu" -d ~/.certs/./ -i 163.crt
7. 发送邮件
[root@localhost ~]# mail -s "标题" 邮箱
记录工作中的一下问题
本文章为转载内容,我们尊重原作者对文章享有的著作权。如有内容错误或侵权问题,欢迎原作者联系我们进行内容更正或删除文章。
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
linux系统利用mail命令163邮箱发送邮件
在linux下面利用163邮箱发送邮件
命令 mail 发送邮件 -
linux 发送邮件到163或者QQ邮箱
linux 发送邮件到163或者QQ邮箱我想,在开始发送邮件前有些概念需要理解,这样可能对后面的学习会有所帮助。POP3是Post O
linux 数据库 java centos nginx -
linux之mail命令发邮件
讲一下如何使用mail命令发邮件,这个命令平时使用的不多,但是还是建议大家了解一下。下面给大家讲讲mail命令的用法。
linux mail 邮件 发邮件 标识符