From owner-freebsd-questions@FreeBSD.ORG Sun Feb 8 06:54:43 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 099F716A4CE for ; Sun, 8 Feb 2004 06:54:43 -0800 (PST) Received: from smtp.infracaninophile.co.uk (ns0.infracaninophile.co.uk [81.2.69.218]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4FF8543D1F for ; Sun, 8 Feb 2004 06:54:42 -0800 (PST) (envelope-from m.seaman@infracaninophile.co.uk) Received: from happy-idiot-talk.infracaninophile.co.uk (localhost.infracaninophile.co.uk [IPv6:::1])i18Esb7f008980 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 8 Feb 2004 14:54:37 GMT (envelope-from matthew@happy-idiot-talk.infracaninophile.co.uk) Received: (from matthew@localhost)id i18EsbJ6008979; Sun, 8 Feb 2004 14:54:37 GMT (envelope-from matthew) Date: Sun, 8 Feb 2004 14:54:37 +0000 From: Matthew Seaman To: zhangweiwu@realss.com Message-ID: <20040208145437.GA8825@happy-idiot-talk.infracaninophile.co.uk> Mail-Followup-To: Matthew Seaman , zhangweiwu@realss.com, questions@freebsd.org References: Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="a8Wt8u1KmwUX3Y2C" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.6i X-Spam-Status: No, hits=-4.9 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=2.63 X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on happy-idiot-talk.infracaninophile.co.uk cc: questions@freebsd.org Subject: Re: sendmail to a smarthost? 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, 08 Feb 2004 14:54:43 -0000 --a8Wt8u1KmwUX3Y2C Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Feb 08, 2004 at 09:31:10PM +0800, Zhang Weiwu wrote: > Hello. In my LAN the DNS server is my ADSL modem ... small device that=20 > cannot do MX type of address lookup. I wish to configure a fax server=20 > (FreeBSD 5.2 + Hylafax) in the LAN to send emails to a group of people up= on=20 > receiving fax. The problem is hylafax fax server can only use sendmail to= =20 > send fax notification, but sendmail can send out emails only when it know= s=20 > receipiant's MX ip. >=20 > The only way I can think of is to let sendmail send mails by using my ISP= 's=20 > smtp server (need login). But I read sendmail(8), I didn't find how to=20 > configure sendmail to do this, nor did I find such information on the=20 > handbook. I'm not familiar with sendmail config. Setting up a smarthost is simple. Just do the following: # cd /etc/mail # make (this will create a file `hostname`.mc if=20 it doesn't already exist) # vi `hostname`.mc Modify the line to remove the comment (dnl) and put in your ISP's smart host: dnl define(`SMART_HOST', `your.isp.mail.server') so that it reads: define(`SMART_HOST', `smtp.example.com') Note the distinction between the left hand (`) and right hand (') side quote marks. Save the results. Now process those into a sendmail configuration file and install them and restart sendmail as follows: # make install # make restart-mta In order to suppress sendmail doing DNS lookups for MX records, you should be able to use the standard sendmail feature of putting the hostname in [square brackets]. This may or may not work -- you'll have to do some experiments. First of all try putting the square brackets into the SMART_HOST define above: define(`SMART_HOST', `[smtp.example.com]')=20 If that doesn't work, you can try using the mailertable functionality. Create a file /etc/mail/mailertable containing the line: . relay:[smtp.example.com] and process that into a .db format hashed file by: # make --=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 --a8Wt8u1KmwUX3Y2C Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFAJk2tdtESqEQa7a0RAlOAAJ0TQJVtFmp+Lj1uZjKXEFzZo6jWWQCeK9ev y95NlginAO6S/oVwKp1bNNA= =4KTd -----END PGP SIGNATURE----- --a8Wt8u1KmwUX3Y2C--