Sendmail - can not chdir(/var/spool/clientmqueue/)

Hi

I try to setup sendmail for using with php mail() function. When I try to send a test mail from shell I get this error.

Code:
localhost# mail -v mailtest@test.com
Subject: test
test
.
EOT
can not chdir(/var/spool/clientmqueue/): Permission denied
Program mode requires special privileges, e.g., root or TrustedUser.

For security reasons I don't want to change permission for mail service. Here are the permissions.

Code:
localhost# ls -la /var/spool/clientmqueue
total 12
drwxr-x---  2 root  wheel  512 Jan 27 06:16 .
drwxr-xr-x  8 root  wheel  512 Jan 27 06:16 ..
-rw-------  1 root  wheel   49 Jan 27 06:16 sm-client.pid

localhost# uname -a
FreeBSD soulviasound.com 9.0-RELEASE FreeBSD 9.0-RELEASE #0: Tue Jan  3 07:15:25 UTC 2012     
root@obrian.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  i386

Any idea how can I solve this?
 
Hello, please show permissions for /usr/libexec/sendmail/sendmail.

On 8.2 version of FreeBSD it's
Code:
-r-xr-sr-x  1 root  smmsp  686216 Apr  8 22:29
/usr/libexec/sendmail/sendmail

If it's www:www - try to set it as root:smmsp. Hope it help you.
 
Thank you for the reply. The permission for /usr/libexec/sendmail/sendmail was:

Code:
drwxr-xr-x  2 root  wheel     512 Jan 27 06:20 .
drwxr-xr-x  6 root  wheel    1536 Jan 27 06:20 ..
-r-xr-xr-x  1 root   wheel  699144 Jan 27 06:20 sendmail

Then I chown'ed it to:

Code:
drwxr-xr-x  2 root  smmsp     512 Jan 27 06:20 .
drwxr-xr-x  6 root  wheel    1536 Jan 27 06:20 ..
-r-xr-xr-x  1 root  smmsp  699144 Jan 27 06:20 sendmail

I tried again a test mail, but same error.
 
Back
Top