Re: MX Record lookup [additional]
Re: MX Record lookup [additional]
- Subject: Re: MX Record lookup [additional]
- From: Robert Kuilman <email@hidden>
- Date: Mon, 22 Sep 2003 12:12:47 +0200
Hey all!
Okay, so the problem of me not getting any results are over, however,
now i get the same result twice.
ie. a domain has MX-records A and B.
i query for either of these MX-Records by setting the max entries
parameter to the record i want (i couldn't think of any other way for
getting all the records, except for querying them individually)
Then my results are:
AA
or
BB
or
AB
my point is, they do not come in a fixed order, meaning that from time
to time, i will not get all the MX-records...
Am i doing something wrong here ? I'm sorry to bother you all with this
so much, but i don't find apple's documentation on this extensive
enough to answer my questions.
Thanks in advance!
Robert K.
web:
http://halfduplex.net/
email: email@hidden
------------------------------------------------------------------------
---------------------
On Sunday, September 21, 2003, at 01:29 PM, Tomas Zahradnicky wrote:
The exact notifier code i use is below.
to me, it seems perfectly fine, but apparently it isn't because it
doesnt work :)
I'd like to hear your comment on it.
The notifier looks OK. Here's a snippet which does it but in a
synchronous/blocking way. You can throw it in a separate Threads
Manager thread if you wish so and create a yielding notifier so it
won't block. If you want so, then don't forget to call
OTUseSyncIdleEvents.
You probably don't set the input parameter num to the max number of
entries you want to get. Remember there may be several entries in the
MX record. Not just one!
int main(void)
{
InetSvcRef ref;
OSStatus err = noErr;
UInt16 num = 1;
InetMailExchange mx = { 0, };
err = InitOpenTransportInContext(kInitOTForApplicationMask, NULL);
if( !err )
ref = OTOpenInternetServicesInContext(
OTCreateConfiguration(kDNRName), kNilOptions, &err, NULL);
if( !err )
err = OTSetSynchronous( ref );
if( !err )
err = OTSetBlocking( ref );
if( !err )
err = OTInetMailExchange( ref, "apple.com", &num, &mx );
return 0;
}
-Tomas
_______________________________________________
macnetworkprog mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/macnetworkprog
Do not post admin requests to the list. They will be ignored.
_______________________________________________
macnetworkprog mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/macnetworkprog
Do not post admin requests to the list. They will be ignored.