为什么postfix不遵循从PHP邮件的头();

我已经安装了没有configuration选项的后缀

我试图发送电子邮件PHP邮件(); 它工作,但它发送电子邮件与我的专用服务器的默认电子邮件。

有反正告诉后缀跟随邮件function设置的标题?

谢谢

$from='[email protected]'; $fromname='my Website'; mail($mailto,$subject,$text,'From: ' . $fromname . ' <'.$from.'>'); 

尝试使用-f和-r附加参数分别覆盖from标题和返回path。

 mail( $mailto, $subject, $text, "From: " . $fromname . " <".$from.">", "-f $from -r [email protected]"); 

从后缀sendmail手册页:

  -f sender Set the envelope sender address. This is the address where delivery problems are sent to. With Postfix versions before 2.1, the Errors-To: message header overrides the error return address. -r sender Set the envelope sender address. This is the address where delivery problems are sent to. With Postfix versions before 2.1, the Errors-To: message header overrides the error return address. 

如果你有一百万的邮件(),并不想重新编码所有的邮件()函数…你可以在你的php.ini中设置以下内容…它将普遍设置所有的PHP邮件()函数使用它。

 sendmail_path = sendmail -t -f [email protected]