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

Description

Zend_Validate_EmailAddress is incorrectly erroring "INVALID_SEGMENT" on hosts where the MX record resolves to an IP address belonging to 128.0.0.0/16. As defined by IANA RFC5735, this IP range was taken out of reservation status for allocation in the usual manner by RIR's (http://tools.ietf.org/html/rfc5735) 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.

Comments

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.


As of RFC5753 (JAN 2010), the following blocks are no logner reserved:
  - 128.0.0.0/16
  - 191.255.0.0/16
  - 223.255.255.0/24
@see http://tools.ietf.org/html/rfc5735#page-6

As of RFC6598 (APR 2012), the following blocks are now reserved:
  - 100.64.0.0/10
@see http://tools.ietf.org/html/rfc6598#section-7

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