Page 1 of 1

exim + php mail function, wrong return path

Posted: Tue Oct 18, 2011 7:23 am
by nobody
Hey guys.

I have a joomla site which has the following issue.
When an email is sent from the joomla mail form the recipient sees Return-Path: <apache@server.hostname.com>.
Now I have the feeling this has to do with the box and not with joomla since this doesn't happen in another box.

I've found many describing the same issue but still haven't found a solution to it. Has anyone encountered the same issue ?

Thanks

Re: exim + php mail function, wrong return path

Posted: Tue Oct 18, 2011 2:37 pm
by faris
in php.ini:

Code: Select all

sendmail_path = /usr/sbin/sendmail -t -i -f address@domain.tld
You can also add it to a vhost.conf (php_admin_value)

However, if the script uses its own smtp server/connects directly to a socket, then this won't make any difference. In such cases there would always be an option to change who the email is from.

Faris.

Re: exim + php mail function, wrong return path

Posted: Tue Oct 18, 2011 3:12 pm
by nobody
faris wrote:in php.ini:

Code: Select all

sendmail_path = /usr/sbin/sendmail -t -i -f address@domain.tld
You can also add it to a vhost.conf (php_admin_value)

However, if the script uses its own smtp server/connects directly to a socket, then this won't make any difference. In such cases there would always be an option to change who the email is from.

Faris.

Ok after lots of hours and a lot of nerves I found out how to solve the issue.

Both -f address@domain.tld and (php_admin_value) did not solvethe problem !
Neither around 20 other workarounds I found on the net.

So I removed exim and I installed postfix.

It worked right away like a charm with the -f flag and the email set to it.
Did some testing and up to know it works perfectly.

Postfix is legendary. :)