"The Linux Gazette...making Linux just a little more fun!"


(?) The Answer Guy (!)


By James T. Dennis,
Starshine Technical Services, http://www.starshine.org/


(?) 'sendmail' on a Private/Disconnected Network

From RoLillack on Tue, 10 Nov 1998

Dear Answer Guy!

I set up a small network at home with my Linux box beeing 192.168.111.111, my father's Windooze box beeing ...112 and my brother Max' Linux system (root gets mounted using nfs!!!) ...113 (mine is called pflaume.lillax.de and my brother's: birne). Both Linux machines use RedHat 5.0.

(!) Nice trick using nfsroot there.

(?) Nearly everthing works well, we use http, ftp, nfs and samba without problems. But when I tried to send an email to my brother's machine or vice-versa, sendmail sent a warning, that it could not send the mail for 4 hours and mailq tells me:


"Deferred: Name server: birne.lillax.de: host name lookup failure"

So I tried mailing to [email protected] and mailq says


"host map: lookup (192.168.111.113): deferred"

I don't know what I did wrong, our hosts file has the right entries and this is the output of ifconfig and route on my machine (on Max' system it nearly looks the same):

(!) 'sendmail' doesn't use /etc/hosts. The standards require that it use MX records. It can also use NIS maps (the default on many versions of SunOS and Solaris).
If you really mailed it to max at the IP address, it should have bypassed the MX lookup. However, to use an IP address in your mail you should enclose it in square brackets like:
               max@[192.168.111.113]
... which is a trick I've used to configure the systems internal to my LAN (no DNS) to forward to my uucp hub via SMTP. In other words 'antares' is my mail server. It exchanges mail with my ISP over dial-out UUCP. My users fetch their mail from antares via POP using Eric S. Raymond's 'fetchmail' The workstations that we use are configured with the "nullclient.mc" file and the "hub" defined by IP address like so:
divert(0)dnl
VERSIONID(`@(#)clientproto.mc   8.7 (Berkeley) 3/23/96')

OSTYPE(linux)
FEATURE(nullclient, `[192.168.64.1]')
That's my whole starshine.mc file for all of the workstations on my LAN. They relay all mail to 'antares' with not DNS/MX lookups.
> ifconfig:
> lo       Link encap:Local Loopback
>          inet addr:127.0.0.1  Bcast:127.255.255.255  Mask:255.0.0.0
>          UP BROADCAST LOOPBACK RUNNING  MTU:3584  Metric:1
>          RX packets:1912 errors:0 dropped:0 overruns:0
>          TX packets:1912 errors:0 dropped:0 overruns:0


> eth0     Link encap:Ethernet  HWaddr 00:60:8C:51:CD:AA
>          inet addr:192.168.111.111  Bcast:192.168.111.255  Mask:255.255.255.0
>          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
>          RX packets:2259 errors:0 dropped:0 overruns:0
>          TX packets:554 errors:0 dropped:0 overruns:0
>          Interrupt:12 Base address:0x340

> route:
> Kernel IP routing table
> Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
> localnet        *               255.255.255.0   U     0      0        1 eth0
> loopback        *               255.0.0.0       U     0      0        2 lo
> -------------------------------------------------------

(?) ...with "localnet" meaning "192.168.111.0"...

I'm looking forward to your answer. Thank you!

Robert

PS: If I mail to "root@localhost" I get the message, but if I send it to "[email protected]" it doesn't work ("deferred" message as above). Has this something to do with my real problem?!?

(!)This further supports my theory. Try a suitable variant of my nullclient.mc file, build a sendmail.cf file from that using a command like:
               m4 ../m4/cf.m4 your.mc > /etc/sendmail.cf
... from /usr/share/sendmail/cf or /usr/lib/sendmail-cf/cf or wherever Red Hat puts it in your version.


Copyright © 1998, James T. Dennis
Published in The Linux Gazette Issue 35 December 1998


[ Answer Guy Index ] office largedisk links yamaha magickeys
passwd ftproot pvtmail netware crypto
relay project bootmethod sysadmin ipscript
loopfs mrtg slimscan rpm modutil libc dell remoteroot


[ Table Of Contents ] [ Front Page ] [ Previous Section ] [ Next Section ]