Date: Sun, 21 Dec 2003 11:48:50 +0000 From: Matthew Seaman <m.seaman@infracaninophile.co.uk> To: Ian Barnes <ian@cerebellum.za.net> Cc: freebsd-questions@freebsd.org Subject: Re: Sendmail in a jail Message-ID: <20031221114850.GB27086@happy-idiot-talk.infracaninophile.co.uk> In-Reply-To: <DGEOIPPIAJBPINGMKMGKEECBDKAA.ian@cerebellum.za.net> References: <Pine.LNX.4.58.0312202122110.13140@bitch.localdomain> <DGEOIPPIAJBPINGMKMGKEECBDKAA.ian@cerebellum.za.net>
next in thread | previous in thread | raw e-mail | index | archive | help
--0eh6TmSyL6TZE2Uz
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
On Sun, Dec 21, 2003 at 01:26:27PM +0200, Ian Barnes wrote:
> nope, it doesnt. Anyway that i could debug it ? If i parse the variables
> through to the screen they are fine, if i run it on another server not in=
a
> jail it works, so my code i fine, now it just doesnt want to send. Any id=
eas
> as to what i could do?
You need to run a sendmail MSP process in the jail, and modify the
configuration so that it submits the message to your main server
(presumably in your host environment, although it could live in
another jail) via it's external IP address.
Try this, in the jail:
# cd /etc/mail
# cp freebsd.submit.mc submit.mc
# vi submit.mc
here, change the last line from
FEATURE(`msp', `[127.0.0.1]')dnl
to
FEATURE(`msp', `[smtp.example.com]', `MSA')dnl
Obviously, you want to replace 'smtp.example.com' with the hostname of
your mailserver -- or it's IP address. You need the [square brackets]
as they stop sendmail trying to look up MXes in the DNS and instead
deliver straight to the named machine. Now rebuild the .cf and
install it:
# make
# make install
In /etc/rc.conf in the jail set the following so that only the
sendmail MSP process gets started:
sendmail_enable=3D"NO"
sendmail_msp_queue_enable=3D"YES"
sendmail_outbound_enable=3D"NO"
sendmail_submit_enable=3D"NO"
and you can start sendmail up from within /etc/mail by:
# make restart
Oh, and make sure port 587 on the mail server isn't firewalled off
=66rom the jail environment...
The problem is that the loopback interface isn't really shared between
jail and host environment -- a daemon listening on 127.0.0.1 in the
host won't pick up connections to 127.0.0.1 in the jail, which is
exactly how the MSP tries to communicate with the MTA process.
Cheers,
Matthew
--=20
Dr Matthew J Seaman MA, D.Phil. 26 The Paddocks
Savill Way
PGP: http://www.infracaninophile.co.uk/pgpkey Marlow
Tel: +44 1628 476614 Bucks., SL7 1TH UK
--0eh6TmSyL6TZE2Uz
Content-Type: application/pgp-signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (FreeBSD)
iD8DBQE/5YiidtESqEQa7a0RAiOJAJ9bZIAscGLQR3UZhgqNoxfQJ1N9xwCfSdoL
5CXR8TWAexrovhXVAJJhXuk=
=e14P
-----END PGP SIGNATURE-----
--0eh6TmSyL6TZE2Uz--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20031221114850.GB27086>
