Autor: Tim Jackson Data: Para: exim-users Asunto: Re: [Exim] Changing "Sender" header
Hi Joe, on Wed, 04 Feb 2004 00:10:21 -0500 you wrote:
> I want the header info of email generated by a PHP script to change
> depending on the virtual domain that generates the request. Is there an
> simple way to do this? If you're kind enough to respond to this
> question, please go easy... I'm fresh to Exim.
OK, you have two main choices:
- When the mail() function from PHP is called, a fifth parameter is added
"-f<WHATEVER>" where "<WHATEVER>" is the e-mail address to be used as the
sender. This will require that the user that Apache runs as is in Exim's
trusted user list.
- Better, is a method I only started playing around the other day (mainly
inspired by a post here from Eli), where for each vhost in your Apache
config you have something like:
Additional to this, you might be interested in this message by Eli, where
he supplies an Exim patch which allows you to read environment variables
(and hence determine which script sent a message):