Re: [RFC] Change checkdnsrr() $type argument behavior
| From: | Sanford Whiteman | Date: | Tue, 23 Sep 2014 07:41:05 +0000 |
| Subject: | Re: [RFC] Change checkdnsrr() $type argument behavior | ||
| References: | 1 2 3 4 5 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-77507@lists.php.net to get a copy of this message | ||
I don't think you tracked the behavior in the bug report.
If checkdnsrr() is doing an MX query -- not including implicit MX,
only explicit MX -- it must fail when there is no MX record. It can't
return
true when there is a CNAME (and no MX record for the
canonical hostname, only an A) but false when there is an A (and no
MX record). That isn't an MX query, nor is it the way smtp-senders
operate, now or 16 years ago.
To quote the bug report, if somehost.example.com is a CNAME for
example.com, and example.com has an A record but no MX,
checkdnsrr('somehost.example.com') must not return different results
than checkdnsrr('example.com'). Either the function is trying to be
"smart" and emulate an smtp-sender (bad idea) and succeeds on both, or
it stays dumb and fails on both.