On 2014-09-23 10:11, Sanford Whiteman wrote: >> 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.
Ah okay, I think you're right. It shouldn't accept the CNAME. -- Regards, Mike -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php