sendmail 4984 r25984: from=apache,size=273,class=0,nrcpts=1,
msgid=<201.r25@localhost.localdomain>,relay=apache@localhost
sendmail 4985 r25985: ruleset=check_mail,
arg1=,relay=mydomain.com [127.0.0.1],
reject=553 5.5.4 … Real domain name
required for sender address
sendmail 4984 r25984:
to=external@server.com,ctladdr=apache (48/48),delay=00:00:01,
xdelay=00:00:00,mailer=relay,pri=30273,relay=[127.0.0.1]
[127.0.0.1],dsn=5.6.0,stat=Data format error
sendmail 4984
r25984: r25984: DSN: Data format error
只要logrotate出现问题,cron就可以向external@server.com发送电子邮件.我不确定为什么php无法这样做.我尝试使用以下命令更改`sendmail.mc中的默认配置:
MASQUERADE_AS(`mydomain.com')dnl FEATURE(masquerade_envelope)dnl FEATURE(masquerade_entire_domain)dnl MASQUERADE_DOMAIN(localhost)dnl MASQUERADE_DOMAIN(localhost.localdomain)dnl MASQUERADE_DOMAIN(mycom)dnl
但是,它似乎没有任何影响.已经设置了php邮件功能中地址的标题.我还确保启用了SELinux httpd_can_sendmail.我还需要做些什么才能收到邮件?
解决方法
127.0.0.1 www.mydomain.com test.mydomain.com 127.0.0.1 cdn.mycdn.com 127.0.0.1 localhost.localdomain localhost myserver.com
我需要的是将myserver.com放在localhost.localdomain的前面,以便sendmail认为它使用真实域发送电子邮件.
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。