Hello everyone. My first post on the forum.

I spent quite some time searching on google and this forum and can't seem to find
the answer to my sendmail problem with apache+php.

Basically I cant get sendmail to work from apache+php unless I change the permission to 777 for /var/spool/clientmqueue.

I'm running Federa 8, sendmail 8.14.2, Apache/2.2.9, php 5.2.6.

Ownership of /var/spool/clientmqueue
drwxrwxrwx 2 smmsp smmsp 4096 Jul 19 11:50 clientmqueue

I've messed with user groups for smmsp and apache.

# id apache
uid=48(apache) gid=48(apache) groups=48(apache),51(smmsp)

# id smmsp
uid=51(smmsp) gid=51(smmsp) groups=51(smmsp),48(apache)

SELinux is disabled
# getsebool httpd_can_sendmail
getsebool: SELinux is disabled

Here's what's in the maillog if I set the folder permission to 770

NOQUEUE: SYSERR(apache): can not write to queue directory /var/spool/clientmqueue/ (RunAsGid=48, required=51): Permission denied

No mail will be sent and I would get an error from php.

If I set the folder to 777 then instead I would get this in the maillog

dangerous permissions=40776 on queue directory /var/spool/clientmqueue/

But php would send out mails fine.

What am I missing?

Please help.
Thank you!