Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:77511 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 62738 invoked from network); 23 Sep 2014 08:11:26 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 23 Sep 2014 08:11:26 -0000 Authentication-Results: pb1.pair.com smtp.mail=figureonecpr@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=figureonecpr@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.212.179 as permitted sender) X-PHP-List-Original-Sender: figureonecpr@gmail.com X-Host-Fingerprint: 209.85.212.179 mail-wi0-f179.google.com Received: from [209.85.212.179] ([209.85.212.179:37580] helo=mail-wi0-f179.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 3C/B8-09206-E2B21245 for ; Tue, 23 Sep 2014 04:11:26 -0400 Received: by mail-wi0-f179.google.com with SMTP id d1so4495704wiv.0 for ; Tue, 23 Sep 2014 01:11:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=zSJwbLLvMH1uXLSyqevuaHNAqwGXzUjxZuA78PXSTfU=; b=ADM/gPPjjJZ5yja5aCpJBWnACeGyyJG7M+GJjIrdMIOOnK5bDUeQBRE1nQGt88eWX0 5ZZTKDVPN6U08wvNaGJGcgBoGRvYudYOvimUpRixwIRQjnWh/0JSvoSm7o5TPDLK0tk6 HW7tiuhKcWKFnuuj46Up2CzByGN51IS78R2Pcftfss559jyJvMq1/+VYoEITE0ZroF9G 0/OeS8tL08v649Dl3qxuxymKhuqBd5smcmhdx0MR5CMjq5iJVYVxd5CE4dWyBha8I6gu mHSxvveF3ZNqQYWPCSE56cgEja58SQRu2UVghKsa5+kvsUkX2Vxf4XLfyOmUHgOyZdqX SWIA== MIME-Version: 1.0 X-Received: by 10.194.121.232 with SMTP id ln8mr5875877wjb.65.1411459883597; Tue, 23 Sep 2014 01:11:23 -0700 (PDT) Received: by 10.216.194.132 with HTTP; Tue, 23 Sep 2014 01:11:23 -0700 (PDT) In-Reply-To: References: <54212042.7060600@php.net> Date: Tue, 23 Sep 2014 04:11:23 -0400 Message-ID: To: Pierre Joye Cc: Michael Wallner , Kris Craig , PHP Internals Content-Type: text/plain; charset=UTF-8 Subject: Re: [PHP-DEV] [RFC] Change checkdnsrr() $type argument behavior From: figureonecpr@gmail.com (Sanford Whiteman) > 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.