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

Are Network Carriers To Blame For iPhone 3G Problems

I was recently having issues with my phone not being able to use 3G, and I thought it might have been a firmware or possibly hardware issue. But after troubleshooting for some time, I found that it was in fact applications crashing or firmware bugs. Hearing more and more reports of network issues with 3G and iPhones, Wired Magazine decided to do a survey of 3G coverage across america.
Read More

Guide to upgrading Drupal using SSH Commands

A well written guide on how to upgrade Drupal using SSH commands
This guide is meant to augment the official Upgrade guide. Please read the official upgrade steps in UPGRADE.txt as well as in the Drupal.org Dcoumentation thoroughly to ensure that you understand every aspect of the upgrade process. This guide is for more advanced users with SSH experience.
Read More