400字范文,内容丰富有趣,生活中的好帮手!
400字范文 > 阿里云ECS发送邮件到腾讯企业邮箱

阿里云ECS发送邮件到腾讯企业邮箱

时间:2018-12-18 06:53:55

相关推荐

阿里云ECS发送邮件到腾讯企业邮箱

1、安装软件

yum install mailx

yum install sendmail

2、配置

vim /etc/mail.rc在文件最后加上如下内容:

set smtp=smtps://smtp.:465 #邮箱服务器地址

set from=xxxx@#发送邮件的来源

set smtp-auth-user=xxxx@ #用户名

set smtp-auth-password=xxxx #密码

set nss-config-dir=/etc/pki/nssdb/ #证书位置

set ssl-verify=ignore

set smtp-auth=login

3、配置证书

mkdir -p /etc/pki/nssdb/

cd /etc/pki/nssdb

#生成证书

echo -n | openssl s_client -connect :465 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > /etc/pki/nssdb/qq.crt

certutil -A -n "GeoTrust SSL CA" -t "C,," -d /etc/pki/nssdb/ -i /etc/pki/nssdb/qq.crt

certutil -A -n "GeoTrust Global CA" -t "C,," -d /etc/pki/nssdb/ -i /etc/pki/nssdb/qq.crt

certutil -L -d /etc/pki/nssdb/

certutil -A -n "GeoTrust SSL CA - G3" -t "Pu,Pu,Pu" -d ./ -i qq.crt #认证

4、测试发送邮件

echo "this email come from centos"|mail -v -s "zabbix" xxx@

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。