0

I'm trying to setup a new help desk program (Kayako), but I'm having problems relaying the mail to our mail server.

Here's the error I'm getting:

sendmail[2371]: NOQUEUE: SYSERR(apache): can not chdir(/var/spool/clientmqueue/): Permission denied

I changed ownership on the clientmqueue folder to smmsp:apache with the same 770 permissions as it normally has, however the error still occurs.

3 Answers 3

0

According to the "bat book" (4th edition, page 168) the recommended permissions for the directory are:

chown smmsp:smmsp clientmqueue
chmod 0770 clientmqueue
4
  • That's what I had them set to originally, but I changed it because of the error I keep getting. I'm assuming the 'Permission denied' error was because Apache didn't have ownership. Turning off SELinux enforcement didn't help, either. Jul 25, 2012 at 23:22
  • Did you reboot the machine after turning SELinux off?
    – adamo
    Jul 26, 2012 at 6:08
  • Here's how someone else solved this sudo setsebool -P httpd_can_sendmail on
    – adamo
    Jul 26, 2012 at 6:09
  • Interesting. I'll have to try that tomorrow. Thanks! Jul 26, 2012 at 7:42
0

Sendmail should be running setgid, otherwise the mail queue would have to be writable by PHP. It sounds like this is not the case on your server.

7
  • Sounds like a major security risk to me. Jul 26, 2012 at 0:12
  • -rwxr-sr-x. 1 root smmsp 839880 Jun 25 11:31 /usr/sbin/sendmail.sendmail Jul 26, 2012 at 0:41
  • 1
    @nojak well then, if you know what you're doing then you set it up however you want.
    – tylerl
    Jul 26, 2012 at 0:52
  • I was just wondering if there was any other way to get it working. I appreciate the response, but it sounds risky. If you would like to clarify why it's not a potential security risk, or if that's the only way to get it working, that would be much more appreciate than a snide remark. Jul 26, 2012 at 1:58
  • Unfortunately the suggestion didn't work... Same error. Thanks again for the response, though. Much appreciated. Jul 26, 2012 at 2:04
0

So, I ended up starting from scratch, just to make sure I only had the minimal install on there, and that there weren't any conflicting packages.

SELinux was still keeping me from connecting to the external mail server, however.

I would receive warnings like this:

[Warning]: stream_socket_client(): unable to connect to mail.mydomain.com:25 (Permission denied) (Transport/StreamBuffer.php:263)

I found that I needed to allow HTTPD scripts and modules to connect to the network by setting an SELinux boolean for httpd_can_network_connect to on.

I did this by running the following command: setsebool -P httpd_can_network_connect on

If you don't use the -P flag, the change is not saved to the policy file, and will not persist through reboots.

Just thought I'd post this for anyone else that runs into a similar issue. I believe that httpd_can_network_connect not being set to on was causing the sendmail error as well.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .