标题:
CentOS6使用mailx(使用新浪邮箱的465端口)
[打印本页]
作者:
admin
时间:
2019-9-4 09:39
标题:
CentOS6使用mailx(使用新浪邮箱的465端口)
实验中,操作系统的版本信息: [root@localhost ~]# cat /etc/redhat-release CentOS release 6.9 (Final) [root@localhost ~]# [root@localhost ~]# uname -r 2.6.32-696.el6.x86_64 安装发送邮件的软件包mailx可参考:
CentOS6使用mailx(使用新浪邮箱的25端口)
查看已安装的mailx的版本: [root@localhost ~]# rpm -q
mailx
mailx-
12.4-10.el6_10.x86_64
创建目录,用来存放证书: [root@localhost ~]# mkdir -p
/root/.certs
向新浪请求证书: [root@localhost ~]# echo -n | openssl s_client -connect smtp.sina.com:465 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > ~/.certs/
zhuohua.crt
depth=2 C = US, O = DigiCert Inc, OU = www.digicert.com, CN = DigiCert Global Root CA verify return:1 depth=1 C = US, O = DigiCert Inc, OU = www.digicert.com, CN = GeoTrust CN RSA CA G1 verify error:num=9:certificate is not yet valid notBefore=Jun 20 12:27:58 2019 GMT verify return:0 DONE
[root@localhost ~]# [root@localhost ~]# ls /root/.certs
zhuohua.crt
[root@localhost ~]# 添加证书到证书数据库中: [root@localhost ~]# certutil -A -n "GeoTrust SSL CA" -t "C,," -d ~/.certs -i ~/.certs/zhuohua.crt [root@localhost ~]# certutil -A -n "GeoTrust Global CA" -t "C,," -d ~/.certs -i ~/.certs/zhuohua.crt [root@localhost ~]# certutil -A -n "GeoTrust SSL CA - G3" -t "Pu,Pu,Pu" -d ./ -i ~/.certs/zhuohua.crt
Notice: Trust flag u is set automatically if the private key is present.
[root@localhost ~]# ls /root/.certs
cert8.db key3.db secmod.db
zhuohua.crt [root@localhost ~]# 修改mailx的配置文件:(使用新浪邮箱的465端口) cat >/etc/mail.rc<< eof set from=j2270168881@sina.com set smtp=smtps://smtp.sina.com:
465
set smtp-auth-user=j2270168881 set smtp-auth-password=
授权码
set smtp-auth=login set smtp-user-starttlsset ssl-verify=ignore set nss-config-dir=
/root/.certs
eof 发送测试邮件: [root@localhost ~]# echo "Hello." | mail -s "Title" 2270168xxx@qq.com 笺注: 1. 阿里云服务器不允许使用TCP 25端口,但可以用TCP 465端口; 2. 新浪邮箱发送这种邮件后,在“已发送”里是没有记录的; 3. 实验中,QQ邮箱接收邮件正常; 相关文章:
使用新浪邮箱的465端口发送邮件报错(535 authentication failed)
使用Shell脚本监控本机的CPU、内存、分区的使用率
使用Shell脚本监控本机的服务运行状态
CentOS6_通过脚本发送Zabbix告警邮件(使用新浪邮箱的465端口)
################################# #################################
亲,学习研究也要劳逸结合哦,来我微店逛逛,买点东西好好犒劳犒劳自己和家人吧^_^^_^
FaSoLa免磨陶瓷刀具 抗氧化厨房切菜刀水果刀切肉刀 寿命长
下载
(501.34 KB)
2019-10-2 09:29
【宝家洁】喷雾喷水拖把平板拖把大号 高档木地板除尘 不用手洗的创意拖把 懒人必备
下载
(558.72 KB)
2019-10-2 09:29
薇语馨 (促销价)6833#夏季新款收腰显瘦蝙蝠袖露肩复古雪纺连衣裙波浪裙子邻家女孩 好质量 支持无理由退货
下载
(672.71 KB)
2019-10-2 09:29
薇语馨1852真丝连衣裙套装裙两件套系带宽松大码不规则裙子女
下载
(278.13 KB)
2019-10-2 09:29
图片附件:
danyi.png
(2019-10-2 09:29, 278.13 KB) / 下载次数 89
http://blog.zhuohua.store/attachment.php?aid=1903&k=b8f867ae7d46ac4d19d7e974af87aaa1&t=1714823145&sid=MyI9xG
图片附件:
dao.png
(2019-10-2 09:29, 501.34 KB) / 下载次数 80
http://blog.zhuohua.store/attachment.php?aid=1904&k=42dee7d37d174e941809478182c19ea7&t=1714823145&sid=MyI9xG
图片附件:
duoyi.png
(2019-10-2 09:29, 672.71 KB) / 下载次数 83
http://blog.zhuohua.store/attachment.php?aid=1905&k=cc6175999047c88e66ce12a6c76cb730&t=1714823145&sid=MyI9xG
图片附件:
tuoba.png
(2019-10-2 09:29, 558.72 KB) / 下载次数 84
http://blog.zhuohua.store/attachment.php?aid=1906&k=f686fca9f25a5d7011ba420c320af31e&t=1714823145&sid=MyI9xG
欢迎光临 blog.zhuohua.store (http://blog.zhuohua.store/)
Powered by Discuz! 7.2