Hello!
Dave Temple wrote:
>
> Return-Path is normally set by the final delivery and would usually
> contain the envelope sender. If you have wwwrun as a trusted user then I
> would expect IMP to be able to set the correct sender address in the
> message using the -f option to Exim. It sounds a bit like that is
> failing on your system. We use IMP here and we don't have this problem.
> A quick look at the IMP code shows that it checks to see if the
> configuration value $default->path_to_sendmail is set to the path of an
> executable program, if it is, then it runs the command line:-
>
> $default->path_to_sendmail -i -f$from -- $recipients
>
> and feeds in the message content. This should result in the correct
> sender address being set (and indeed this works on our system).
>
> If that fails for any reason it inserts the mail into the system using
> the native php mail() command which could do pretty much anything
> (depending on how its configured in your PHP libraries).
>
> My advice to you would be to check that your $default->path_to_sendmail
> setting is set in your imp/config/defaults.php3 file, because if it
> isn't set, or is set to the wrong thing then that would explain your
> problem.
With this help i could track the problem down. The path is set correct
but I have an other problem: the code is executed but fails. This is how
IMP tries to send the mail:
if (@is_executable($default->path_to_sendmail)) {
$from = escapeShellCmd($from);
$mail = popen("$default->path_to_sendmail -i -f$from --
$recipients", 'w');
$result = fputs($mail, $bhdrs . $hdrs);
$result += fputs($mail, "\n"); // trailing \n to end
the headers section
$result += fputs($mail, $body);
if ((pclose($mail) >> 8 & 0xFF) != 0)
$result = 0;
}
I set the $default->path_to_sendmail to exim (since I have no sendmail
installed anymore). When I try to debug the whole thing I get the
following line:
/usr/exim/bin/exim -i -fjs9@??? --
js9@???
This is what the IMP executes as pipe. But it doesnt work. The mail is
not send via this one but via the fallback the php mail function which
does not set the return-path correct.
If I try this line as wwwrun user every thing works fine. I have no clue
whats going wrong... But I think it has to be a php prpblem...
Any ideas to this one?
Greetings, Jan Suchanek
--
Jan Suchanek,
Universitaet Ulm, URG, Fakultaet fuer Informatik,
89069 Ulm, Germany
Raum: O27/243
Tel.: +49/(0)731-5024205, Fax: +49/(0)731-5024202