BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Re: Resolving mx record

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (VCL Components Usage)
View previous topic :: View next topic  
Author Message
JD
Guest





PostPosted: Thu Jul 24, 2003 11:26 pm    Post subject: Re: Resolving mx record Reply with quote




"James Diskwave" <james at diskwave dot com> wrote:
Quote:
AnsiString IPList;

IdDNSResolver1->Active = true;

Have you tried setting Active after you have the other
properties set?

Quote:
IdDNSResolver1->Host = myIspDnsServerIP;
IdDNSResolver1->QueryRecords = TQueryType() << qtMX;
IdDNSResolver1->Resolve("diskwave.com");

I don't see Resolve as a method. There is ResolveDNS and
ResolveDomain.

Quote:
IPList += (i ? AnsiString(';') : AnsiString () ) + ARecord->IPAddress;

I'm not sure what you're doing here ... :-p

Quote:
ShowMessage(IPList);

If IPList is blank, then you're not entering the loop or your
dynamic cast never resolves to a TARecord. Do you know which
is the case? Try this (guessing at what you wanted to do with
IPList):

ShowMessage( IntToStr( IdDNSResolver1->QueryResult->Count ) );
for(int i=0; i < IdDNSResolver1->QueryResult->Count; ++i)
{
static bool TARecordNotFound = true;
TARecord* ARecord = dynamic_cast<TARecord*>( IdDNSResolver1->QueryResult->Items[i] );
if( ARecord )
{
if( TARecordNotFound )
{
ShowMessage( "Found a TARecord" );
TARecordNotFound = false;
}
String s;
s.sprintf( "%d ; %s", i, ARecord->IPAddress );
IPList += s;
}
}
ShowMessage( IPList );

~ JD


Back to top
Mike Ruskai
Guest





PostPosted: Sat Jul 26, 2003 11:10 am    Post subject: Re: Resolving mx record Reply with quote



On Thu, 24 Jul 2003 17:06:09 -0600, James Diskwave wrote:

Quote:
AnsiString IPList;

IdDNSResolver1->Active = true;
IdDNSResolver1->Host = myIspDnsServerIP;
IdDNSResolver1->QueryRecords = TQueryType() << qtMX;
IdDNSResolver1->Resolve("diskwave.com");


for(int i=0; i < IdDNSResolver1->QueryResult->Count; i++)
{
TARecord * ARecord = dynamic_cast<TARecord*>(
IdDNSResolver1->QueryResult->Items[i]
);
if(ARecord)
IPList += (i ? AnsiString(';') : AnsiString() ) +
ARecord->IPAddress;
}

ShowMessage(IPList);

Above is the code I am using to resolve the mx record of a domain.
When I try diskwave.com as the address to be resolved it shows a blank
message.
Should it not show the mx record?

Presumably, but it's doubtful one was found. Try using nslookup, dig, or
host to query the MX record for diskwave.com - there is none. The record is
supposed to be provided by diskwave.com itself, but there's no DNS server
running at that address.


--
- Mike

Remove 'spambegone.net' and reverse to send e-mail.



Back to top
James Diskwave
Guest





PostPosted: Wed Jul 30, 2003 1:45 am    Post subject: Re: Resolving mx record Reply with quote



Quote:
Presumably, but it's doubtful one was found. Try using nslookup, dig, or
host to query the MX record for diskwave.com - there is none. The record
is
supposed to be provided by diskwave.com itself, but there's no DNS server
running at that address.

Or someone forgot to update the mx record.
Someone like me.




Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (VCL Components Usage) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.