Re: [exim] From and Return-Path rewrite problem

Top Page
Delete this message
Reply to this message
Author: Evgeniy Berdnikov
Date:  
To: exim-users
Subject: Re: [exim] From and Return-Path rewrite problem
On Tue, Oct 07, 2014 at 10:35:38PM +0200, Bata Degen wrote:
> Hi, Evgeniy!
>
> Thank you for taking the time!
>
> On 10/07/2014 09:50 PM, Evgeniy Berdnikov wrote:
> > On Mon, Oct 06, 2014 at 02:08:42PM +0200, Bata Degen wrote:
> >> I am sending mail from a PHP script. I have checked that it's really
> >> sent by Exim. The From-Header I add in the script is, I guess,
> >> overwritten by Exim. The scripts looks like this (excerpt).
> >>
> >> $headers = "From: Display Name <do-not-reply@???>\r\n";
> >> $headers = "Content-Type: text/plain; charset=\"utf-8\"" . "\r\n";
> >
> > You overwrite your "From:" header field by the second PHP assignment.
> > The $headers variable must be appended, not overwritten.
> >
>
> And thank you for being very attentive! I checked the script. There is
> the dot before the equal sign (.=). Somehow it didn't make into the
> e-mail. So the script should be okay.


Try to construct a test mail by hands with all relevant headers and
submit it manually under PHP user. On success, you have to check
your PHP code again.

You can also trace all address substitutions with "log_selector=+all"
in Exim config. The change of php-generated From: field must be logged.
--
Eugene Berdnikov