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 > cannot do MX type of address lookup. I wish to configure a fax server > (FreeBSD 5.2 + Hylafax) in the LAN to send emails to a group of people upon > receiving fax. The problem is hylafax fax server can only use sendmail to > send fax notification, but sendmail can send out emails only when it knows > receipiant's MX ip. > > The only way I can think of is to let sendmail send mails by using my ISP's > smtp server (need login). But I read sendmail(8), I didn't find how to > configure sendmail to do this, nor did I find such information on the > 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 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]') 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 -- 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
pgp00000.pgp
Description: PGP signature