From owner-freebsd-questions@FreeBSD.ORG Sun Dec 21 15:13:40 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 F40C316A4CE for ; Sun, 21 Dec 2003 15:13:39 -0800 (PST) Received: from smtp.infracaninophile.co.uk (happy-idiot-talk.infracaninophile.co.uk [81.2.69.218]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1C7D143D48 for ; Sun, 21 Dec 2003 15:13:37 -0800 (PST) (envelope-from m.seaman@infracaninophile.co.uk) Received: from happy-idiot-talk.infracaninophile.co.uk (localhost [127.0.0.1]) hBLNDVZ6061080 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 21 Dec 2003 23:13:31 GMT (envelope-from matthew@happy-idiot-talk.infracaninophile.co.uk) Received: (from matthew@localhost)id hBLNDVNn061079; Sun, 21 Dec 2003 23:13:31 GMT (envelope-from matthew) Date: Sun, 21 Dec 2003 23:13:31 +0000 From: Matthew Seaman To: Gary Kline Message-ID: <20031221231331.GA60772@happy-idiot-talk.infracaninophile.co.uk> Mail-Followup-To: Matthew Seaman , Gary Kline , FreeBSD Mailing List References: <20031221204900.GA78888@tao.thought.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="M9NhX3UHpAaciwkO" Content-Disposition: inline In-Reply-To: <20031221204900.GA78888@tao.thought.org> 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 Mailing List Subject: Re: DNS || sendmail? (or both?) 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 23:13:40 -0000 --M9NhX3UHpAaciwkO Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Dec 21, 2003 at 12:49:00PM -0800, Gary Kline wrote: > I've been wondring if there is a way of tweaking sendmail > to send mail from the outside to my internal//private hosts-- > with the same username and the FQDN. >=20 > E.g.: Outside thought.org, "root@tao.thought.org" bounces > while "root@ns1.thought.org" is recognized because=20 > ns1.thought.org is 216.231.43.140. Likewise with mail > to "root@ethic.thought.org" or "root@plato.thought.org". >=20 > Anybody know what magic incantations are necessary to make > my mail server aware of my internal hosts?? If this is a > DNS matter, I didn't catch it in DNS AND BIND (4th ed). It's do-able. First step is that you will need DNS records for all of the addresses you want visible in the Internet. You can just setup MX records pointing at your gateway machine: eg. $ORIGIN thought.org [...] tao MX 10 ns1 ethic MX 10 ns1 plato MX 10 ns1 which tells the outside world that ns1.thought.org handles the e-mail for {tao,ethic,plato}.thought.org[*] If ns1 will do final delivery of this e-mail, then as another poster said, you just need to add those hostnames to /etc/mail/local-host-names. On the other hand, if you want your the messages forwarded from ns1 to those internal machines, leave local-host-names alone and put the following line in /etc/mail/mailertable: .thought.org relay:[%1.thought.org] Then just run 'make' in /etc/mail (Nb. mailertable support is in the default freebsd.mc config, so no config tweaking required.) (Nb.2 the [square brackets] suppress sendmail's looking up MX records when it tries to relay the messages. This stops ns1 trying to relay the messages back to itself.) Cheers, Matthew [*] It's possible, but nasty, to use a wildcard record, so that username@{anything}.thought.org gets delivered to your mail server. However, use of wildcards in the DNS is not recommended as that way madness lies. =20 --=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 --M9NhX3UHpAaciwkO Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (FreeBSD) iD8DBQE/5ikbdtESqEQa7a0RAi6lAJsF5eWmyz9DU2NTuN5rOa7XIaVa2QCbBQgF 3j90i7/DKLa76SlG+87W6uM= =nNil -----END PGP SIGNATURE----- --M9NhX3UHpAaciwkO--