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.

tacotuesday
  • 1,389
  • 1
  • 16
  • 27

3 Answers3

0

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

chown smmsp:smmsp clientmqueue
chmod 0770 clientmqueue
adamo
  • 6,925
  • 3
  • 30
  • 58
  • 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. – tacotuesday Jul 25 '12 at 23:22
  • Did you reboot the machine after turning SELinux off? – adamo Jul 26 '12 at 06:08
  • [Here's how someone else solved this](http://dailyweedhound.blogspot.gr/2010/05/noqueue-syserrapache-can-not.html) *sudo setsebool -P httpd_can_sendmail on* – adamo Jul 26 '12 at 06:09
  • Interesting. I'll have to try that tomorrow. Thanks! – tacotuesday Jul 26 '12 at 07: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.

tylerl
  • 15,055
  • 7
  • 51
  • 72
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.

tacotuesday
  • 1,389
  • 1
  • 16
  • 27