From owner-freebsd-questions@FreeBSD.ORG Tue Jan 13 02:33:51 2004 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 AD0C916A4CE for ; Tue, 13 Jan 2004 02:33:51 -0800 (PST) Received: from ei.bzerk.org (ei.xs4all.nl [213.84.67.5]) by mx1.FreeBSD.org (Postfix) with ESMTP id AA56943D3F for ; Tue, 13 Jan 2004 02:33:48 -0800 (PST) (envelope-from mail25@bzerk.org) Received: from ei.bzerk.org (BOFH@localhost [127.0.0.1]) by ei.bzerk.org (8.12.10/8.12.10) with ESMTP id i0DAZNo9057810; Tue, 13 Jan 2004 11:35:23 +0100 (CET) (envelope-from mail25@bzerk.org) Received: (from bulk@localhost) by ei.bzerk.org (8.12.10/8.12.10/Submit) id i0DAZMYL057809; Tue, 13 Jan 2004 11:35:22 +0100 (CET) (envelope-from mail25@bzerk.org) X-Authentication-Warning: ei.bzerk.org: bulk set sender to mail25@bzerk.org using -f Date: Tue, 13 Jan 2004 11:35:22 +0100 From: Ruben de Groot To: Brent Wiese Message-ID: <20040113103522.GA57681@ei.bzerk.org> Mail-Followup-To: Ruben de Groot , Brent Wiese , 'Ian Barnes' , freebsd-questions@freebsd.org References: <20040113012232.MPNJ27510.fed1mtao02.cox.net@SAMBA> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040113012232.MPNJ27510.fed1mtao02.cox.net@SAMBA> User-Agent: Mutt/1.4.1i cc: freebsd-questions@freebsd.org Subject: Re: Mail in a Jail 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: Tue, 13 Jan 2004 10:33:51 -0000 On Mon, Jan 12, 2004 at 06:20:17PM -0700, Brent Wiese typed: > > Hi, > > > > I run my web sites from a jail. The time has come that i now > > need to send an > > email from one of those sites using the mail() function in php. > > > > I would like to know, what files do i need to be able to send > > mail from the > > jail using the mail command. The box is using sendmail as its > > mta, and is > > running 4.9 release. This configuration (sendmail + php in a jail) should work out-of-the-box. It does on all our servers (4.8 - 5.2). What kind of problems are you experiencing? Ruben > This plagued me too. I found a very easy solution: esmtp in the ports. > > A few catches: > > 1: You need an external SMTP server that will relay the mail for you. I was > unable to get it to talk to the main host's SMTP, probably a "feature" of > jailing... Luckily, I have another box on the LAN who's sole purpose is to > relay mail for machines on the LAN. > > 2: After you install esmtp, change your sendmail links (/usr/sbin/sendmail > at least I think) to point at it. > > 3: If you compiled PHP w/ a non-existent sendmail, you have to recompile. > It's a little confusing, but if you dig far enough in the docs, mail() will > not compile if sendmail doesn't exist (it tests). > > Enjoy! > Brent > > > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"