Date: Sun, 8 Feb 2004 14:54:37 +0000 From: Matthew Seaman <m.seaman@infracaninophile.co.uk> To: zhangweiwu@realss.com Cc: questions@freebsd.org Subject: Re: sendmail to a smarthost? Message-ID: <20040208145437.GA8825@happy-idiot-talk.infracaninophile.co.uk> In-Reply-To: <LAW11-F9oli1l6aC6nI0005af2f@hotmail.com> References: <LAW11-F9oli1l6aC6nI0005af2f@hotmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040208145437.GA8825>
