I'm having issues trying to get PHP's mail function to work on my Ubuntu 9.04 VPS with sendmail and Apache (and other less relevant stuff, of course).
From PHP I receive no error, save a return value of false from the mail function.
The last error in /var/log/mail.err is
sendmail[14837]: NOQUEUE: SYSERR(www-data): can not chdir(/var/spool/mqueue-client/): Permission denied
Now, I appreciate that this is saying www-data (the user Apache is running as) does not have read access on some required directory (/var/spool/mqueue-client).
So, knowing that (and for test purposes only), I ran chmod 777 /var/spool/mqueue-client and reran the script, which this time succeeded (hurray), however /var/log/mail.err now says
sendmail[14874]: dangerous permissions=42777 on queue directory /var/spool/mqueue-client/
So I'm wondering how I can configure things so my script can run using non-dangerous permissions.
aptno longer works on Jaunty. Owner/group ofmqueue-clientare bothsmmsp. I'm not certain what the permissions were before I switched them (rookie error), however setting770reverts it to the oldchdirrelated error. Long story short on LTS is that my VPS provider does not make it easy to dist-upgrade. I will probably upgrade nearer the end of thos month by creating a new VPS and cancelling the old one. – Minty Oct 11 '11 at 23:22ls -l $(which sendmail)?groups smmsp? – quanta Oct 12 '11 at 2:038.14.3/lrwxrwxrwx 1 root root 26 Oct 4 12:05 /usr/sbin/sendmail -> /etc/alternatives/sendmail/smmsp sasl– Minty Oct 12 '11 at 3:05