From owner-freebsd-questions@FreeBSD.ORG Sun Dec 21 03:49:06 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 8836F16A4CE for ; Sun, 21 Dec 2003 03:49:06 -0800 (PST) Received: from smtp.infracaninophile.co.uk (smtp.infracaninophile.co.uk [81.2.69.218]) by mx1.FreeBSD.org (Postfix) with ESMTP id 52C9C43D53 for ; Sun, 21 Dec 2003 03:49:04 -0800 (PST) (envelope-from m.seaman@infracaninophile.co.uk) Received: from happy-idiot-talk.infracaninophile.co.uk (localhost [127.0.0.1]) hBLBmrZ6027505 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 21 Dec 2003 11:48:53 GMT (envelope-from matthew@happy-idiot-talk.infracaninophile.co.uk) Received: (from matthew@localhost)id hBLBmoXC027504; Sun, 21 Dec 2003 11:48:50 GMT (envelope-from matthew) Date: Sun, 21 Dec 2003 11:48:50 +0000 From: Matthew Seaman To: Ian Barnes Message-ID: <20031221114850.GB27086@happy-idiot-talk.infracaninophile.co.uk> Mail-Followup-To: Matthew Seaman , Ian Barnes , Rus Foster , freebsd-questions@freebsd.org References: Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="0eh6TmSyL6TZE2Uz" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.5.1i X-Spam-Status: No, hits=-4.9 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=2.61 X-Spam-Checker-Version: SpamAssassin 2.61 (1.212.2.1-2003-12-09-exp) on happy-idiot-talk.infracaninophile.co.uk cc: freebsd-questions@freebsd.org Subject: Re: Sendmail 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: Sun, 21 Dec 2003 11:49:06 -0000 --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--