Re: [Exim] correct email addr to send bounces

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Tim Jackson
Ημερομηνία:  
Προς: exim-users
Αντικείμενο: Re: [Exim] correct email addr to send bounces
Hi Martin, on Mon, 12 Apr 2004 16:44:50 -0300 you wrote:

> we're now using php's mail() function (which calls sendmail/exim)
> how can I specify the envelope sender? Should I change the way php calls
> sendmail? (currently is /usr/sbin/sendmail -t -i)


If you're not running in safe mode, and the user which the webserver runs
as is in Exim's trusted_users list, you can use the fifth parameter of the
mail() function to pass "-f<address>" to Exim, which will set the sender.
Alternatively, it can be set globally or on a per-virtual-host basis by
adding an "-f" option to the sendmail_path option. For example, using
Apache, to set the sender for a particular virtual host, use something
like this:

sendmail -t -i -fblah@???

to set the sender to blah@??? .

I have to say that the PHP guys could really do with adding an
MTA-independent way/parameter to pass the sender when creating a mail,
which works in Safe Mode and doesn't allow execution of arbitrary
commands. The "fifth parameter" is a bit of a fudge and isn't very
portable.


Tim