I'm successfully sending mail using PHP using the mail() function but the sending is showing up as the server address and not what I have configured in the script. Postfix is installed on the apache server. On ServerFault answer I read to use the -f and -r flags but that does not work either like this:
mail($to, $subject, $message, $headers,'From: ' . $fromname . ' <'.$from.'>', "-f $from -r mybounceemail@example.com");
The best I've been able to do is change the Postfix myorigin which is the local machine name hostname to the parent domain of the machine name.
This leads me to believe Postfix is ignoring or stripping the From: element?