linux下设置smtp发送163邮件

之前公司每日报告是通过qq邮箱发送的,最近每天晚上发送邮件时,smtp.qq.com总出问题,决定换到126上

1.126邮箱默认不开启smtp服务,需要在网页端开启,期间有个手机验证

linux下设置smtp发送163邮件_第1张图片

注意等下SMTP配置的密码为客户端授权密码

2.修改/etc/mail.rc

在文件尾部添加这些内容

set [email protected] 

smtp=smtp.domain.comset

smtp-auth-user=username

smtp-auth-password=passwordset 

smtp-auth=login

3.测试邮件发送

echo “masdssdfxxxvi /etc/mail.rcnt”|mail -s ttttttt [email protected]

发送的邮件标题为tttttt,内容为masdssdfxxxvi /etc/mail.rcnt


另外可以通过FOXMAIL测试邮件能否SMTP

新建账号,手工设置

linux下设置smtp发送163邮件_第2张图片

POP和SMTP配置如下

linux下设置smtp发送163邮件_第3张图片


报错以及处理:

smtp-server: 554 DT:SPM 126 smtp1,C8mowECp+0o_E+lW7i9GAA--.3926S2 1458115391,please see http://mail.163.com/help/help_spam_16.htm?ip=124.193.125.30&hostid=smtp1&time=1458115391


查了下554 DT:SPM 126  为被服务器垃圾邮件屏蔽

因为发送邮件的标题为test

linux下设置smtp发送163邮件_第4张图片


你可能感兴趣的:(运维)