I currently have a Servermatrix server that a client is running a perl script on to send out email confirmations for site purchases. Previously the script was on a EV1 server and it worked fine - the script sent email with no problems, and the from account was being set as "[email protected]" correctly.
On the new server, however, all of the emails from this script are being sent with the server's hostname in the from field (eg. "[email protected]"). This is even though the script that my client is running implicitly sets the from field.
The only major change between the two is that the EV1 server was running sendmail, and the new one is running Exim. Is there something I can do, either in the script or on the server to get this to work?
I figured out the problem - you need to edit the exim.conf file and add trusted users that have permission to change the various headers. Scripts run as their owner, so if you have a script under a certain user's domain, adding their username into the trusted user will allow the script to change the from header.
In exim.conf, add the following somewhere after the main configuration area starts:
trusted_users = username1 : username2 : etc...
Someone else on this forum pointed out the answer to me, so I can't claim credit for this, but figured it would be helpful for you.