> if somehost.example.com has the MX, it should return true with > checkdnsrr('somehost.example.com'). If example has the MX set to > somehost.example.com or similar, it should return true as well. Or am > I missing your point?
You are missing it, as there are no MX records involved. I'm demonstrating that the function gives incorrect results in the absence of an MX record because there is a bug in CNAME handling (or a bug in A handling, if you prefer). somehost.example.com has no MX RR. It has a CNAME (per DNS rules, the CNAME must thus be the only record for somehost.example.com). The CNAME points to example.com. example.com has no MX RR. It has an A pointing to 1.2.3.4. checkdnsrr('somehost.example.com') should return false. It returns true. checkdnsrr('example.com') should return false. It returns false. You could try to revise the docs and say, "Oh, it doesn't really mean an MX lookup, it means an explicit MX *or* implicit MX, like how a basic smtp-sender works. So that's why the CNAME --> A one returns true." Except then 'example.com' should return true as well. It does not: it returns false. Changing the docs does not fix the bug. BTW, I've been reading SMTP RFCs since we were on good ol' 821, and I'm plenty intellectually curious. I don't care if a function is supposed to partially emulate an smtp-sender when verifying a domain, or if it's supposed to run a dumb DNS MX query. It either does what it's supposed to to do or it's broken. -- S. -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php