Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:77513 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 67291 invoked from network); 23 Sep 2014 08:47:23 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 23 Sep 2014 08:47:23 -0000 Authentication-Results: pb1.pair.com header.from=mike.php.net@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=mike.php.net@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.49 as permitted sender) X-PHP-List-Original-Sender: mike.php.net@gmail.com X-Host-Fingerprint: 74.125.82.49 mail-wg0-f49.google.com Received: from [74.125.82.49] ([74.125.82.49:49609] helo=mail-wg0-f49.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E1/A9-09206-A9331245 for ; Tue, 23 Sep 2014 04:47:23 -0400 Received: by mail-wg0-f49.google.com with SMTP id x12so3967949wgg.8 for ; Tue, 23 Sep 2014 01:47:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=upb5o3GxWTge4SNOO681CLr5er0wsYVD8D5+rgRr3Lg=; b=0hHwphbiFvP5y85hHAcpkVXO0gxJWJcsnrUVJer5TJUQ14aSxiOkWzBBiDykhi9lln /CjYIvqatLB118FxsYR6ZdlnmrYtkrcM825O+NUr5OFR9I228rP+ajBm4/EzbKGwmO1F 8+QGS3sJ9vTWDgy3QUS9vWJxD7Ec5tSvftAMSo781LR7Q0GdAPA9JEA4Zfq+UJhVFYu3 J/yNy67BQm2MzMUchJYFVUYCMvQMo0m7fq7wNmg17tYSAG8E3u+rB1h88/kZwSw0A8hK f0QFi2GF/UlztHJsrpiN41PTfmToVhe5L1ZaljGmiCatYTJb5MzBAhtSk6JuUyoh/Fmh /n2A== X-Received: by 10.180.87.161 with SMTP id az1mr21192699wib.13.1411462040108; Tue, 23 Sep 2014 01:47:20 -0700 (PDT) Received: from [192.168.4.120] (178-18-170-101.customer.bnet.at. [178.18.170.101]) by mx.google.com with ESMTPSA id fv1sm15060100wjb.35.2014.09.23.01.47.19 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 23 Sep 2014 01:47:19 -0700 (PDT) Sender: Michael Wallner Message-ID: <54213396.4080403@php.net> Date: Tue, 23 Sep 2014 10:47:18 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.0 MIME-Version: 1.0 To: Sanford Whiteman , Pierre Joye CC: Kris Craig , PHP Internals References: <54212042.7060600@php.net> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] [RFC] Change checkdnsrr() $type argument behavior From: mike@php.net (Michael Wallner) 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