In my postfix log I have the following when I send e-mail from a PHP based web site:
Feb 11 11:52:04 cp5 postfix/qmgr[6007]: 93C6E79C4D1: from=|[email protected]|, size=3266, nrcpt=1 (queue active)
(I substituted | for smaller-than / greater-than signs.)
The problem with the above is that I need to control the "FROM:" address. I know I can control the "@domain.com" address by modifying the "mydomain" in Postfix main.cf file and I had to do that in order to stop e-mail from bouncing in the first place. The problems is now people are reply to "[email protected]" and I don't want that.
This is a Plesk 9.5 server which as far as I know runs a stock standard Postfix installation. I would like advice on how to fix this problem in my PHP script.
This is something you can do from your PHP script:
Have a look at Examaple #2 here:
This example also gives you control over the Reply-To headers. There's no need to touch anything in Postfix!
Use -f option(sender address):