linux真实地址是什么意思,linux – 如何为发件人地址配置真实域名

我尝试使用PHP mail()函数发送电子邮件,但它以某种方式失败,抱怨需要一个真正的域名.在maillog中观察到以下情况:

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.我还需要做些什么才能收到邮件?

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值