I if call mail() function in PHP from webserver (running as www-data) i get an error sending email.

If i call the same script from the cmdline logged in as root, then it works

If i switch user to www-data and run from the cmdline i get this error message

WARNING: RunAsUser for MSP ignored, check group ids (egid=33, want=107)
can not chdir(/var/spool/mqueue-client/): Permission denied
Program mode requires special privileges, e.g., root or TrustedUser.
FAILEDWARNING: RunAsUser for MSP ignored, check group ids (egid=33, want=107)
can not chdir(/var/spool/mqueue-client/): Permission denied
Program mode requires special privileges, e.g., root or TrustedUser.
FAILEDTest Complete$ WARNING: RunAsUser for MSP ignored, check group ids (egid=33, want=107)

I am guessing i need to do something in sendmail configuration I have googled for some solutions but have ended up more confused.

Can someone let me know what configuration I need to change to fix so i can send from www-data user?

link|improve this question

57% accept rate
Are you actually using sendmail? I thought Ubuntu defaulted to Postfix. – Zoredache Dec 16 '10 at 1:12
i thought it was sendmail, how can i tell ? – bumperbox Dec 16 '10 at 1:21
dpkg -S $(which sendmail) ought to tell you which package is providing your sendmail command. I believe PHP's mail() on Linux uses that by default. – Steven Monday Dec 16 '10 at 1:41
feedback

1 Answer

i did what it said here, and it fixed it

http://forumarchive.pro.parallels.com/showthread.php?t=17999

link|improve this answer
Please at least provide a summary of that link so that if that site goes away the information will still be here. Also, you probably want to accept this as an answer. – wfaulk May 6 at 8:10
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.