添加链接描述1,大家都知道,阿里云一般禁用25端口,那我们如何使用阿里云服务器 发送邮件? 2,开启邮件ssl端口465,在安全组开启。 3,在腾讯邮件里面设置如下 4,在服务器上配置 关闭其它的邮件工具
service sendmail stop chkconfig sendmail off service postfix stop chkconfig postfix off安装mailx 阿里云默认已经安装
yum install mailx -y请求qq邮箱数字证书
mkdir -p /root/.certs/ echo -n | openssl s_client -connect smtp.qq.com:465 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > ~/.certs/qq.crt //向qq请求证书 certutil -A -n "GeoTrust SSL CA" -t "C,," -d ~/.certs -i ~/.certs/qq.crt //添加一个SSL证书到证书数据库中 certutil -A -n "GeoTrust Global CA" -t "C,," -d ~/.certs -i ~/.certs/qq.crt //添加一个Global 证书到证书数据库中 certutil -A -n "GeoTrust SSL CA - G3" -t "Pu,Pu,Pu" -d ~/.certs/./ -i qq.crt //使证书被信任 成功返回结果:Notice: Trust flag u is set automatically if the private key is present. certutil -L -d /root/.certs //列出目录下证书配置/etc/mail.rc
set from=1195257477@qq.com set smtp=smtps://smtp.qq.com:465 set smtp-auth-user=1195257477@qq.com set smtp-auth-password=xxxx #授权码 set smtp-auth=login set ssl-verify=ignore set nss-config-dir=/root/.certs发送邮件测试 echo “hello,world” | mail -s “测试邮件” 610323566@qq.com 阿里云优惠券
参考0号
参考1号
参考2号
