无法使用php mail()接收sendmail退回邮件

时间:2011-07-08 10:23:46

标签: php

我正在使用php mail()功能向收件人发送邮件

$to = "recipient@example.com"; 
$subject = "Subject";
$message = "This is a message from our website to say thank you";
$headers = "From: sender@example.com \r\nReply-To: sender@example.com\r\nReturn-Path: sender@example.com\r\n";
$additional = "-rsender@example.com"; 
//(have also tried -fsender@example.com in $additional)

mail($to, $subject, $message, $headers,$additional); 

它没有将退回的邮件发送到sender@example.com。我检查了日志(/var/mail/mail.log),可以找到下面的

  

Jul 8 15:38:21 aspire680 sendmail [15850]:p68A8Lpl015850:to = recipient @ example.com,ctladdr = sender @ example.com(33/33),delay = 00:00:00,xdelay = 00 :00:00,mailer = relay,pri = 30279,relay = [127.0.0.1] [127.0.0.1],dsn = 2.0.0,stat = Sent(p68A8LVH015852消息接受发送)

     

Jul 8 15:38:21 aspire680 sm-mta [15854]:p68A8LVH015852:to =,delay = 00:00:00,xdelay = 00:00:00,mailer = esmtp,pri = 120589,relay = mail .aspiresys.com。 [192.168.0.3],dsn = 5.1.1,stat =用户未知

     

Jul 8 15:38:22 aspire680 sm-mta [15854]:p68A8LVH015852:p68A8MVH015854:DSN:用户不明的

  7月8日15:38:22 aspire680 sm-mta [15854]:p68A8MVH015854:to =,
delay = 00:00:00,xdelay = 00:00:00,mailer = esmtp,pri = 30000,relay = mail.aspiresys.com。 [192.168.0.3],dsn = 5.1.1,stat =用户未知
  7月8日15:38:22 aspire680 sm-mta [15854]:p68A8MVH015854:p68A8MVI015854:返回发件人:用户不明确

  7月8日15:38:22 aspire680 sm-mta [15854]:p68A8MVI015854:to = root,delay = 00:00:00,xdelay = 00:00:00,mailer = local,pri = 30000,dsn = 2.0.0 ,stat =已发送

明确表示已将退回邮件发送至sender@example.com,因为recipient@example.com不存在,但我没有收到任何邮件。我在这里遗漏了什么或者可能是什么问题。请指教。

0 个答案:

没有答案