Exim4 and PHP and PHP-CGI mail() function using incorrect From: and applying Sender: headers.

If you’re using Exim4 and PHP as a module or as a CGI with suexec. You may have noticed some issues with your mail. Specifically you would have noticed that either the “From:” header was using “nobody@machinename” or “user@machine name, its also possibly that you had an additional header called “Sender:”. There are two things you need to do to fix this. You first need to make sure that your “php.ini” has the following value “sendmail_path = /usr/sbin/sendmail -t -i”. Which is the default, double check this variable as it might be set to something else.

If you’re using Exim4 and PHP as a module or as a CGI with suexec. You may have noticed some issues with your mail. Specifically you would have noticed that either the “From:” header was using “nobody@machinename” or “user@machine name, its also possibly that you had an additional header called “Sender:”.

There are two things you need to do to fix this. You first need to make sure that your “php.ini” has the following value “sendmail_path = /usr/sbin/sendmail -t -i”. Which is the default, double check this variable as it might be set to something else.

Next you want to make sure that you have Exim4 configued properly, if you use Debian Etch then you should be fine. However if you change the default configs or have a different setup. Then make sure you have set “local_from_check = false” inside “exim4.conf.template” for Debian Etch and if you don’t use Debian then check the exim configs.


Did you like this article?


0 Shares:
You May Also Like

Thunderbird still has potential to fly despite developers leaving the nest

Thunderbird is a pretty great open sourced mail client that is available on multiple platforms and for free. From the beginning its development has been mostly be shadowed by FireFox. The two core developers of Thunderbird have left Mozilla, which is a big blow to the ongoing development of Thunderbird. Will Thunderbird not longer get as many updates or new features? Will development complete stop? Only time will tell.
Read More