Program mode requires special privileges, e.g., root or TrustedUser.

2011 Oct 6 at 14:20 » Tagged as :qmail, centos, cloud, repmgr,

One of the residuals of the server outage is that the feedback form on this site stopped working even after restoration. That was caused by the ditching of the old CentOS (5.4) Amazon Machine Image in favour of a CentOS  (5.6) AMI when the PHP mail funciton is invoked it results in the following error showing up in the  Apache main error log file.

Program mode requires special privileges, e.g., root or TrustedUser.

That's right folks, instead of showing up in the site specific log file, it appears in the /var/log/httpd/error_log. I had seen it previously but disregarded it in my preoccupation with getting the site back on line. The error message does not include any other information and gives no hint whatsoever that it relates to the mail() function. It was when the feedback spam stopped flooding my mail box that I started looking around and made the connection. At first I was tempted to let pull the feedback form altogether but decided not to.   Googling brought up many solutions that doesn't work including changing the permissi0ns on /var/spool/clientmqueue (it's already correct) to chaning SELinux settings (who in his right mind uses SELinux?) after much digging I learnt that you need to change the sendmail_path setting in the php.ini file. To be specific

sendmail_path = /usr/sbin/sendmail -t -i

Needs to be changed to

sendmail_path = /usr/sbin/sendmail.postfix -t -i

  Good thing it was so easy. Since giving up on qmail long ago and switching to Google Apps, I have unlearnt everything that I knew about qmail and sendmail.