title: Is -f key mandatory for PHP mail() send emails with correct from address?
body: <p>Having a real tough time fixing an issue on a RS cloud server. The emails sent by PHP scripts, although a From header is included, the from address is getting changed to current user that is running the php.</p>
  
  <p>e.g</p>
  
  <pre><code>mail('someone@gmail.com', 'Test mail', 'Reply back when you see this', 'From: web@mysite.com' . "\r\n");
  </code></pre>
  
  <p>Although the additional header is included, the email is being sent as apache@mysite.com or manjuser@mysite.com (when I login to ssh as manjuser and run the php from cli). Clearly overriding the from address. This is resulting in emails not getting delivered to destination. RS email app rejects it as both apache and manjuser email boxes are not present.</p>
  
  <p>Question is:
  Is there a way to tell sendmail/postfix to use the From header or a fixed email address instead of requiring -f to be sent every single time mail function is used?</p>