Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question
    
Are you actually using sendmail? I thought Ubuntu defaulted to Postfix. –  Zoredache Dec 16 '10 at 1:12
1  
i thought it was sendmail, how can i tell ? –  bumperbox Dec 16 '10 at 1:21
1  
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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.