Page 1 of 1

sendmail problem

Posted: Wed Dec 06, 2006 3:08 am
by rogelio23
My mail function is not working:

Please help me fix this, the error message appear like this: Permission denied: unable to execute shell to run mail delivery binary

I tried running this mail function on linux on the command line, and its run correctly. but on browser the error message appeared.

Posted: Wed Dec 06, 2006 11:34 am
by feyd
Post. Your. Code.

Your command line user is in all likelihood a different user from the one the browser will use. The web server's user will need access rights to the command to be able to use it.

Alternately, you could switch to using a POP server with Swift.

Posted: Wed Dec 06, 2006 6:53 pm
by rogelio23
How do I set the access of web server's user so that the sendmail will allow it to run? I tried using phpmailer that I think is similar to swift, but its the same sendmail is not allowing it to run.

Posted: Thu Dec 07, 2006 12:55 am
by Chris Corbyn
PHPMailer uses mail() by default so of course it would be the same :) Use SMTP with swift.

To change the access control permissions of sendmail you need to be in the TRUSTED_USERS list in sendmail.cf. So apache running under "www" or "nobody" needs to be in the list.

If it's at an ever lower level than the sendmail config:

Code: Select all

which sendmail #Remember path
chmod o+x /usr/sbin/sendmail #(or whatever the path was)
chmod o+x /usr/sbin #(Or whatever the path was)