ZF-12349: Zend_Validate_EmailAddress incorrectly errors on valid IP for MX record

Issue Type: Bug Created: 2012-07-26T11:38:34.000+0000 Last Updated: 2012-12-18T20:08:26.000+0000 Status: Resolved Fix version(s): - 1.12.1 (18/Dec/12)

Reporter: Dan Jones (danneh3826) Assignee: Thomas Weidner (thomas) Tags: - Zend_Validate

  • FixForZF1.12
  • state:patch-ready-for-review
  • zf-caretaker-adamlundrigan

Related issues: Attachments: - ZF-12349.patch


Zend_Validate_EmailAddress is incorrectly erroring "INVALID_SEGMENT" on hosts where the MX record resolves to an IP address belonging to As defined by IANA RFC5735, this IP range was taken out of reservation status for allocation in the usual manner by RIR's ( in Januar 2010. ZF 1.11.12 still has a definition in its $_invalidIp array for this range, which is now out of date and incorrect.


Posted by Adam Lundrigan (adamlundrigan) on 2012-07-31T11:38:41.000+0000

Attached patch which implements RFC5752 and RFC6598. There are no tests for this functionality...the component would need to be refactored, as there is no way to mock the MX record lookup.

<pre class="highlight">
As of RFC5753 (JAN 2010), the following blocks are no logner reserved:
@see <a href=""></a>

As of RFC6598 (APR 2012), the following blocks are now reserved:
@see <a href=""></a>

Posted by Adam Lundrigan (adamlundrigan) on 2012-07-31T13:37:56.000+0000

ZF2 Pull Request:

Posted by Rob Allen (rob) on 2012-11-02T20:36:55.000+0000

Patch applied to trunk (25056) and release-1.12 (25057)

Have you found an issue?

See the Overview section for more details.


© 2006-2018 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.