smtps方式发送邮件

#!/bin/bash
#由于公司邮箱迁移至集团的exchange,无法继续使用auth login方式发送邮件,使用smtps方式
#需要安装python 扩展模块,如下:
#sendmail@xxxxxxx.com.cn帐号因为安全审计要求,每3个月要强制修改密码
wget http://downs.xxxxx.cn:8080/pub/cpanm -O /sbin/cpanm
chmod +x /sbin/cpanm
perldoc -l Net::SMTP |xargs rm
cpanm Net::SMTPS
echo “SMTPS:”
perldoc -l Net::SMTPS
if [ $? == 0 ];then
echo “Python SMTPS install OK”
#邮件可以发送了
#perl /usr/local/fast_glb/bin/mailreport.pl -f ‘sendmail@xxxxxxx.com.cn’ -t ‘xxx@xxxxxxx.com.cn’ -s ‘mail.xxxxxxx.cn’ -m ‘201801041132’ -x /etc/hosts
fi

Print Friendly

发表评论

电子邮件地址不会被公开。 必填项已用*标注