From owner-freebsd-questions@FreeBSD.ORG Mon Dec 15 12:15:58 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B5E3716A4CE for ; Mon, 15 Dec 2003 12:15:58 -0800 (PST) Received: from ns1.tcbug.org (12-218-40-24.client.mchsi.com [12.218.40.24]) by mx1.FreeBSD.org (Postfix) with ESMTP id C863443D32 for ; Mon, 15 Dec 2003 12:15:57 -0800 (PST) (envelope-from friar_josh@ns1.tcbug.org) Received: by ns1.tcbug.org (Postfix, from userid 1003) id 6AD20BA1C; Mon, 15 Dec 2003 14:15:23 +0000 (GMT) Date: Mon, 15 Dec 2003 14:15:23 +0000 From: Josh Paetzel To: samy lancher Message-ID: <20031215141522.GA583@ns1.tcbug.org> References: <20031215200323.75107.qmail@web60301.mail.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20031215200323.75107.qmail@web60301.mail.yahoo.com> User-Agent: Mutt/1.4.1i cc: freebsd-questions@freebsd.org Subject: Re: Email problem X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Dec 2003 20:15:58 -0000 On Mon, Dec 15, 2003 at 12:03:23PM -0800, samy lancher wrote: > Hello all, > I have 4.5 freebsd server with apache, php and mysql. i wrote a simple php program using mail(). The mail() function returns true without any error. but the problem is the email is never delivered. I viewed the log file for mail(/var/log/maillog) and i saw the following error: > > Server sendmail[351]:NOQUEUE:SYSERR(www):can not chdir(/var/spool/clientmqueue/): Permission denied. > > I would be really thankful if someone could tell me where i am doing wrong. > In php.ini, i have set sendmail_path = "/usr/sbin/sendmail". > > thanks in advance. > Naveen. In PHP, mail() will always return true as long as it was able to successfully communicate with the mailserver. As you have seen, that has very little to do with whether or not your email will go through correctly or not. ;) Your error is coming because sendmail runs setuid, in this case to www, and www doesn't have write permissions to /var/spool/clientmqueue. Josh Paetzel