Re: Query a DNS in C

From: SM Ryan (wyrmwif_at_tango-sierra-oscar-foxtrot-tango-dot-charlie-oscar-mike.fake.org)
Date: 04/16/04


Date: Fri, 16 Apr 2004 04:00:04 -0000


# > I want to query a DNS within a C program to get the mail server
# > associated to a domain name, ie, the equivalent of the command 'host
# > -t mx <domain_name>'.

If you're interested in mixed C and Tcl code, I do a MX lookup for mailto
url processing.

http://www.rawbw.com/~wyrmwif/html/wyrm-uri.html#148
http://www.rawbw.com/~wyrmwif/html/wyrm-uri.html#101

Some day I'll go back and document it better.

--
SM Ryan http://www.rawbw.com/~wyrmwif/
If your job was as meaningless as theirs, wouldn't you go crazy too?


Relevant Pages

  • RE: Mail Delivery within Local Domain Takes Hours
    ... on what looks like a DNS query - (I'm on a steep learning curve here... ... 8-)) And our mail server was at one time our primary dns server - but is ...
    (freebsd-questions)
  • Re: DNS on DC and problem with MX entrie
    ... If I query this DNS about mail server I don't get response. ...
    (microsoft.public.win2000.active_directory)
  • Re: NT DNS forward server can not find 163.coms MX record in the cache.
    ... I route all mails to 163.com through HQ's mail server now. ... DNS still can not find 163.com's MX record, ... > I am using a NT DNS server in my internal network, the query to DNS server ...
    (microsoft.public.windows.server.dns)
  • Re: DNS revers lookup and mail server
    ... DNS IP result you'll be good to go ... > A reverse DNS lookup takes the IP address that's trying to make the ... > resolves to lyris.com. ... Joe User respond to sender - email goes out and is reaching mail server ...
    (microsoft.public.exchange.connectivity)
  • RE: Very new to SBS - can I send emails without involving ISP?
    ... The DNS option seems to be working, although it's extremely slow - only one ... If you wanted to get away from downloading POP3 from your ISP and have email ... does your ISP outbound mail server require ... in that case is the physical connection to the Internet. ...
    (microsoft.public.windows.server.sbs)