On Sun, 11 Mar 2001, K.Deepak spewed into the bitstream:
K>Dear Michael,
K> Thanks for the info. I will check out in the
K>moongroup.com site. Let me explain in clearer way as to why i would need
K>this setup. My redhat6.2 box is the mail-server for my 4.0 subnet users .
K>Moreover, this machine also acts as the internal DNS server for my 4.0
K>subnet users. The default gateway of this 6.2 box is a machine called as
K>web-server . web-server in my office is directly connected to the outside
K>world. Strictly speaking i don't require this default gateway entry in the
K>6.2 box, as all of my users browse internet using squid proxy server and
K>telnet and ftp from 4.0 nodes are not allowed. Now, the problem is that if i
K>disable default gateway, my sendmail in 6.2 box is not able to do dns lookup
K>and all the mails meant for outside world stays in the mailq of the 6.2 box.
K>If i enable the gateway , my sendmail at 6.2 box does the dns lookup and
K>relays the mail to the 5.2 box. But, DUE TO THE DEFAULT GATEWAY ENTRY , FTP
K>CONNECTION TO MY INTERNAL NETWORK TAKES EITHER VERY LONG TIME TO INTIATE OR
K>IT NOT AT ALL OPENS FTP CONNECTION.
K>
K>Any clues how to solve this problem. Since i am a novice user of linux, i
K>don' t know how to enable the option in sendmail to not to do dns lookup
K>from the relaying host.
K>i tried accessing moogroup, but did not find any constructive help.
Where's my spoon... aah... here it is... :-)
MX records are maintained by DNS only (i.e., not hosts files or NIS). If
no MX records are available for a given host, sendmail will try to send
to that host directly. Once sendmail determines which host to attempt to
send the message to: an intermediate host as indicated by an MX record,
or a direct connection to the target host, it uses gethostbyname() to
determine the IP-address of the target machine in order to make a
connection.
The gethostbyname() library routine may use DNS, an /etc/hosts file, or
NIS to perform its name-to-IP-address look-up, as configured by the
/etc/nsswitch.conf file. N.B.: the host name passed to gethostbyname()
may have been derived from an MX record if a domain name server is
running, even though gethostbyname() may not use DNS to resolve this
name's address. Remember that MX records are only available from DNS,
and the name service switch does not affect a search for MX records.
This is as required by RFC 1123, section 5.3.5. This situation may be
most noticeable when DNS is not first in the /etc/nsswitch.conf file. It
may then be possible that a host name only in /etc/hosts or NIS be
redirected by a wild-card MX record to another host.
btw... that info is copied verbatim from the moongroup site and it
defines in technical terms the same thing you said above.
So, now that the problem is defined properly lets fix it...
Sendmail uses /etc/nsswitch.conf to decide what lookups to do, even if
FEATURE(nocanonify) happens to be set. So copy /etc/nsswitch.conf to
/etc/service.switch and set the "ServiceSwitchFile" setting in
sendmail.cf to point to /etc/service.switch.
Edit /etc/service.switch and remove everything except "hosts" and
"aliases" and delete "dns" from the "hosts" line. It should all work
fine now.
Do not edit anything in /etc/nsswitch for the following reasons... The
"hosts" line in the /etc/nsswitch.conf is used by more than sendmail. If
you want DNS lookups to occur for other tasks (like the gateway you
mentioned for instance) it's netter to copy the /etc/nsswitch.conf to
/etc/service.switch, and remove all entries except for the "hosts" and
"aliases" and then telling sendmail to use /etc/service.switch in your
sendmail.cf.
--
Chuck Mead, csm -AT- moongroup.com, Owner, MoonGroup.com
(Note: html formatted email sent to me is filtered & deleted unread)
GnuPG Public Key Available: http://wwwkeys.us.pgp.net
_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list