我正在使用 php mail() 函数,但没有收到任何电子邮件:(debian,sendmail)
这是 mail.log
Jan 26 18:00:37 sd-45956 sendmail[3918]: s0QH0bRO003918: from=www-data, size=116, class=0, nrcpts=1, msgid=<[email protected]>, relay=www-data@localhost
Jan 26 18:00:37 sd-45956 sm-mta[3919]: s0QH0bOw003919: from=<[email protected]>, size=379, class=0, nrcpts=1, msgid=<[email protected]>, proto=ESMTP, daemon=MTA-v4, relay=haveameet.com [127.0.0.1]
Jan 26 18:00:37 sd-45956 sendmail[3918]: s0QH0bRO003918: [email protected], ctladdr=www-data (33/33), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30116, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (s0QH0bOw003919 Message accepted for delivery)
Jan 26 18:00:38 sd-45956 sm-mta[3921]: s0QH0bOw003919: to=<[email protected]>, ctladdr=<[email protected]> (33/33), delay=00:00:01, xdelay=00:00:01, mailer=esmtp, pri=120379, relay=smtp4.laposte.net. [193.251.214.113], dsn=5.6.0, stat=Data format error
Jan 26 18:00:38 sd-45956 sm-mta[3921]: s0QH0bOw003919: s0QH0cOw003921: DSN: Data format error
Jan 26 18:00:38 sd-45956 sm-mta[3921]: s0QH0cOw003921: to=<[email protected]>, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=30000, dsn=2.0.0, stat=Sent
有办法解决这个问题吗?我尝试修改 /etc/hosts,但没有效果
我尝试更改 /etc/hosts
到 127.0.0.1 haveameet.com
现在我得到:
Jan 26 20:09:33 sd-45956 sendmail[5642]: s0QJ9XXK005642: from=www-data, size=116, class=0, nrcpts=1, msgid=<[email protected]>, relay=www-data@localhost
Jan 26 20:09:33 sd-45956 sm-mta[5643]: s0QJ9Xpd005643: ruleset=check_rcpt, arg1=<[email protected]>, relay=haveameet.com [127.0.0.1], reject=553 5.1.8 <[email protected]>... Domain of sender address [email protected] does not exist
Jan 26 20:09:33 sd-45956 sendmail[5642]: s0QJ9XXK005642: [email protected], ctladdr=www-data (33/33), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30116, relay=[127.0.0.1] [127.0.0.1], dsn=5.1.8, stat=User unknown
Jan 26 20:09:33 sd-45956 sm-mta[5643]: s0QJ9Xpd005643: from=<[email protected]>, size=116, class=0, nrcpts=0, proto=ESMTP, daemon=MTA-v4, relay=haveameet.com [127.0.0.1]
Jan 26 20:09:33 sd-45956 sendmail[5642]: s0QJ9XXK005642: s0QJ9XXL005642: DSN: User unknown
Jan 26 20:09:33 sd-45956 sm-mta[5643]: s0QJ9Xpf005643: from=<>, size=2340, class=0, nrcpts=1, msgid=<[email protected]>, proto=ESMTP, daemon=MTA-v4, relay=haveameet.com [127.0.0.1]
Jan 26 20:09:33 sd-45956 sendmail[5642]: s0QJ9XXL005642: to=www-data, delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=31140, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (s0QJ9Xpf005643 Message accepted for delivery)
Jan 26 20:09:33 sd-45956 sm-mta[5645]: s0QJ9Xpf005643: to=<[email protected]>, delay=00:00:00, xdelay=00:00:00, mailer=esmtp, pri=122340, relay=62-210-238-225.online.net, dsn=5.1.2, stat=Host unknown (Name server: 62-210-238-225.online.net: host not $
Jan 26 20:09:33 sd-45956 sm-mta[5645]: s0QJ9Xpf005643: s0QJ9Xpd005645: postmaster notify: Host unknown (Name server: 62-210-238-225.online.net: host not found)
Jan 26 20:09:33 sd-45956 sm-mta[5645]: s0QJ9Xpd005645: to=bourlier, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=30000, dsn=2.0.0, stat=Sent
多谢
答案1
它说的是‘DSN’错误,而不是‘DNS’。
更改/etc/hostname
为 以外的其他名称localhost
。您正在连接的邮件服务器不喜欢您的机器的名称。