使用Sendmail向QQ邮箱发送邮件被拒
1、安装sendmail
yum -y install sendmail mailx
2、开启服务器
systemctl start sendmail
查看状态
systemctl start sendmail
3、发送163邮箱测试
echo 'This is test mail' | mail -s 'test' ******@163.com
然后到邮箱查看,能够正常收到

4、发送到qq邮箱测试
echo 'This is test mail' | mail -s 'test' ******@qq.com
到邮箱查看无法收到邮件
5、查找log,发现Service unavailable和DSN: Service unavailable有问题
tail /var/log/maillog
Aug 20 23:45:32 localhost sendmail[5457]: v7KFjW6b005457: from=<root@localhost.localdomain>, size=494, class=0, nrcpts=1, msgid=<201708201545.v7KFjWKY005455@localhost.localdomain>, proto=ESMTP, daemon=MTA, relay=localhost [127.0.0.1]
Aug 20 23:45:33 localhost sendmail[5455]: v7KFjWKY005455: to=*****@qq.com, ctladdr=root (0/0), delay=00:00:01, xdelay=00:00:01, mailer=relay, pri=30230, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (v7KFjW6b005457 Message accepted for delivery)
Aug 20 23:45:33 localhost sendmail[5459]: STARTTLS=client, relay=mxdomain.qq.com., version=TLSv1/SSLv3, verify=FAIL, cipher=AES128-SHA256, bits=128/128
Aug 20 23:45:33 localhost sendmail[5459]: v7KFjW6b005457: to=<*****@qq.com>, ctladdr=<root@localhost.localdomain> (0/0), delay=00:00:01, xdelay=00:00:00, mailer=esmtp, pri=120494, relay=mxdomain.qq.com. [112.90.83.115], dsn=5.0.0, stat=Service unavailable
Aug 20 23:45:33 localhost sendmail[5459]: v7KFjW6b005457: v7KFjX6b005459: DSN: Service unavailable
Aug 20 23:45:33 localhost sendmail[5459]: v7KFjX6b005459: to=<root@localhost.localdomain>, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=31735, dsn=2.0.0, stat=Sent
使用mail命令查看邮件,发现“550 Mail content denied”
[root@localhost ~]# mail

6、找到腾讯帮助,给出的“外域入信失败原因”解释
550 Mail content denied
出错原因:该邮件内容涉嫌大量群发,并且被多数用户投诉为垃圾邮件。
对于具有群发性质的邮件,如果出现用户普遍表示反感或集中投诉的情况,腾讯邮箱将禁止类似此邮件内容继续发送。
改善建议:
如果您是此群发邮件的管理员,请停止群发对用户造成骚扰的广告及推广类邮件。
如果您是个人邮箱用户,请向您的电子邮件提供商报告此情况。
7、解决方法:
在qq邮箱"设置" --> "发垃圾" --> "添加到白名单"中
在重新发送test邮件,就可以正常接收Sendmail发送的邮件了;

