#22445 [Opn->Csd]: getmxrr() and RFC 974
| From: | pollita@php.net | Date: | Mon, 03 Mar 2003 04:53:47 +0000 |
| Subject: | #22445 [Opn->Csd]: getmxrr() and RFC 974 | ||
| References: | 1 | Groups: | php.doc |
| Request: | Send a blank email to phpdoc+get-969352082@lists.php.net to get a copy of this message | ||
ID: 22445
Updated by: pollita@php.net
Reported By: jjones at aene dot ma dot cx
-Status: Open
+Status: Closed
-Bug Type: Feature/Change Request
+Bug Type: Documentation problem
Operating System: Linux/GNU
PHP Version: 4.3.1
New Comment:
Jim's comments on closing Bug #12385 are valid, however this does bear
additional documentation. Reclassifying and closing as I've just
updated the manual to reflect.
Previous Comments:
------------------------------------------------------------------------
[2003-02-26 15:05:39] jjones at aene dot ma dot cx
This report is the same as bug #12385, but with getmxrr()'s real-world
implementation it seems to need reconsideration. The only email
address validation on many sites == whether or not getmxrr() returns
TRUE.
I'm not too concerned with the politics of who should handle this
behavior, but with the usage of getmxrr() for address verification
purposes in the PHP world, I don't believe it should wait for the
appropriate fixes in the appropriate locations.
You can find an amateur fix for this behavior at
http://aene.ma.cx/php-4.3.1-getmxrr.diff
From RFC 974 ... It is possible that the list of MXs in the response to
the query will be empty. This is a special case. If the list is empty,
mailers should treat it as if it contained one RR, an MX RR with a
preference value of 0, and a host name of REMOTE. (I.e., REMOTE is its
only MX). In addition, the mailer should do no further processing on
the list, but should attempt to deliver the message to REMOTE. The
idea here is that if a domain fails to advertise any information about
a particular name we will give it the benefit of the doubt and attempt
delivery.
getmxrr() returns FALSE when the MX list is empty. The simple code
below can be used for verification.
if ( getmxrr( "php.net", $array ) ) { var_dump( $array ); }
if ( getmxrr( "aene.ma.cx", $array ) ) { var_dump( $array ); }
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=22445&edit=1