我正在尝试使用PHP 邮件功能和RHEL 上的 sendmail 发送邮件。标题中有一行 Received: (from apache@localhost),这导致一些收件人丢弃了邮件。我需要将标头的这一部分替换为适当的用户/域:(比如说 user@example.com)。我已经为此奋斗了一段时间,我只是不知道该怎么办。网络上到处都是讨论。脚本确实指定了发件人。
以下是 SMTP 标头的示例:
Received: from <omitted> (<omitted> [127.0.0.1])
by <omitted> (8.14.4/8.14.4) with ESMTP id rADEwvp4003653
for <omitted>; Wed, 13 Nov 2013 09:58:57 -0500
Received: (from apache@localhost)
by <omitted> (8.14.4/8.14.4/Submit) id rADEwvEj003650;
Wed, 13 Nov 2013 09:58:57 -0500
Date: Wed, 13 Nov 2013 09:58:57 -0500
Message-Id: <omitted>
To: <omitted>
Subject: <omitted>
From: user@example.com
Reply-To: user@example.com