Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 13 Jan 2004 11:35:22 +0100
From:      Ruben de Groot <mail25@bzerk.org>
To:        Brent Wiese <brently@bjwcs.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Mail in a Jail
Message-ID:  <20040113103522.GA57681@ei.bzerk.org>
In-Reply-To: <20040113012232.MPNJ27510.fed1mtao02.cox.net@SAMBA>
References:  <DGEOIPPIAJBPINGMKMGKCEPKDJAA.ian@cerebellum.za.net> <20040113012232.MPNJ27510.fed1mtao02.cox.net@SAMBA>

next in thread | previous in thread | raw e-mail | index | archive | help
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"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040113103522.GA57681>