Bug #17310 Updated: mail() function has problems with sendmail 8.12

From: Date: Mon, 20 May 2002 17:38:01 +0000
Subject: Bug #17310 Updated: mail() function has problems with sendmail 8.12
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-8007@lists.php.net to get a copy of this message
ID: 17310 Updated by: rasmus@php.net Reported By: glen@broadpool.com Status: Feedback Bug Type: Mail related Operating System: FreeBSD 4.6-RC #5 PHP Version: 4.2.1 New Comment: Try: su - nobody (or whatever your web user id is) and then run the sendmail command configured in your php.ini file. Most likely "sendmail -t -i" on a text file that has the various headers and a body in it. See if that works. My guess is that you will have the same problem in which case PHP is completely out of the picture. Previous Comments: ------------------------------------------------------------------------ [2002-05-20 13:28:39] glen@broadpool.com AAaarrgh. I believe you. I also believe what I'm seeing, which is that sendmail, when invoked by PHP, fails with the error. Perhaps it is a sendmail configuration problem, but I've checked and rechecked it over and over again, and everything appears to match the sendmail/SECURITY document. ------------------------------------------------------------------------ [2002-05-20 12:52:18] rasmus@php.net Nowhere in the mail() code do we do a chdir(). We fetch the sendmail_cmd as configured in the php.ini file, play a bit with the mail() function arguments to get them into the right format and then we open a pipe to the configured sendmail_cmd using a popen() call. Then we fprintf() the data to that open pipe and finally pclose(). If something is doing a chdir() it is not PHP. ------------------------------------------------------------------------ [2002-05-20 12:46:45] mfischer@php.net Ok, let's see what we can do here. Btw, I still think it's an issue not related to PHP. However, try to strace the PHP binary and see if it's really doping the chdir() itself ------------------------------------------------------------------------ [2002-05-20 12:44:15] glen@broadpool.com Not true. I've confirmed all the sendmail settings, including the setuid bit for the sendmail group. For some reason, something in PHP is trying to chdir to /var/spool/mqueue, which is owned by root and does not have group/world read or write permissions. The problem ONLY occurs with PHP mail(). ------------------------------------------------------------------------ [2002-05-20 12:35:30] mfischer@php.net This is a configuration issue with Sendmail, not with PHP. PHP is just invoking the sendmail binary (which probably isn't setuid for /var/spool/mqueue). ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/17310 -- Edit this bug report at http://bugs.php.net/?id=17310&edit=1

« previous php.bugs (#8007) next »