> -----Original Message----- > From: plug-discuss-admin@lists.plug.phoenix.az.us > [mailto:plug-discuss-admin@lists.plug.phoenix.az.us]On Behalf Of David > P. Schwartz > Sent: Saturday, May 26, 2001 2:03 AM > To: plug > Subject: DNS/mailserver questions > > > I have some info on DNS, but it focuses on setting up the entries on the > server so email can get routed to the mailserver. It's not clear > enough to > figure out how to poll a DNS server to get the info I need. There are a > couple dozen specific messages you can send to a DNS server to resolve > addressing needs. I think I need the MX message for both of > these, but I'm > not clear what else. > > Given some email address, say, abc@yahoo.com, how does one go > about finding > the mail server's name or IP address so somebody doesn't have to bother > entering the mail server's host name, ie., "pop.mail.yahoo.com", > in order to > login and read POP mail for user "abc"? > > Also, given an email address, what sequence of requests are > needed to get from > a domain like "yahoo.com" to a mailserver's MX name/address in > order to drop > mail directly into it's mouth (rather than using an SMTP server > or relay)? Is > an MX request sufficient? > > I think I need the IP address of at least one known DNS server. This can > probably be obtained from the user's environment somewhere, but maybe some > known stable names could be used to do a lookup. Given this, > what sort of DNS > requests would I make (at the programmatic level) to get the needed info? > --- Your questions indicate some confusion. Your computer needs to be configured to be able to translate names into ip addresses. That is what is in /etc/resolv.conf Sendmail will need to be able to use these client DNS services to be able to deliver the mail. Traditionally, nslookup is the tool to use (will undoubtedly be supplanted by htdig) and to use it, you can type nslookup hostname example - nslookup www.yahoo.com if you want to query specific aspects such as MX records, you can simply type nslookup which will leave you in a command mode of nslookup and the following commands may help... set type=mx (will give you only mx listings) then try www.yahoo.com and it will report the mx exchangers for www.yahoo.com server hostname (will query the specified DNS server instead of the server(s) listed in your /etc/resolv.conf the ability to use a specific domain by default so a luser doesn't have to specifically add it is handled on each individual computer and probably by each application which makes it an unattractive option because the various applications don't always have the ability to resolve 'unqualified' addresses (those without the @yourdomain.com) HTH Craig