Ensim php mail( ) function not working (medium security )

Posted: November 21, 2009 in enism

Ensim
—–
[root@ spool]# grep ‘clientmqueue’ /var/log/maillog
Nov 18 07:52:57 ns25 sendmail[22753]: NOQUEUE: SYSERR(apache): can not

chdir(/var/spool/clientmqueue/): Permission denied
Nov 18 08:01:47 ns25 sendmail[5513]: NOQUEUE: SYSERR(apache): can not

chdir(/var/spool/clientmqueue/): Permission denied

The sendmail (8.12.x) binary is setgid smmsp. Apache is coded to not allow spawned

processes to run as setuid or setgid. /var/spool/clientmqueue is not accessible by

anyone other than smmsp or group smmsp. Thus when sendmail is spawn from apache, it

cannot write to /var/spool/clientmqueue.

The best way we have come up with to deal with this issue is simply
chmod 1777 /var/spool/clientmqueue
However this defeats some of the security/privacy gains that come with using sendmail

8.12.x as opposed to 8.11 and prior.

simply added sudo privileges to the apache user for my sendmail binary:

Code:

apache ALL=NOPASSWD:/usr/sbin/sendmail

restart httpd

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s