diff --git a/Resources/data/categories.php b/Resources/data/categories.php new file mode 100644 index 0000000..fa32c78 --- /dev/null +++ b/Resources/data/categories.php @@ -0,0 +1,76 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array( + ISEMAIL_VALID_CATEGORY => array( + 'value' => 1, + 'description' => 'Address is valid', + 'id' => 'ISEMAIL_VALID_CATEGORY', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/meta.xml'), + 'line' => 14, + ), + ), + ISEMAIL_DNSWARN => array( + 'value' => 7, + 'description' => 'Address is valid but a DNS check was not successful', + 'id' => 'ISEMAIL_DNSWARN', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/meta.xml'), + 'line' => 18, + ), + ), + ISEMAIL_RFC5321 => array( + 'value' => 15, + 'description' => 'Address is valid for SMTP but has unusual elements', + 'id' => 'ISEMAIL_RFC5321', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/meta.xml'), + 'line' => 22, + ), + ), + ISEMAIL_CFWS => array( + 'value' => 31, + 'description' => 'Address is valid within the message but cannot be used unmodified for the envelope', + 'id' => 'ISEMAIL_CFWS', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/meta.xml'), + 'line' => 26, + ), + ), + ISEMAIL_DEPREC => array( + 'value' => 63, + 'description' => 'Address contains deprecated elements but may still be valid in restricted contexts', + 'id' => 'ISEMAIL_DEPREC', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/meta.xml'), + 'line' => 30, + ), + ), + ISEMAIL_RFC5322 => array( + 'value' => 127, + 'description' => 'The address is only valid according to the broad definition of RFC 5322. It is otherwise invalid.', + 'id' => 'ISEMAIL_RFC5322', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/meta.xml'), + 'line' => 34, + ), + ), + ISEMAIL_ERR => array( + 'value' => 255, + 'description' => 'Address is invalid for any purpose', + 'id' => 'ISEMAIL_ERR', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/meta.xml'), + 'line' => 38, + ), + ), +); diff --git a/Resources/data/diagnoses.php b/Resources/data/diagnoses.php new file mode 100644 index 0000000..3dbb387 --- /dev/null +++ b/Resources/data/diagnoses.php @@ -0,0 +1,750 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array( + ISEMAIL_VALID => array( + 'value' => 0, + 'category' => ISEMAIL_VALID_CATEGORY, + 'description' => 'Address is valid. Please note that this does not mean the address actually exists, nor even that the domain actually exists. This address could be issued by the domain owner without breaking the rules of any RFCs.', + 'smtp' => 'ISEMAIL_META_SMTP_250_215', + 'references' => array(), + 'id' => 'ISEMAIL_VALID', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/meta.xml'), + 'line' => 480, + ), + ), + ISEMAIL_DNSWARN_NO_MX_RECORD => array( + 'value' => 5, + 'category' => ISEMAIL_DNSWARN, + 'description' => 'Couldn\'t find an MX record for this domain but an A-record does exist', + 'smtp' => 'ISEMAIL_META_SMTP_250_215', + 'references' => array(), + 'id' => 'ISEMAIL_DNSWARN_NO_MX_RECORD', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/meta.xml'), + 'line' => 486, + ), + ), + ISEMAIL_DNSWARN_NO_RECORD => array( + 'value' => 6, + 'category' => ISEMAIL_DNSWARN, + 'description' => 'Couldn\'t find an MX record or an A-record for this domain', + 'smtp' => 'ISEMAIL_META_SMTP_250_215', + 'references' => array(), + 'id' => 'ISEMAIL_DNSWARN_NO_RECORD', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/meta.xml'), + 'line' => 492, + ), + ), + ISEMAIL_RFC5321_TLD => array( + 'value' => 9, + 'category' => ISEMAIL_RFC5321, + 'description' => 'Address is valid but at a Top Level Domain', + 'smtp' => 'ISEMAIL_META_SMTP_250_215', + 'references' => array( + 0 => 'TLD', + ), + 'id' => 'ISEMAIL_RFC5321_TLD', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/meta.xml'), + 'line' => 498, + ), + ), + ISEMAIL_RFC5321_TLDNUMERIC => array( + 'value' => 10, + 'category' => ISEMAIL_RFC5321, + 'description' => 'Address is valid but the Top Level Domain begins with a number', + 'smtp' => 'ISEMAIL_META_SMTP_250_215', + 'references' => array( + 0 => 'TLD-format', + ), + 'id' => 'ISEMAIL_RFC5321_TLDNUMERIC', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/meta.xml'), + 'line' => 505, + ), + ), + ISEMAIL_RFC5321_QUOTEDSTRING => array( + 'value' => 11, + 'category' => ISEMAIL_RFC5321, + 'description' => 'Address is valid but contains a quoted string', + 'smtp' => 'ISEMAIL_META_SMTP_250_215', + 'references' => array( + 0 => 'quoted-string', + ), + 'id' => 'ISEMAIL_RFC5321_QUOTEDSTRING', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/meta.xml'), + 'line' => 512, + ), + ), + ISEMAIL_RFC5321_ADDRESSLITERAL => array( + 'value' => 12, + 'category' => ISEMAIL_RFC5321, + 'description' => 'Address is valid but at a literal address not a domain', + 'smtp' => 'ISEMAIL_META_SMTP_250_215', + 'references' => array( + 0 => 'address-literal', + 1 => 'address-literal-IPv4', + ), + 'id' => 'ISEMAIL_RFC5321_ADDRESSLITERAL', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/meta.xml'), + 'line' => 519, + ), + ), + ISEMAIL_RFC5321_IPV6DEPRECATED => array( + 'value' => 13, + 'category' => ISEMAIL_DEPREC, + 'description' => 'Address is valid but contains a :: that only elides one zero group. All implementations must accept and be able to handle any legitimate RFC 4291 format.', + 'smtp' => 'ISEMAIL_META_SMTP_250_215', + 'references' => array( + 0 => 'address-literal-IPv6', + ), + 'id' => 'ISEMAIL_RFC5321_IPV6DEPRECATED', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/meta.xml'), + 'line' => 527, + ), + ), + ISEMAIL_CFWS_COMMENT => array( + 'value' => 17, + 'category' => ISEMAIL_CFWS, + 'description' => 'Address contains comments', + 'smtp' => 'ISEMAIL_META_SMTP_250_215', + 'references' => array( + 0 => 'dot-atom', + ), + 'id' => 'ISEMAIL_CFWS_COMMENT', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/meta.xml'), + 'line' => 534, + ), + ), + ISEMAIL_CFWS_FWS => array( + 'value' => 18, + 'category' => ISEMAIL_CFWS, + 'description' => 'Address contains Folding White Space', + 'smtp' => 'ISEMAIL_META_SMTP_250_215', + 'references' => array( + 0 => 'local-part', + ), + 'id' => 'ISEMAIL_CFWS_FWS', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/meta.xml'), + 'line' => 541, + ), + ), + ISEMAIL_DEPREC_LOCALPART => array( + 'value' => 33, + 'category' => ISEMAIL_DEPREC, + 'description' => 'The local part is in a deprecated form', + 'smtp' => 'ISEMAIL_META_SMTP_553_511', + 'references' => array( + 0 => 'obs-local-part', + ), + 'id' => 'ISEMAIL_DEPREC_LOCALPART', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/meta.xml'), + 'line' => 548, + ), + ), + ISEMAIL_DEPREC_FWS => array( + 'value' => 34, + 'category' => ISEMAIL_DEPREC, + 'description' => 'Address contains an obsolete form of Folding White Space', + 'smtp' => 'ISEMAIL_META_SMTP_553_513', + 'references' => array( + 0 => 'obs-local-part', + 1 => 'obs-domain', + ), + 'id' => 'ISEMAIL_DEPREC_FWS', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/meta.xml'), + 'line' => 555, + ), + ), + ISEMAIL_DEPREC_QTEXT => array( + 'value' => 35, + 'category' => ISEMAIL_DEPREC, + 'description' => 'A quoted string contains a deprecated character', + 'smtp' => 'ISEMAIL_META_SMTP_553_513', + 'references' => array( + 0 => 'obs-qtext', + ), + 'id' => 'ISEMAIL_DEPREC_QTEXT', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/meta.xml'), + 'line' => 563, + ), + ), + ISEMAIL_DEPREC_QP => array( + 'value' => 36, + 'category' => ISEMAIL_DEPREC, + 'description' => 'A quoted pair contains a deprecated character', + 'smtp' => 'ISEMAIL_META_SMTP_553_513', + 'references' => array( + 0 => 'obs-qp', + ), + 'id' => 'ISEMAIL_DEPREC_QP', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/meta.xml'), + 'line' => 570, + ), + ), + ISEMAIL_DEPREC_COMMENT => array( + 'value' => 37, + 'category' => ISEMAIL_DEPREC, + 'description' => 'Address contains a comment in a position that is deprecated', + 'smtp' => 'ISEMAIL_META_SMTP_553_513', + 'references' => array( + 0 => 'obs-local-part', + 1 => 'obs-domain', + ), + 'id' => 'ISEMAIL_DEPREC_COMMENT', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/meta.xml'), + 'line' => 577, + ), + ), + ISEMAIL_DEPREC_CTEXT => array( + 'value' => 38, + 'category' => ISEMAIL_DEPREC, + 'description' => 'A comment contains a deprecated character', + 'smtp' => 'ISEMAIL_META_SMTP_553_513', + 'references' => array( + 0 => 'obs-ctext', + ), + 'id' => 'ISEMAIL_DEPREC_CTEXT', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/meta.xml'), + 'line' => 585, + ), + ), + ISEMAIL_DEPREC_CFWS_NEAR_AT => array( + 'value' => 49, + 'category' => ISEMAIL_DEPREC, + 'description' => 'Address contains a comment or Folding White Space around the @ sign', + 'smtp' => 'ISEMAIL_META_SMTP_553_513', + 'references' => array( + 0 => 'CFWS-near-at', + 1 => 'SHOULD-NOT', + ), + 'id' => 'ISEMAIL_DEPREC_CFWS_NEAR_AT', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/meta.xml'), + 'line' => 592, + ), + ), + ISEMAIL_RFC5322_DOMAIN => array( + 'value' => 65, + 'category' => ISEMAIL_RFC5322, + 'description' => 'Address is RFC 5322 compliant but contains domain characters that are not allowed by DNS', + 'smtp' => 'ISEMAIL_META_SMTP_553_512', + 'references' => array( + 0 => 'domain-RFC5322', + ), + 'id' => 'ISEMAIL_RFC5322_DOMAIN', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/meta.xml'), + 'line' => 600, + ), + ), + ISEMAIL_RFC5322_TOOLONG => array( + 'value' => 66, + 'category' => ISEMAIL_RFC5322, + 'description' => 'Address is too long', + 'smtp' => 'ISEMAIL_META_SMTP_553_513', + 'references' => array( + 0 => 'mailbox-maximum', + ), + 'id' => 'ISEMAIL_RFC5322_TOOLONG', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/meta.xml'), + 'line' => 607, + ), + ), + ISEMAIL_RFC5322_LOCAL_TOOLONG => array( + 'value' => 67, + 'category' => ISEMAIL_RFC5322, + 'description' => 'The local part of the address is too long', + 'smtp' => 'ISEMAIL_META_SMTP_553_511', + 'references' => array( + 0 => 'local-part-maximum', + ), + 'id' => 'ISEMAIL_RFC5322_LOCAL_TOOLONG', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/meta.xml'), + 'line' => 614, + ), + ), + ISEMAIL_RFC5322_DOMAIN_TOOLONG => array( + 'value' => 68, + 'category' => ISEMAIL_RFC5322, + 'description' => 'The domain part is too long', + 'smtp' => 'ISEMAIL_META_SMTP_553_512', + 'references' => array( + 0 => 'domain-maximum', + ), + 'id' => 'ISEMAIL_RFC5322_DOMAIN_TOOLONG', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/meta.xml'), + 'line' => 621, + ), + ), + ISEMAIL_RFC5322_LABEL_TOOLONG => array( + 'value' => 69, + 'category' => ISEMAIL_RFC5322, + 'description' => 'The domain part contains an element that is too long', + 'smtp' => 'ISEMAIL_META_SMTP_553_512', + 'references' => array( + 0 => 'label', + ), + 'id' => 'ISEMAIL_RFC5322_LABEL_TOOLONG', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/meta.xml'), + 'line' => 628, + ), + ), + ISEMAIL_RFC5322_DOMAINLITERAL => array( + 'value' => 70, + 'category' => ISEMAIL_RFC5322, + 'description' => 'The domain literal is not a valid RFC 5321 address literal', + 'smtp' => 'ISEMAIL_META_SMTP_553_513', + 'references' => array( + 0 => 'domain-literal', + ), + 'id' => 'ISEMAIL_RFC5322_DOMAINLITERAL', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/meta.xml'), + 'line' => 635, + ), + ), + ISEMAIL_RFC5322_DOMLIT_OBSDTEXT => array( + 'value' => 71, + 'category' => ISEMAIL_RFC5322, + 'description' => 'The domain literal is not a valid RFC 5321 address literal and it contains obsolete characters', + 'smtp' => 'ISEMAIL_META_SMTP_553_513', + 'references' => array( + 0 => 'obs-dtext', + ), + 'id' => 'ISEMAIL_RFC5322_DOMLIT_OBSDTEXT', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/meta.xml'), + 'line' => 642, + ), + ), + ISEMAIL_RFC5322_IPV6_GRPCOUNT => array( + 'value' => 72, + 'category' => ISEMAIL_RFC5322, + 'description' => 'The IPv6 literal address contains the wrong number of groups', + 'smtp' => 'ISEMAIL_META_SMTP_553_513', + 'references' => array( + 0 => 'address-literal-IPv6', + ), + 'id' => 'ISEMAIL_RFC5322_IPV6_GRPCOUNT', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/meta.xml'), + 'line' => 649, + ), + ), + ISEMAIL_RFC5322_IPV6_2X2XCOLON => array( + 'value' => 73, + 'category' => ISEMAIL_RFC5322, + 'description' => 'The IPv6 literal address contains too many :: sequences', + 'smtp' => 'ISEMAIL_META_SMTP_553_513', + 'references' => array( + 0 => 'address-literal-IPv6', + ), + 'id' => 'ISEMAIL_RFC5322_IPV6_2X2XCOLON', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/meta.xml'), + 'line' => 656, + ), + ), + ISEMAIL_RFC5322_IPV6_BADCHAR => array( + 'value' => 74, + 'category' => ISEMAIL_RFC5322, + 'description' => 'The IPv6 address contains an illegal group of characters', + 'smtp' => 'ISEMAIL_META_SMTP_553_513', + 'references' => array( + 0 => 'address-literal-IPv6', + ), + 'id' => 'ISEMAIL_RFC5322_IPV6_BADCHAR', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/meta.xml'), + 'line' => 663, + ), + ), + ISEMAIL_RFC5322_IPV6_MAXGRPS => array( + 'value' => 75, + 'category' => ISEMAIL_RFC5322, + 'description' => 'The IPv6 address has too many groups', + 'smtp' => 'ISEMAIL_META_SMTP_553_513', + 'references' => array( + 0 => 'address-literal-IPv6', + ), + 'id' => 'ISEMAIL_RFC5322_IPV6_MAXGRPS', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/meta.xml'), + 'line' => 670, + ), + ), + ISEMAIL_RFC5322_IPV6_COLONSTRT => array( + 'value' => 76, + 'category' => ISEMAIL_RFC5322, + 'description' => 'IPv6 address starts with a single colon', + 'smtp' => 'ISEMAIL_META_SMTP_553_513', + 'references' => array( + 0 => 'address-literal-IPv6', + ), + 'id' => 'ISEMAIL_RFC5322_IPV6_COLONSTRT', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/meta.xml'), + 'line' => 677, + ), + ), + ISEMAIL_RFC5322_IPV6_COLONEND => array( + 'value' => 77, + 'category' => ISEMAIL_RFC5322, + 'description' => 'IPv6 address ends with a single colon', + 'smtp' => 'ISEMAIL_META_SMTP_553_513', + 'references' => array( + 0 => 'address-literal-IPv6', + ), + 'id' => 'ISEMAIL_RFC5322_IPV6_COLONEND', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/meta.xml'), + 'line' => 684, + ), + ), + ISEMAIL_ERR_EXPECTING_DTEXT => array( + 'value' => 129, + 'category' => ISEMAIL_ERR, + 'description' => 'A domain literal contains a character that is not allowed', + 'smtp' => 'ISEMAIL_META_SMTP_553_512', + 'references' => array( + 0 => 'dtext', + ), + 'id' => 'ISEMAIL_ERR_EXPECTING_DTEXT', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/meta.xml'), + 'line' => 691, + ), + ), + ISEMAIL_ERR_NOLOCALPART => array( + 'value' => 130, + 'category' => ISEMAIL_ERR, + 'description' => 'Address has no local part', + 'smtp' => 'ISEMAIL_META_SMTP_553_511', + 'references' => array( + 0 => 'local-part', + ), + 'id' => 'ISEMAIL_ERR_NOLOCALPART', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/meta.xml'), + 'line' => 698, + ), + ), + ISEMAIL_ERR_NODOMAIN => array( + 'value' => 131, + 'category' => ISEMAIL_ERR, + 'description' => 'Address has no domain part', + 'smtp' => 'ISEMAIL_META_SMTP_553_512', + 'references' => array( + 0 => 'addr-spec', + 1 => 'mailbox', + ), + 'id' => 'ISEMAIL_ERR_NODOMAIN', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/meta.xml'), + 'line' => 705, + ), + ), + ISEMAIL_ERR_CONSECUTIVEDOTS => array( + 'value' => 132, + 'category' => ISEMAIL_ERR, + 'description' => 'The address may not contain consecutive dots', + 'smtp' => 'ISEMAIL_META_SMTP_553_511', + 'references' => array( + 0 => 'local-part', + 1 => 'domain-RFC5322', + 2 => 'domain-RFC5321', + ), + 'id' => 'ISEMAIL_ERR_CONSECUTIVEDOTS', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/meta.xml'), + 'line' => 713, + ), + ), + ISEMAIL_ERR_ATEXT_AFTER_CFWS => array( + 'value' => 133, + 'category' => ISEMAIL_ERR, + 'description' => 'Address contains text after a comment or Folding White Space', + 'smtp' => 'ISEMAIL_META_SMTP_553_513', + 'references' => array( + 0 => 'local-part', + 1 => 'domain-RFC5322', + ), + 'id' => 'ISEMAIL_ERR_ATEXT_AFTER_CFWS', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/meta.xml'), + 'line' => 722, + ), + ), + ISEMAIL_ERR_ATEXT_AFTER_QS => array( + 'value' => 134, + 'category' => ISEMAIL_ERR, + 'description' => 'Address contains text after a quoted string', + 'smtp' => 'ISEMAIL_META_SMTP_553_511', + 'references' => array( + 0 => 'local-part', + ), + 'id' => 'ISEMAIL_ERR_ATEXT_AFTER_QS', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/meta.xml'), + 'line' => 730, + ), + ), + ISEMAIL_ERR_ATEXT_AFTER_DOMLIT => array( + 'value' => 135, + 'category' => ISEMAIL_ERR, + 'description' => 'Extra characters were found after the end of the domain literal', + 'smtp' => 'ISEMAIL_META_SMTP_553_512', + 'references' => array( + 0 => 'domain-RFC5322', + ), + 'id' => 'ISEMAIL_ERR_ATEXT_AFTER_DOMLIT', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/meta.xml'), + 'line' => 737, + ), + ), + ISEMAIL_ERR_EXPECTING_QPAIR => array( + 'value' => 136, + 'category' => ISEMAIL_ERR, + 'description' => 'The address contains a character that is not allowed in a quoted pair', + 'smtp' => 'ISEMAIL_META_SMTP_553_511', + 'references' => array( + 0 => 'quoted-pair', + ), + 'id' => 'ISEMAIL_ERR_EXPECTING_QPAIR', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/meta.xml'), + 'line' => 744, + ), + ), + ISEMAIL_ERR_EXPECTING_ATEXT => array( + 'value' => 137, + 'category' => ISEMAIL_ERR, + 'description' => 'Address contains a character that is not allowed', + 'smtp' => 'ISEMAIL_META_SMTP_553_511', + 'references' => array( + 0 => 'atext', + ), + 'id' => 'ISEMAIL_ERR_EXPECTING_ATEXT', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/meta.xml'), + 'line' => 751, + ), + ), + ISEMAIL_ERR_EXPECTING_QTEXT => array( + 'value' => 138, + 'category' => ISEMAIL_ERR, + 'description' => 'A quoted string contains a character that is not allowed', + 'smtp' => 'ISEMAIL_META_SMTP_553_511', + 'references' => array( + 0 => 'qtext', + ), + 'id' => 'ISEMAIL_ERR_EXPECTING_QTEXT', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/meta.xml'), + 'line' => 758, + ), + ), + ISEMAIL_ERR_EXPECTING_CTEXT => array( + 'value' => 139, + 'category' => ISEMAIL_ERR, + 'description' => 'A comment contains a character that is not allowed', + 'smtp' => 'ISEMAIL_META_SMTP_553_511', + 'references' => array( + 0 => 'qtext', + ), + 'id' => 'ISEMAIL_ERR_EXPECTING_CTEXT', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/meta.xml'), + 'line' => 765, + ), + ), + ISEMAIL_ERR_BACKSLASHEND => array( + 'value' => 140, + 'category' => ISEMAIL_ERR, + 'description' => 'The address can\'t end with a backslash', + 'smtp' => 'ISEMAIL_META_SMTP_553_512', + 'references' => array( + 0 => 'domain-RFC5322', + 1 => 'domain-RFC5321', + 2 => 'quoted-pair', + ), + 'id' => 'ISEMAIL_ERR_BACKSLASHEND', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/meta.xml'), + 'line' => 772, + ), + ), + ISEMAIL_ERR_DOT_START => array( + 'value' => 141, + 'category' => ISEMAIL_ERR, + 'description' => 'Neither part of the address may begin with a dot', + 'smtp' => 'ISEMAIL_META_SMTP_553_511', + 'references' => array( + 0 => 'local-part', + 1 => 'domain-RFC5322', + 2 => 'domain-RFC5321', + ), + 'id' => 'ISEMAIL_ERR_DOT_START', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/meta.xml'), + 'line' => 781, + ), + ), + ISEMAIL_ERR_DOT_END => array( + 'value' => 142, + 'category' => ISEMAIL_ERR, + 'description' => 'Neither part of the address may end with a dot', + 'smtp' => 'ISEMAIL_META_SMTP_553_511', + 'references' => array( + 0 => 'local-part', + 1 => 'domain-RFC5322', + 2 => 'domain-RFC5321', + ), + 'id' => 'ISEMAIL_ERR_DOT_END', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/meta.xml'), + 'line' => 790, + ), + ), + ISEMAIL_ERR_DOMAINHYPHENSTART => array( + 'value' => 143, + 'category' => ISEMAIL_ERR, + 'description' => 'A domain or subdomain cannot begin with a hyphen', + 'smtp' => 'ISEMAIL_META_SMTP_553_512', + 'references' => array( + 0 => 'sub-domain', + ), + 'id' => 'ISEMAIL_ERR_DOMAINHYPHENSTART', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/meta.xml'), + 'line' => 799, + ), + ), + ISEMAIL_ERR_DOMAINHYPHENEND => array( + 'value' => 144, + 'category' => ISEMAIL_ERR, + 'description' => 'A domain or subdomain cannot end with a hyphen', + 'smtp' => 'ISEMAIL_META_SMTP_553_512', + 'references' => array( + 0 => 'sub-domain', + ), + 'id' => 'ISEMAIL_ERR_DOMAINHYPHENEND', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/meta.xml'), + 'line' => 806, + ), + ), + ISEMAIL_ERR_UNCLOSEDQUOTEDSTR => array( + 'value' => 145, + 'category' => ISEMAIL_ERR, + 'description' => 'Unclosed quoted string', + 'smtp' => 'ISEMAIL_META_SMTP_553_512', + 'references' => array( + 0 => 'quoted-string', + ), + 'id' => 'ISEMAIL_ERR_UNCLOSEDQUOTEDSTR', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/meta.xml'), + 'line' => 813, + ), + ), + ISEMAIL_ERR_UNCLOSEDCOMMENT => array( + 'value' => 146, + 'category' => ISEMAIL_ERR, + 'description' => 'Unclosed comment', + 'smtp' => 'ISEMAIL_META_SMTP_553_512', + 'references' => array( + 0 => 'CFWS', + ), + 'id' => 'ISEMAIL_ERR_UNCLOSEDCOMMENT', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/meta.xml'), + 'line' => 820, + ), + ), + ISEMAIL_ERR_UNCLOSEDDOMLIT => array( + 'value' => 147, + 'category' => ISEMAIL_ERR, + 'description' => 'Domain literal is missing its closing bracket', + 'smtp' => 'ISEMAIL_META_SMTP_553_512', + 'references' => array( + 0 => 'domain-literal', + ), + 'id' => 'ISEMAIL_ERR_UNCLOSEDDOMLIT', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/meta.xml'), + 'line' => 827, + ), + ), + ISEMAIL_ERR_FWS_CRLF_X2 => array( + 'value' => 148, + 'category' => ISEMAIL_ERR, + 'description' => 'Folding White Space contains consecutive CRLF sequences', + 'smtp' => 'ISEMAIL_META_SMTP_553_513', + 'references' => array( + 0 => 'CFWS', + ), + 'id' => 'ISEMAIL_ERR_FWS_CRLF_X2', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/meta.xml'), + 'line' => 834, + ), + ), + ISEMAIL_ERR_FWS_CRLF_END => array( + 'value' => 149, + 'category' => ISEMAIL_ERR, + 'description' => 'Folding White Space ends with a CRLF sequence', + 'smtp' => 'ISEMAIL_META_SMTP_553_513', + 'references' => array( + 0 => 'CFWS', + ), + 'id' => 'ISEMAIL_ERR_FWS_CRLF_END', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/meta.xml'), + 'line' => 841, + ), + ), + ISEMAIL_ERR_CR_NO_LF => array( + 'value' => 150, + 'category' => ISEMAIL_ERR, + 'description' => 'Address contains a carriage return that is not followed by a line feed', + 'smtp' => 'ISEMAIL_META_SMTP_553_513', + 'references' => array( + 0 => 'CFWS', + 1 => 'CRLF', + ), + 'id' => 'ISEMAIL_ERR_CR_NO_LF', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/meta.xml'), + 'line' => 848, + ), + ), +); diff --git a/Resources/data/references.php b/Resources/data/references.php new file mode 100644 index 0000000..27010b9 --- /dev/null +++ b/Resources/data/references.php @@ -0,0 +1,620 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array( + 'local-part' => array( + 'cite' => 'RFC 5322 section 3.4.1', + 'quote' => ' + local-part = dot-atom / quoted-string / obs-local-part + + dot-atom = [CFWS] dot-atom-text [CFWS] + + dot-atom-text = 1*atext *("." 1*atext) + + quoted-string = [CFWS] + DQUOTE *([FWS] qcontent) [FWS] DQUOTE + [CFWS] + + obs-local-part = word *("." word) + + word = atom / quoted-string + + atom = [CFWS] 1*atext [CFWS]', + 'link' => 'http://tools.ietf.org/html/rfc5322#section-3.4.1', + 'id' => 'local-part', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/meta.xml'), + 'line' => 68, + ), + ), + 'local-part-maximum' => array( + 'cite' => 'RFC 5322 section 4.5.3.1.1', + 'quote' => ' + The maximum total length of a user name or other local-part is 64 + octets.', + 'link' => 'http://tools.ietf.org/html/rfc5321#section-4.5.3.1.1', + 'id' => 'local-part-maximum', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/meta.xml'), + 'line' => 87, + ), + ), + 'obs-local-part' => array( + 'cite' => 'RFC 5322 section 3.4.1', + 'quote' => ' + obs-local-part = word *("." word) + + word = atom / quoted-string + + atom = [CFWS] 1*atext [CFWS] + + quoted-string = [CFWS] + DQUOTE *([FWS] qcontent) [FWS] DQUOTE + [CFWS] +', + 'link' => 'http://tools.ietf.org/html/rfc5322#section-3.4.1', + 'id' => 'obs-local-part', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/meta.xml'), + 'line' => 93, + ), + ), + 'dot-atom' => array( + 'cite' => 'RFC 5322 section 3.4.1', + 'quote' => ' + dot-atom = [CFWS] dot-atom-text [CFWS] + + dot-atom-text = 1*atext *("." 1*atext) +', + 'link' => 'http://tools.ietf.org/html/rfc5322#section-3.4.1', + 'id' => 'dot-atom', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/meta.xml'), + 'line' => 107, + ), + ), + 'quoted-string' => array( + 'cite' => 'RFC 5322 section 3.4.1', + 'quote' => ' + quoted-string = [CFWS] + DQUOTE *([FWS] qcontent) [FWS] DQUOTE + [CFWS] + + qcontent = qtext / quoted-pair + + qtext = %d33 / ; Printable US-ASCII + %d35-91 / ; characters not including + %d93-126 / ; "\\" or the quote character + obs-qtext + + quoted-pair = ("\\" (VCHAR / WSP)) / obs-qp +', + 'link' => 'http://tools.ietf.org/html/rfc5322#section-3.4.1', + 'id' => 'quoted-string', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/meta.xml'), + 'line' => 115, + ), + ), + 'CFWS-near-at' => array( + 'cite' => 'RFC 5322 section 3.4.1', + 'quote' => ' + Comments and folding white space + SHOULD NOT be used around the "@" in the addr-spec. +', + 'link' => 'http://tools.ietf.org/html/rfc5322#section-3.4.1', + 'id' => 'CFWS-near-at', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/meta.xml'), + 'line' => 132, + ), + ), + 'SHOULD-NOT' => array( + 'cite' => 'RFC 2119 section 4', + 'quote' => ' + 4. SHOULD NOT This phrase, or the phrase "NOT RECOMMENDED" mean that + there may exist valid reasons in particular circumstances when the + particular behavior is acceptable or even useful, but the full + implications should be understood and the case carefully weighed + before implementing any behavior described with this label. +', + 'link' => 'http://tools.ietf.org/html/rfc2119', + 'id' => 'SHOULD-NOT', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/meta.xml'), + 'line' => 139, + ), + ), + 'atext' => array( + 'cite' => 'RFC 5322 section 3.2.3', + 'quote' => ' + atext = ALPHA / DIGIT / ; Printable US-ASCII + "!" / "#" / ; characters not including + "$" / "%" / ; specials. Used for atoms. + "&" / "\'" / + "*" / "+" / + "-" / "/" / + "=" / "?" / + "^" / "_" / + "`" / "{" / + "|" / "}" / + "~" +', + 'link' => 'http://tools.ietf.org/html/rfc5322#section-3.2.3', + 'id' => 'atext', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/meta.xml'), + 'line' => 149, + ), + ), + 'obs-domain' => array( + 'cite' => 'RFC 5322 section 3.4.1', + 'quote' => ' + obs-domain = atom *("." atom) + + atom = [CFWS] 1*atext [CFWS] +', + 'link' => 'http://tools.ietf.org/html/rfc5322#section-3.4.1', + 'id' => 'obs-domain', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/meta.xml'), + 'line' => 165, + ), + ), + 'domain-RFC5322' => array( + 'cite' => 'RFC 5322 section 3.4.1', + 'quote' => ' + domain = dot-atom / domain-literal / obs-domain + + dot-atom = [CFWS] dot-atom-text [CFWS] + + dot-atom-text = 1*atext *("." 1*atext) +', + 'link' => 'http://tools.ietf.org/html/rfc5322#section-3.4.1', + 'id' => 'domain-RFC5322', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/meta.xml'), + 'line' => 173, + ), + ), + 'domain-RFC5321' => array( + 'cite' => 'RFC 5321 section 4.1.2', + 'quote' => ' + Domain = sub-domain *("." sub-domain) +', + 'link' => 'http://tools.ietf.org/html/rfc5321#section-4.1.2', + 'id' => 'domain-RFC5321', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/meta.xml'), + 'line' => 183, + ), + ), + 'sub-domain' => array( + 'cite' => 'RFC 5321 section 4.1.2', + 'quote' => ' + Domain = sub-domain *("." sub-domain) + + Let-dig = ALPHA / DIGIT + + Ldh-str = *( ALPHA / DIGIT / "-" ) Let-dig +', + 'link' => 'http://tools.ietf.org/html/rfc5321#section-4.1.2', + 'id' => 'sub-domain', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/meta.xml'), + 'line' => 189, + ), + ), + 'label' => array( + 'cite' => 'RFC 5321 section 4.1.2', + 'quote' => ' + labels 63 octets or less +', + 'link' => 'http://tools.ietf.org/html/rfc1035#section-2.3.4', + 'id' => 'label', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/meta.xml'), + 'line' => 199, + ), + ), + 'CRLF' => array( + 'cite' => 'RFC 5234 section 2.3', + 'quote' => ' + CRLF = %d13.10 +', + 'link' => 'http://tools.ietf.org/html/rfc5234#section-2.3', + 'id' => 'CRLF', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/meta.xml'), + 'line' => 205, + ), + ), + 'CFWS' => array( + 'cite' => 'RFC 5322 section 3.2.2', + 'quote' => ' + CFWS = (1*([FWS] comment) [FWS]) / FWS + + FWS = ([*WSP CRLF] 1*WSP) / obs-FWS + ; Folding white space + + comment = "(" *([FWS] ccontent) [FWS] ")" + + ccontent = ctext / quoted-pair / comment + + ctext = %d33-39 / ; Printable US-ASCII + %d42-91 / ; characters not including + %d93-126 / ; "(", ")", or "\\" + obs-ctext +', + 'link' => 'http://tools.ietf.org/html/rfc5322#section-3.2.2', + 'id' => 'CFWS', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/meta.xml'), + 'line' => 211, + ), + ), + 'domain-literal' => array( + 'cite' => 'RFC 5322 section 3.4.1', + 'quote' => ' + domain-literal = [CFWS] "[" *([FWS] dtext) [FWS] "]" [CFWS] +', + 'link' => 'http://tools.ietf.org/html/rfc5322#section-3.4.1', + 'id' => 'domain-literal', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/meta.xml'), + 'line' => 229, + ), + ), + 'address-literal' => array( + 'cite' => 'RFC 5321 section 4.1.2', + 'quote' => ' + address-literal = "[" ( IPv4-address-literal / + IPv6-address-literal / + General-address-literal ) "]" +', + 'link' => 'http://tools.ietf.org/html/rfc5321#section-4.1.2', + 'id' => 'address-literal', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/meta.xml'), + 'line' => 235, + ), + ), + 'address-literal-IPv4' => array( + 'cite' => 'RFC 5321 section 4.1.3', + 'quote' => ' + IPv4-address-literal = Snum 3("." Snum) + + Snum = 1*3DIGIT + ; representing a decimal integer + ; value in the range 0 through 255 +', + 'link' => 'http://tools.ietf.org/html/rfc5321#section-4.1.3', + 'id' => 'address-literal-IPv4', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/meta.xml'), + 'line' => 243, + ), + ), + 'address-literal-IPv6' => array( + 'cite' => 'RFC 5321 section 4.1.3', + 'quote' => ' + IPv6-address-literal = "IPv6:" IPv6-addr + + IPv6-addr = IPv6-full / IPv6-comp / IPv6v4-full / IPv6v4-comp + + IPv6-hex = 1*4HEXDIG + + IPv6-full = IPv6-hex 7(":" IPv6-hex) + + IPv6-comp = [IPv6-hex *5(":" IPv6-hex)] "::" + [IPv6-hex *5(":" IPv6-hex)] + ; The "::" represents at least 2 16-bit groups of + ; zeros. No more than 6 groups in addition to the + ; "::" may be present. + + IPv6v4-full = IPv6-hex 5(":" IPv6-hex) ":" IPv4-address-literal + + IPv6v4-comp = [IPv6-hex *3(":" IPv6-hex)] "::" + [IPv6-hex *3(":" IPv6-hex) ":"] + IPv4-address-literal + ; The "::" represents at least 2 16-bit groups of + ; zeros. No more than 4 groups in addition to the + ; "::" and IPv4-address-literal may be present. +', + 'link' => 'http://tools.ietf.org/html/rfc5321#section-4.1.3', + 'id' => 'address-literal-IPv6', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/meta.xml'), + 'line' => 253, + ), + ), + 'dtext' => array( + 'cite' => 'RFC 5322 section 3.4.1', + 'quote' => ' + dtext = %d33-90 / ; Printable US-ASCII + %d94-126 / ; characters not including + obs-dtext ; "[", "]", or "\\" +', + 'link' => 'http://tools.ietf.org/html/rfc5322#section-3.4.1', + 'id' => 'dtext', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/meta.xml'), + 'line' => 280, + ), + ), + 'obs-dtext' => array( + 'cite' => 'RFC 5322 section 3.4.1', + 'quote' => ' + obs-dtext = obs-NO-WS-CTL / quoted-pair + + obs-NO-WS-CTL = %d1-8 / ; US-ASCII control + %d11 / ; characters that do not + %d12 / ; include the carriage + %d14-31 / ; return, line feed, and + %d127 ; white space characters +', + 'link' => 'http://tools.ietf.org/html/rfc5322#section-3.4.1', + 'id' => 'obs-dtext', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/meta.xml'), + 'line' => 288, + ), + ), + 'qtext' => array( + 'cite' => 'RFC 5322 section 3.2.4', + 'quote' => ' + qtext = %d33 / ; Printable US-ASCII + %d35-91 / ; characters not including + %d93-126 / ; "\\" or the quote character + obs-qtext +', + 'link' => 'http://tools.ietf.org/html/rfc5322#section-3.2.4', + 'id' => 'qtext', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/meta.xml'), + 'line' => 300, + ), + ), + 'obs-qtext' => array( + 'cite' => 'RFC 5322 section 4.1', + 'quote' => ' + obs-qtext = obs-NO-WS-CTL + + obs-NO-WS-CTL = %d1-8 / ; US-ASCII control + %d11 / ; characters that do not + %d12 / ; include the carriage + %d14-31 / ; return, line feed, and + %d127 ; white space characters +', + 'link' => 'http://tools.ietf.org/html/rfc5322#section-4.1', + 'id' => 'obs-qtext', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/meta.xml'), + 'line' => 309, + ), + ), + 'ctext' => array( + 'cite' => 'RFC 5322 section 3.2.3', + 'quote' => ' + ctext = %d33-39 / ; Printable US-ASCII + %d42-91 / ; characters not including + %d93-126 / ; "(", ")", or "\\" + obs-ctext +', + 'link' => 'http://tools.ietf.org/html/rfc5322#section-3.2.3', + 'id' => 'ctext', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/meta.xml'), + 'line' => 321, + ), + ), + 'obs-ctext' => array( + 'cite' => 'RFC 5322 section 4.1', + 'quote' => ' + obs-qtext = obs-NO-WS-CTL + + obs-NO-WS-CTL = %d1-8 / ; US-ASCII control + %d11 / ; characters that do not + %d12 / ; include the carriage + %d14-31 / ; return, line feed, and + %d127 ; white space characters +', + 'link' => 'http://tools.ietf.org/html/rfc5322#section-4.1', + 'id' => 'obs-ctext', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/meta.xml'), + 'line' => 330, + ), + ), + 'quoted-pair' => array( + 'cite' => 'RFC 5322 section 3.2.1', + 'quote' => ' + quoted-pair = ("\\" (VCHAR / WSP)) / obs-qp + + VCHAR = %d33-126 ; visible (printing) characters + WSP = SP / HTAB ; white space +', + 'link' => 'http://tools.ietf.org/html/rfc5322#section-3.2.1', + 'id' => 'quoted-pair', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/meta.xml'), + 'line' => 342, + ), + ), + 'obs-qp' => array( + 'cite' => 'RFC 5322 section 4.1', + 'quote' => ' + obs-qp = "\\" (%d0 / obs-NO-WS-CTL / LF / CR) + + obs-NO-WS-CTL = %d1-8 / ; US-ASCII control + %d11 / ; characters that do not + %d12 / ; include the carriage + %d14-31 / ; return, line feed, and + %d127 ; white space characters +', + 'link' => 'http://tools.ietf.org/html/rfc5322#section-4.1', + 'id' => 'obs-qp', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/meta.xml'), + 'line' => 351, + ), + ), + 'TLD' => array( + 'cite' => 'RFC 5321 section 2.3.5', + 'quote' => ' + In the case + of a top-level domain used by itself in an email address, a single + string is used without any dots. This makes the requirement, + described in more detail below, that only fully-qualified domain + names appear in SMTP transactions on the public Internet, + particularly important where top-level domains are involved. +', + 'link' => 'http://tools.ietf.org/html/rfc5321#section-2.3.5', + 'id' => 'TLD', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/meta.xml'), + 'line' => 363, + ), + ), + 'TLD-format' => array( + 'cite' => 'John Klensin, RFC 1123 erratum 1353', + 'quote' => ' + Errata ID 1081, reported 2007-11-20, identifies a problem with the + evolution of naming of top-level domains and the text of RFC 1123. + It reads: + + Section 2.1 says: + + However, a valid host name can never + have the dotted-decimal form #.#.#.#, since at least the + highest-level component label will be alphabetic. + + It should say: + + However, a valid host name can never + have the dotted-decimal form #.#.#.#, since at least the + highest-level component label will be not all-numeric. + + Notes: + + RFC 3696 section 2 states: "There is an additional rule that + essentially requires that top-level domain names not be + all-numeric." The eleven IDN test TLDs created in + September 2007 contain hyphen-minus as specified in the + IDNA RFCs. + It should say: + + However, a valid host name can never have the dotted-decimal + form #.#.#.#, since this change does not permit the highest-level + component label to start with a digit even if it is not all-numeric. + Notes: + + This is a correct identification of the problem, but the wrong fix. + RFC 3696, which ID 1081 cites, is an informational document that is + deliberately relaxed about the fine details and says so. It is not + relevant to determination of the text that should have been (with + perfect knowledge of the future) in 1123. + + Based on discussions when we were doing RFC 1591 and subsequently, + the expectation then (and presumably when 1123 was written) was + that the name of any new TLD would follow the rules for the + existing ones, i.e., that they would be exactly two or three + characters long and be all-alphabetic (which is exactly what 1123 + says). The slightly-odd "will be" language in 1123 was, I believe, + because that restriction was expected to be enforced by IANA, + rather than being a protocol issue. ICANN, with a different set of + assignment policies, effectively eliminated the length rule with + the TLDs allocated in 2000. IDNA (RFC 3490) uses a syntax for IDNs + that requires embedded hyphens in TLDs if there were ever to be an + actual IDN TLD (hence the comment in ID 1081 about the IANA IDN + testbed). + + While the proposed correction in Errata ID 1081 would fix the + problem by imposing the narrowest possible restriction ("not + all-numeric"), the original host name rule and the original + statement in 1123 both assume the possibility of a minimal check + to differentiate between domain names and IP addresses, i.e., + checking the first digit only. Because I believe that there are + probably implementations that depend on such minimal parsing --some + probably ancient and embedded-- it would appear to be wise to relax + the rule as little as possible and, in particular, to restrict the + "leading digit" exception to domains below the top-level, as 1123 + effectively does. + + The suggested text above reflects that reasoning. Because of the + possible consequences of this issue, I would hope that it would be + discussed with the relevant DNS-related WGs, the Root Server Advisory + Committee (RSAC), and with IANA for comment and as a heads-up. This + issue is substantive enough that it should probably be dealt with by + a document that explicitly updates 1123 and that is processed on the + Standards Track, but an accurate statement in the errata is the + next-best option until that can be done. In the interim and while + this suggestion is being discussed, Errata ID 1081 should probably + be taken out of "validated" status.', + 'link' => 'http://www.rfc-editor.org/errata_search.php?eid=1353', + 'id' => 'TLD-format', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/meta.xml'), + 'line' => 374, + ), + ), + 'mailbox-maximum' => array( + 'cite' => 'Dominic Sayers, RFC 3696 erratum 1690', + 'quote' => ' + However, there is a restriction in RFC 2821 on the length of an + address in MAIL and RCPT commands of 254 characters. Since addresses + that do not fit in those fields are not normally useful, the upper + limit on address lengths should normally be considered to be 254. +', + 'link' => 'http://www.rfc-editor.org/errata_search.php?eid=1690', + 'id' => 'mailbox-maximum', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/meta.xml'), + 'line' => 450, + ), + ), + 'domain-maximum' => array( + 'cite' => 'RFC 5321 section 4.5.3.1.2', + 'quote' => ' + The maximum total length of a domain name or number is 255 octets. +', + 'link' => 'http://tools.ietf.org/html/rfc1035#section-4.5.3.1.2', + 'id' => 'domain-maximum', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/meta.xml'), + 'line' => 459, + ), + ), + 'mailbox' => array( + 'cite' => 'RFC 5321 section 4.1.2', + 'quote' => ' + Mailbox = Local-part "@" ( Domain / address-literal ) +', + 'link' => 'http://tools.ietf.org/html/rfc5321#section-4.1.2', + 'id' => 'mailbox', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/meta.xml'), + 'line' => 465, + ), + ), + 'addr-spec' => array( + 'cite' => 'RFC 5322 section 3.4.1', + 'quote' => ' + addr-spec = local-part "@" domain +', + 'link' => 'http://tools.ietf.org/html/rfc5322#section-3.4.1', + 'id' => 'addr-spec', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/meta.xml'), + 'line' => 471, + ), + ), +); diff --git a/Resources/data/smtp.php b/Resources/data/smtp.php new file mode 100644 index 0000000..e5a195b --- /dev/null +++ b/Resources/data/smtp.php @@ -0,0 +1,58 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array( + 'ISEMAIL_META_SMTP_250_215' => array( + 'text' => '250 2.1.5 ok', + 'value' => '2.1.5', + 'id' => 'ISEMAIL_META_SMTP_250_215', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/meta.xml'), + 'line' => 45, + ), + ), + 'ISEMAIL_META_SMTP_553_510' => array( + 'text' => '553 5.1.0 Other address status', + 'value' => '5.1.0', + 'id' => 'ISEMAIL_META_SMTP_553_510', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/meta.xml'), + 'line' => 49, + ), + ), + 'ISEMAIL_META_SMTP_553_511' => array( + 'text' => '553 5.1.1 Bad destination mailbox address', + 'value' => '5.1.1', + 'id' => 'ISEMAIL_META_SMTP_553_511', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/meta.xml'), + 'line' => 53, + ), + ), + 'ISEMAIL_META_SMTP_553_512' => array( + 'text' => '553 5.1.2 Bad destination system address', + 'value' => '5.1.2', + 'id' => 'ISEMAIL_META_SMTP_553_512', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/meta.xml'), + 'line' => 57, + ), + ), + 'ISEMAIL_META_SMTP_553_513' => array( + 'text' => '553 5.1.3 Bad destination mailbox address syntax', + 'value' => '5.1.3', + 'id' => 'ISEMAIL_META_SMTP_553_513', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/meta.xml'), + 'line' => 61, + ), + ), +); diff --git a/Resources/data/tests.php b/Resources/data/tests.php new file mode 100644 index 0000000..3c9358f --- /dev/null +++ b/Resources/data/tests.php @@ -0,0 +1,5397 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return array( + '' => array( + 'address' => '', + 'analysis' => array( + 'category' => ISEMAIL_ERR, + 'diagnosis' => array( + 0 => ISEMAIL_ERR_NODOMAIN, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Michael Rushton', + 'link' => 'http://squiloople.com/tag/email/', + ), + 'id' => '1', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 40, + ), + ), + 'test' => array( + 'address' => 'test', + 'analysis' => array( + 'category' => ISEMAIL_ERR, + 'diagnosis' => array( + 0 => ISEMAIL_ERR_NODOMAIN, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Michael Rushton', + 'link' => 'http://squiloople.com/tag/email/', + ), + 'id' => '2', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 47, + ), + ), + '@' => array( + 'address' => '@', + 'analysis' => array( + 'category' => ISEMAIL_ERR, + 'diagnosis' => array( + 0 => ISEMAIL_ERR_NOLOCALPART, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Michael Rushton', + 'link' => 'http://squiloople.com/tag/email/', + ), + 'id' => '3', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 54, + ), + ), + 'test@' => array( + 'address' => 'test@', + 'analysis' => array( + 'category' => ISEMAIL_ERR, + 'diagnosis' => array( + 0 => ISEMAIL_ERR_NODOMAIN, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Michael Rushton', + 'link' => 'http://squiloople.com/tag/email/', + ), + 'id' => '4', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 61, + ), + ), + 'test@io' => array( + 'address' => 'test@io', + 'analysis' => array( + 'category' => ISEMAIL_VALID_CATEGORY, + 'diagnosis' => array( + 0 => ISEMAIL_VALID, + ), + ), + 'comment' => 'io. currently has an MX-record (Feb 2011). Some DNS setups seem to find it, some don\'t. If you don\'t see the MX for io. then try setting your DNS server to 8.8.8.8 (the Google DNS server)', + 'credit' => array( + 'name' => 'Michael Rushton', + 'link' => 'http://squiloople.com/tag/email/', + ), + 'id' => '5', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 68, + ), + ), + '@io' => array( + 'address' => '@io', + 'analysis' => array( + 'category' => ISEMAIL_ERR, + 'diagnosis' => array( + 0 => ISEMAIL_ERR_NOLOCALPART, + ), + ), + 'comment' => 'io. currently has an MX-record (Feb 2011)', + 'credit' => array( + 'name' => 'Michael Rushton', + 'link' => 'http://squiloople.com/tag/email/', + ), + 'id' => '6', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 76, + ), + ), + '@iana.org' => array( + 'address' => '@iana.org', + 'analysis' => array( + 'category' => ISEMAIL_ERR, + 'diagnosis' => array( + 0 => ISEMAIL_ERR_NOLOCALPART, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Michael Rushton', + 'link' => 'http://squiloople.com/tag/email/', + ), + 'id' => '7', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 84, + ), + ), + 'test@iana.org' => array( + 'address' => 'test@iana.org', + 'analysis' => array( + 'category' => ISEMAIL_VALID_CATEGORY, + 'diagnosis' => array( + 0 => ISEMAIL_VALID, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Michael Rushton', + 'link' => 'http://squiloople.com/tag/email/', + ), + 'id' => '8', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 91, + ), + ), + 'test@nominet.org.uk' => array( + 'address' => 'test@nominet.org.uk', + 'analysis' => array( + 'category' => ISEMAIL_VALID_CATEGORY, + 'diagnosis' => array( + 0 => ISEMAIL_VALID, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Michael Rushton', + 'link' => 'http://squiloople.com/tag/email/', + ), + 'id' => '9', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 98, + ), + ), + 'test@about.museum' => array( + 'address' => 'test@about.museum', + 'analysis' => array( + 'category' => ISEMAIL_VALID_CATEGORY, + 'diagnosis' => array( + 0 => ISEMAIL_VALID, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Michael Rushton', + 'link' => 'http://squiloople.com/tag/email/', + ), + 'id' => '10', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 105, + ), + ), + 'a@iana.org' => array( + 'address' => 'a@iana.org', + 'analysis' => array( + 'category' => ISEMAIL_VALID_CATEGORY, + 'diagnosis' => array( + 0 => ISEMAIL_VALID, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Michael Rushton', + 'link' => 'http://squiloople.com/tag/email/', + ), + 'id' => '11', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 112, + ), + ), + 'test@e.com' => array( + 'address' => 'test@e.com', + 'analysis' => array( + 'category' => ISEMAIL_DNSWARN, + 'diagnosis' => array( + 0 => ISEMAIL_DNSWARN_NO_RECORD, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Michael Rushton', + 'link' => 'http://squiloople.com/tag/email/', + ), + 'id' => '12', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 119, + ), + ), + 'test@iana.a' => array( + 'address' => 'test@iana.a', + 'analysis' => array( + 'category' => ISEMAIL_DNSWARN, + 'diagnosis' => array( + 0 => ISEMAIL_DNSWARN_NO_RECORD, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Michael Rushton', + 'link' => 'http://squiloople.com/tag/email/', + ), + 'id' => '13', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 126, + ), + ), + 'test.test@iana.org' => array( + 'address' => 'test.test@iana.org', + 'analysis' => array( + 'category' => ISEMAIL_VALID_CATEGORY, + 'diagnosis' => array( + 0 => ISEMAIL_VALID, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Michael Rushton', + 'link' => 'http://squiloople.com/tag/email/', + ), + 'id' => '14', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 133, + ), + ), + '.test@iana.org' => array( + 'address' => '.test@iana.org', + 'analysis' => array( + 'category' => ISEMAIL_ERR, + 'diagnosis' => array( + 0 => ISEMAIL_ERR_DOT_START, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Michael Rushton', + 'link' => 'http://squiloople.com/tag/email/', + ), + 'id' => '15', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 140, + ), + ), + 'test.@iana.org' => array( + 'address' => 'test.@iana.org', + 'analysis' => array( + 'category' => ISEMAIL_ERR, + 'diagnosis' => array( + 0 => ISEMAIL_ERR_DOT_END, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Michael Rushton', + 'link' => 'http://squiloople.com/tag/email/', + ), + 'id' => '16', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 147, + ), + ), + 'test..iana.org' => array( + 'address' => 'test..iana.org', + 'analysis' => array( + 'category' => ISEMAIL_ERR, + 'diagnosis' => array( + 0 => ISEMAIL_ERR_CONSECUTIVEDOTS, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Michael Rushton', + 'link' => 'http://squiloople.com/tag/email/', + ), + 'id' => '17', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 154, + ), + ), + 'test_exa-mple.com' => array( + 'address' => 'test_exa-mple.com', + 'analysis' => array( + 'category' => ISEMAIL_ERR, + 'diagnosis' => array( + 0 => ISEMAIL_ERR_NODOMAIN, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Michael Rushton', + 'link' => 'http://squiloople.com/tag/email/', + ), + 'id' => '18', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 161, + ), + ), + '!#$%&`*+/=?^`{|}~@iana.org' => array( + 'address' => '!#$%&`*+/=?^`{|}~@iana.org', + 'analysis' => array( + 'category' => ISEMAIL_VALID_CATEGORY, + 'diagnosis' => array( + 0 => ISEMAIL_VALID, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Michael Rushton', + 'link' => 'http://squiloople.com/tag/email/', + ), + 'id' => '19', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 168, + ), + ), + 'test\\@test@iana.org' => array( + 'address' => 'test\\@test@iana.org', + 'analysis' => array( + 'category' => ISEMAIL_ERR, + 'diagnosis' => array( + 0 => ISEMAIL_ERR_EXPECTING_ATEXT, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Michael Rushton', + 'link' => 'http://squiloople.com/tag/email/', + ), + 'id' => '20', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 175, + ), + ), + '123@iana.org' => array( + 'address' => '123@iana.org', + 'analysis' => array( + 'category' => ISEMAIL_VALID_CATEGORY, + 'diagnosis' => array( + 0 => ISEMAIL_VALID, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Michael Rushton', + 'link' => 'http://squiloople.com/tag/email/', + ), + 'id' => '21', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 182, + ), + ), + 'test@123.com' => array( + 'address' => 'test@123.com', + 'analysis' => array( + 'category' => ISEMAIL_VALID_CATEGORY, + 'diagnosis' => array( + 0 => ISEMAIL_VALID, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Michael Rushton', + 'link' => 'http://squiloople.com/tag/email/', + ), + 'id' => '22', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 189, + ), + ), + 'test@iana.123' => array( + 'address' => 'test@iana.123', + 'analysis' => array( + 'category' => ISEMAIL_RFC5321, + 'diagnosis' => array( + 0 => ISEMAIL_RFC5321_TLDNUMERIC, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Michael Rushton', + 'link' => 'http://squiloople.com/tag/email/', + ), + 'id' => '23', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 196, + ), + ), + 'test@255.255.255.255' => array( + 'address' => 'test@255.255.255.255', + 'analysis' => array( + 'category' => ISEMAIL_RFC5321, + 'diagnosis' => array( + 0 => ISEMAIL_RFC5321_TLDNUMERIC, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Michael Rushton', + 'link' => 'http://squiloople.com/tag/email/', + ), + 'id' => '24', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 203, + ), + ), + 'abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghiklm@iana.org' => array( + 'address' => 'abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghiklm@iana.org', + 'analysis' => array( + 'category' => ISEMAIL_VALID_CATEGORY, + 'diagnosis' => array( + 0 => ISEMAIL_VALID, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Michael Rushton', + 'link' => 'http://squiloople.com/tag/email/', + ), + 'id' => '25', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 210, + ), + ), + 'abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghiklmn@iana.org' => array( + 'address' => 'abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghiklmn@iana.org', + 'analysis' => array( + 'category' => ISEMAIL_RFC5322, + 'diagnosis' => array( + 0 => ISEMAIL_RFC5322_LOCAL_TOOLONG, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Michael Rushton', + 'link' => 'http://squiloople.com/tag/email/', + ), + 'id' => '26', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 217, + ), + ), + 'test@abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghikl.com' => array( + 'address' => 'test@abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghikl.com', + 'analysis' => array( + 'category' => ISEMAIL_DNSWARN, + 'diagnosis' => array( + 0 => ISEMAIL_DNSWARN_NO_RECORD, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Michael Rushton', + 'link' => 'http://squiloople.com/tag/email/', + ), + 'id' => '27', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 224, + ), + ), + 'test@abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghiklm.com' => array( + 'address' => 'test@abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghiklm.com', + 'analysis' => array( + 'category' => ISEMAIL_RFC5322, + 'diagnosis' => array( + 0 => ISEMAIL_RFC5322_LABEL_TOOLONG, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Michael Rushton', + 'link' => 'http://squiloople.com/tag/email/', + ), + 'id' => '28', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 231, + ), + ), + 'test@mason-dixon.com' => array( + 'address' => 'test@mason-dixon.com', + 'analysis' => array( + 'category' => ISEMAIL_VALID_CATEGORY, + 'diagnosis' => array( + 0 => ISEMAIL_VALID, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Michael Rushton', + 'link' => 'http://squiloople.com/tag/email/', + ), + 'id' => '29', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 238, + ), + ), + 'test@-iana.org' => array( + 'address' => 'test@-iana.org', + 'analysis' => array( + 'category' => ISEMAIL_ERR, + 'diagnosis' => array( + 0 => ISEMAIL_ERR_DOMAINHYPHENSTART, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Michael Rushton', + 'link' => 'http://squiloople.com/tag/email/', + ), + 'id' => '30', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 245, + ), + ), + 'test@iana-.com' => array( + 'address' => 'test@iana-.com', + 'analysis' => array( + 'category' => ISEMAIL_ERR, + 'diagnosis' => array( + 0 => ISEMAIL_ERR_DOMAINHYPHENEND, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Michael Rushton', + 'link' => 'http://squiloople.com/tag/email/', + ), + 'id' => '31', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 252, + ), + ), + 'test@c--n.com' => array( + 'address' => 'test@c--n.com', + 'analysis' => array( + 'category' => ISEMAIL_VALID_CATEGORY, + 'diagnosis' => array( + 0 => ISEMAIL_VALID, + ), + ), + 'comment' => 'c--n.com currently has an MX-record (May 2011)', + 'credit' => array( + 'name' => 'Michael Rushton', + 'link' => 'http://squiloople.com/tag/email/', + ), + 'id' => '32', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 259, + ), + ), + 'test@iana.co-uk' => array( + 'address' => 'test@iana.co-uk', + 'analysis' => array( + 'category' => ISEMAIL_DNSWARN, + 'diagnosis' => array( + 0 => ISEMAIL_DNSWARN_NO_RECORD, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Michael Rushton', + 'link' => 'http://squiloople.com/tag/email/', + ), + 'id' => '33', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 267, + ), + ), + 'test@.iana.org' => array( + 'address' => 'test@.iana.org', + 'analysis' => array( + 'category' => ISEMAIL_ERR, + 'diagnosis' => array( + 0 => ISEMAIL_ERR_DOT_START, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Michael Rushton', + 'link' => 'http://squiloople.com/tag/email/', + ), + 'id' => '34', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 274, + ), + ), + 'test@iana.org.' => array( + 'address' => 'test@iana.org.', + 'analysis' => array( + 'category' => ISEMAIL_ERR, + 'diagnosis' => array( + 0 => ISEMAIL_ERR_DOT_END, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Michael Rushton', + 'link' => 'http://squiloople.com/tag/email/', + ), + 'id' => '35', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 281, + ), + ), + 'test@iana..com' => array( + 'address' => 'test@iana..com', + 'analysis' => array( + 'category' => ISEMAIL_ERR, + 'diagnosis' => array( + 0 => ISEMAIL_ERR_CONSECUTIVEDOTS, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Michael Rushton', + 'link' => 'http://squiloople.com/tag/email/', + ), + 'id' => '36', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 288, + ), + ), + 'a@a.b.c.d.e.f.g.h.i.j.k.l.m.n.o.p.q.r.s.t.u.v.w.x.y.z.a.b.c.d.e.f.g.h.i.j.k.l.m.n.o.p.q.r.s.t.u.v.w.x.y.z.a.b.c.d.e.f.g.h.i.j.k.l.m.n.o.p.q.r.s.t.u.v.w.x.y.z.a.b.c.d.e.f.g.h.i.j.k.l.m.n.o.p.q.r.s.t.u.v.w.x.y.z.a.b.c.d.e.f.g.h.i.j.k.l.m.n.o.p.q.r.s.t.u.v' => array( + 'address' => 'a@a.b.c.d.e.f.g.h.i.j.k.l.m.n.o.p.q.r.s.t.u.v.w.x.y.z.a.b.c.d.e.f.g.h.i.j.k.l.m.n.o.p.q.r.s.t.u.v.w.x.y.z.a.b.c.d.e.f.g.h.i.j.k.l.m.n.o.p.q.r.s.t.u.v.w.x.y.z.a.b.c.d.e.f.g.h.i.j.k.l.m.n.o.p.q.r.s.t.u.v.w.x.y.z.a.b.c.d.e.f.g.h.i.j.k.l.m.n.o.p.q.r.s.t.u.v', + 'analysis' => array( + 'category' => ISEMAIL_DNSWARN, + 'diagnosis' => array( + 0 => ISEMAIL_DNSWARN_NO_RECORD, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Michael Rushton', + 'link' => 'http://squiloople.com/tag/email/', + ), + 'id' => '37', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 295, + ), + ), + 'abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghiklm@abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghikl.abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghikl.abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghi' => array( + 'address' => 'abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghiklm@abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghikl.abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghikl.abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghi', + 'analysis' => array( + 'category' => ISEMAIL_DNSWARN, + 'diagnosis' => array( + 0 => ISEMAIL_DNSWARN_NO_RECORD, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Michael Rushton', + 'link' => 'http://squiloople.com/tag/email/', + ), + 'id' => '38', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 302, + ), + ), + 'abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghiklm@abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghikl.abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghikl.abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghij' => array( + 'address' => 'abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghiklm@abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghikl.abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghikl.abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghij', + 'analysis' => array( + 'category' => ISEMAIL_RFC5322, + 'diagnosis' => array( + 0 => ISEMAIL_RFC5322_TOOLONG, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Michael Rushton', + 'link' => 'http://squiloople.com/tag/email/', + ), + 'id' => '39', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 309, + ), + ), + 'a@abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghikl.abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghikl.abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghikl.abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefg.hij' => array( + 'address' => 'a@abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghikl.abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghikl.abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghikl.abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefg.hij', + 'analysis' => array( + 'category' => ISEMAIL_RFC5322, + 'diagnosis' => array( + 0 => ISEMAIL_RFC5322_TOOLONG, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Michael Rushton', + 'link' => 'http://squiloople.com/tag/email/', + ), + 'id' => '40', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 316, + ), + ), + 'a@abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghikl.abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghikl.abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghikl.abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefg.hijk' => array( + 'address' => 'a@abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghikl.abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghikl.abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghikl.abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefg.hijk', + 'analysis' => array( + 'category' => ISEMAIL_RFC5322, + 'diagnosis' => array( + 0 => ISEMAIL_RFC5322_DOMAIN_TOOLONG, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Michael Rushton', + 'link' => 'http://squiloople.com/tag/email/', + ), + 'id' => '41', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 323, + ), + ), + '"test"@iana.org' => array( + 'address' => '"test"@iana.org', + 'analysis' => array( + 'category' => ISEMAIL_RFC5321, + 'diagnosis' => array( + 0 => ISEMAIL_RFC5321_QUOTEDSTRING, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Michael Rushton', + 'link' => 'http://squiloople.com/tag/email/', + ), + 'id' => '42', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 330, + ), + ), + '""@iana.org' => array( + 'address' => '""@iana.org', + 'analysis' => array( + 'category' => ISEMAIL_RFC5321, + 'diagnosis' => array( + 0 => ISEMAIL_RFC5321_QUOTEDSTRING, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Michael Rushton', + 'link' => 'http://squiloople.com/tag/email/', + ), + 'id' => '43', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 337, + ), + ), + '"""@iana.org' => array( + 'address' => '"""@iana.org', + 'analysis' => array( + 'category' => ISEMAIL_ERR, + 'diagnosis' => array( + 0 => ISEMAIL_ERR_EXPECTING_ATEXT, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Michael Rushton', + 'link' => 'http://squiloople.com/tag/email/', + ), + 'id' => '44', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 344, + ), + ), + '"\\a"@iana.org' => array( + 'address' => '"\\a"@iana.org', + 'analysis' => array( + 'category' => ISEMAIL_RFC5321, + 'diagnosis' => array( + 0 => ISEMAIL_RFC5321_QUOTEDSTRING, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Michael Rushton', + 'link' => 'http://squiloople.com/tag/email/', + ), + 'id' => '45', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 351, + ), + ), + '"\\""@iana.org' => array( + 'address' => '"\\""@iana.org', + 'analysis' => array( + 'category' => ISEMAIL_RFC5321, + 'diagnosis' => array( + 0 => ISEMAIL_RFC5321_QUOTEDSTRING, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Michael Rushton', + 'link' => 'http://squiloople.com/tag/email/', + ), + 'id' => '46', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 358, + ), + ), + '"\\"@iana.org' => array( + 'address' => '"\\"@iana.org', + 'analysis' => array( + 'category' => ISEMAIL_ERR, + 'diagnosis' => array( + 0 => ISEMAIL_ERR_UNCLOSEDQUOTEDSTR, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Michael Rushton', + 'link' => 'http://squiloople.com/tag/email/', + ), + 'id' => '47', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 365, + ), + ), + '"\\\\"@iana.org' => array( + 'address' => '"\\\\"@iana.org', + 'analysis' => array( + 'category' => ISEMAIL_RFC5321, + 'diagnosis' => array( + 0 => ISEMAIL_RFC5321_QUOTEDSTRING, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Michael Rushton', + 'link' => 'http://squiloople.com/tag/email/', + ), + 'id' => '48', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 372, + ), + ), + 'test"@iana.org' => array( + 'address' => 'test"@iana.org', + 'analysis' => array( + 'category' => ISEMAIL_ERR, + 'diagnosis' => array( + 0 => ISEMAIL_ERR_EXPECTING_ATEXT, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Michael Rushton', + 'link' => 'http://squiloople.com/tag/email/', + ), + 'id' => '49', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 379, + ), + ), + '"test@iana.org' => array( + 'address' => '"test@iana.org', + 'analysis' => array( + 'category' => ISEMAIL_ERR, + 'diagnosis' => array( + 0 => ISEMAIL_ERR_UNCLOSEDQUOTEDSTR, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Michael Rushton', + 'link' => 'http://squiloople.com/tag/email/', + ), + 'id' => '50', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 386, + ), + ), + '"test"test@iana.org' => array( + 'address' => '"test"test@iana.org', + 'analysis' => array( + 'category' => ISEMAIL_ERR, + 'diagnosis' => array( + 0 => ISEMAIL_ERR_ATEXT_AFTER_QS, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Michael Rushton', + 'link' => 'http://squiloople.com/tag/email/', + ), + 'id' => '51', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 393, + ), + ), + 'test"text"@iana.org' => array( + 'address' => 'test"text"@iana.org', + 'analysis' => array( + 'category' => ISEMAIL_ERR, + 'diagnosis' => array( + 0 => ISEMAIL_ERR_EXPECTING_ATEXT, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Michael Rushton', + 'link' => 'http://squiloople.com/tag/email/', + ), + 'id' => '52', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 400, + ), + ), + '"test""test"@iana.org' => array( + 'address' => '"test""test"@iana.org', + 'analysis' => array( + 'category' => ISEMAIL_ERR, + 'diagnosis' => array( + 0 => ISEMAIL_ERR_EXPECTING_ATEXT, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Michael Rushton', + 'link' => 'http://squiloople.com/tag/email/', + ), + 'id' => '53', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 407, + ), + ), + '"test"."test"@iana.org' => array( + 'address' => '"test"."test"@iana.org', + 'analysis' => array( + 'category' => ISEMAIL_DEPREC, + 'diagnosis' => array( + 0 => ISEMAIL_DEPREC_LOCALPART, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Michael Rushton', + 'link' => 'http://squiloople.com/tag/email/', + ), + 'id' => '54', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 414, + ), + ), + '"test\\ test"@iana.org' => array( + 'address' => '"test\\ test"@iana.org', + 'analysis' => array( + 'category' => ISEMAIL_RFC5321, + 'diagnosis' => array( + 0 => ISEMAIL_RFC5321_QUOTEDSTRING, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Michael Rushton', + 'link' => 'http://squiloople.com/tag/email/', + ), + 'id' => '55', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 421, + ), + ), + '"test".test@iana.org' => array( + 'address' => '"test".test@iana.org', + 'analysis' => array( + 'category' => ISEMAIL_DEPREC, + 'diagnosis' => array( + 0 => ISEMAIL_DEPREC_LOCALPART, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Michael Rushton', + 'link' => 'http://squiloople.com/tag/email/', + ), + 'id' => '56', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 428, + ), + ), + '"test"@iana.org' => array( + 'address' => '"test"@iana.org', + 'analysis' => array( + 'category' => ISEMAIL_ERR, + 'diagnosis' => array( + 0 => ISEMAIL_ERR_EXPECTING_QTEXT, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Michael Rushton', + 'link' => 'http://squiloople.com/tag/email/', + ), + 'id' => '57', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 435, + ), + ), + '"test\\"@iana.org' => array( + 'address' => '"test\\"@iana.org', + 'analysis' => array( + 'category' => ISEMAIL_DEPREC, + 'diagnosis' => array( + 0 => ISEMAIL_DEPREC_QP, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Michael Rushton', + 'link' => 'http://squiloople.com/tag/email/', + ), + 'id' => '58', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 442, + ), + ), + '"abcdefghijklmnopqrstuvwxyz abcdefghijklmnopqrstuvwxyz abcdefghj"@iana.org' => array( + 'address' => '"abcdefghijklmnopqrstuvwxyz abcdefghijklmnopqrstuvwxyz abcdefghj"@iana.org', + 'analysis' => array( + 'category' => ISEMAIL_RFC5322, + 'diagnosis' => array( + 0 => ISEMAIL_RFC5322_LOCAL_TOOLONG, + ), + ), + 'comment' => 'Quotes are still part of the length restriction', + 'credit' => array( + 'name' => 'Dominic Sayers', + 'link' => 'http://isemail.info', + ), + 'id' => '59', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 449, + ), + ), + '"abcdefghijklmnopqrstuvwxyz abcdefghijklmnopqrstuvwxyz abcdefg\\h"@iana.org' => array( + 'address' => '"abcdefghijklmnopqrstuvwxyz abcdefghijklmnopqrstuvwxyz abcdefg\\h"@iana.org', + 'analysis' => array( + 'category' => ISEMAIL_RFC5322, + 'diagnosis' => array( + 0 => ISEMAIL_RFC5322_LOCAL_TOOLONG, + ), + ), + 'comment' => 'Quoted pair is still part of the length restriction', + 'credit' => array( + 'name' => 'Dominic Sayers', + 'link' => 'http://isemail.info', + ), + 'id' => '60', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 457, + ), + ), + 'test@[255.255.255.255]' => array( + 'address' => 'test@[255.255.255.255]', + 'analysis' => array( + 'category' => ISEMAIL_RFC5321, + 'diagnosis' => array( + 0 => ISEMAIL_RFC5321_ADDRESSLITERAL, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Michael Rushton', + 'link' => 'http://squiloople.com/tag/email/', + ), + 'id' => '61', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 465, + ), + ), + 'test@a[255.255.255.255]' => array( + 'address' => 'test@a[255.255.255.255]', + 'analysis' => array( + 'category' => ISEMAIL_ERR, + 'diagnosis' => array( + 0 => ISEMAIL_ERR_EXPECTING_ATEXT, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Michael Rushton', + 'link' => 'http://squiloople.com/tag/email/', + ), + 'id' => '62', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 472, + ), + ), + 'test@[255.255.255]' => array( + 'address' => 'test@[255.255.255]', + 'analysis' => array( + 'category' => ISEMAIL_RFC5322, + 'diagnosis' => array( + 0 => ISEMAIL_RFC5322_DOMAINLITERAL, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Michael Rushton', + 'link' => 'http://squiloople.com/tag/email/', + ), + 'id' => '63', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 479, + ), + ), + 'test@[255.255.255.255.255]' => array( + 'address' => 'test@[255.255.255.255.255]', + 'analysis' => array( + 'category' => ISEMAIL_RFC5322, + 'diagnosis' => array( + 0 => ISEMAIL_RFC5322_DOMAINLITERAL, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Michael Rushton', + 'link' => 'http://squiloople.com/tag/email/', + ), + 'id' => '64', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 486, + ), + ), + 'test@[255.255.255.256]' => array( + 'address' => 'test@[255.255.255.256]', + 'analysis' => array( + 'category' => ISEMAIL_RFC5322, + 'diagnosis' => array( + 0 => ISEMAIL_RFC5322_DOMAINLITERAL, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Michael Rushton', + 'link' => 'http://squiloople.com/tag/email/', + ), + 'id' => '65', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 493, + ), + ), + 'test@[1111:2222:3333:4444:5555:6666:7777:8888]' => array( + 'address' => 'test@[1111:2222:3333:4444:5555:6666:7777:8888]', + 'analysis' => array( + 'category' => ISEMAIL_RFC5322, + 'diagnosis' => array( + 0 => ISEMAIL_RFC5322_DOMAINLITERAL, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Michael Rushton', + 'link' => 'http://squiloople.com/tag/email/', + ), + 'id' => '66', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 500, + ), + ), + 'test@[IPv6:1111:2222:3333:4444:5555:6666:7777]' => array( + 'address' => 'test@[IPv6:1111:2222:3333:4444:5555:6666:7777]', + 'analysis' => array( + 'category' => ISEMAIL_RFC5322, + 'diagnosis' => array( + 0 => ISEMAIL_RFC5322_IPV6_GRPCOUNT, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Michael Rushton', + 'link' => 'http://squiloople.com/tag/email/', + ), + 'id' => '67', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 507, + ), + ), + 'test@[IPv6:1111:2222:3333:4444:5555:6666:7777:8888]' => array( + 'address' => 'test@[IPv6:1111:2222:3333:4444:5555:6666:7777:8888]', + 'analysis' => array( + 'category' => ISEMAIL_RFC5321, + 'diagnosis' => array( + 0 => ISEMAIL_RFC5321_ADDRESSLITERAL, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Michael Rushton', + 'link' => 'http://squiloople.com/tag/email/', + ), + 'id' => '68', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 514, + ), + ), + 'test@[IPv6:1111:2222:3333:4444:5555:6666:7777:8888:9999]' => array( + 'address' => 'test@[IPv6:1111:2222:3333:4444:5555:6666:7777:8888:9999]', + 'analysis' => array( + 'category' => ISEMAIL_RFC5322, + 'diagnosis' => array( + 0 => ISEMAIL_RFC5322_IPV6_GRPCOUNT, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Michael Rushton', + 'link' => 'http://squiloople.com/tag/email/', + ), + 'id' => '69', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 521, + ), + ), + 'test@[IPv6:1111:2222:3333:4444:5555:6666:7777:888G]' => array( + 'address' => 'test@[IPv6:1111:2222:3333:4444:5555:6666:7777:888G]', + 'analysis' => array( + 'category' => ISEMAIL_RFC5322, + 'diagnosis' => array( + 0 => ISEMAIL_RFC5322_IPV6_BADCHAR, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Michael Rushton', + 'link' => 'http://squiloople.com/tag/email/', + ), + 'id' => '70', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 528, + ), + ), + 'test@[IPv6:1111:2222:3333:4444:5555:6666::8888]' => array( + 'address' => 'test@[IPv6:1111:2222:3333:4444:5555:6666::8888]', + 'analysis' => array( + 'category' => ISEMAIL_DEPREC, + 'diagnosis' => array( + 0 => ISEMAIL_RFC5321_IPV6DEPRECATED, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Michael Rushton', + 'link' => 'http://squiloople.com/tag/email/', + ), + 'id' => '71', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 535, + ), + ), + 'test@[IPv6:1111:2222:3333:4444:5555::8888]' => array( + 'address' => 'test@[IPv6:1111:2222:3333:4444:5555::8888]', + 'analysis' => array( + 'category' => ISEMAIL_RFC5321, + 'diagnosis' => array( + 0 => ISEMAIL_RFC5321_ADDRESSLITERAL, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Michael Rushton', + 'link' => 'http://squiloople.com/tag/email/', + ), + 'id' => '72', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 542, + ), + ), + 'test@[IPv6:1111:2222:3333:4444:5555:6666::7777:8888]' => array( + 'address' => 'test@[IPv6:1111:2222:3333:4444:5555:6666::7777:8888]', + 'analysis' => array( + 'category' => ISEMAIL_RFC5322, + 'diagnosis' => array( + 0 => ISEMAIL_RFC5322_IPV6_MAXGRPS, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Michael Rushton', + 'link' => 'http://squiloople.com/tag/email/', + ), + 'id' => '73', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 549, + ), + ), + 'test@[IPv6::3333:4444:5555:6666:7777:8888]' => array( + 'address' => 'test@[IPv6::3333:4444:5555:6666:7777:8888]', + 'analysis' => array( + 'category' => ISEMAIL_RFC5322, + 'diagnosis' => array( + 0 => ISEMAIL_RFC5322_IPV6_COLONSTRT, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Michael Rushton', + 'link' => 'http://squiloople.com/tag/email/', + ), + 'id' => '74', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 556, + ), + ), + 'test@[IPv6:::3333:4444:5555:6666:7777:8888]' => array( + 'address' => 'test@[IPv6:::3333:4444:5555:6666:7777:8888]', + 'analysis' => array( + 'category' => ISEMAIL_RFC5321, + 'diagnosis' => array( + 0 => ISEMAIL_RFC5321_ADDRESSLITERAL, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Michael Rushton', + 'link' => 'http://squiloople.com/tag/email/', + ), + 'id' => '75', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 563, + ), + ), + 'test@[IPv6:1111::4444:5555::8888]' => array( + 'address' => 'test@[IPv6:1111::4444:5555::8888]', + 'analysis' => array( + 'category' => ISEMAIL_RFC5322, + 'diagnosis' => array( + 0 => ISEMAIL_RFC5322_IPV6_2X2XCOLON, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Michael Rushton', + 'link' => 'http://squiloople.com/tag/email/', + ), + 'id' => '76', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 570, + ), + ), + 'test@[IPv6:::]' => array( + 'address' => 'test@[IPv6:::]', + 'analysis' => array( + 'category' => ISEMAIL_RFC5321, + 'diagnosis' => array( + 0 => ISEMAIL_RFC5321_ADDRESSLITERAL, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Michael Rushton', + 'link' => 'http://squiloople.com/tag/email/', + ), + 'id' => '77', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 577, + ), + ), + 'test@[IPv6:1111:2222:3333:4444:5555:255.255.255.255]' => array( + 'address' => 'test@[IPv6:1111:2222:3333:4444:5555:255.255.255.255]', + 'analysis' => array( + 'category' => ISEMAIL_RFC5322, + 'diagnosis' => array( + 0 => ISEMAIL_RFC5322_IPV6_GRPCOUNT, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Michael Rushton', + 'link' => 'http://squiloople.com/tag/email/', + ), + 'id' => '78', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 584, + ), + ), + 'test@[IPv6:1111:2222:3333:4444:5555:6666:255.255.255.255]' => array( + 'address' => 'test@[IPv6:1111:2222:3333:4444:5555:6666:255.255.255.255]', + 'analysis' => array( + 'category' => ISEMAIL_RFC5321, + 'diagnosis' => array( + 0 => ISEMAIL_RFC5321_ADDRESSLITERAL, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Michael Rushton', + 'link' => 'http://squiloople.com/tag/email/', + ), + 'id' => '79', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 591, + ), + ), + 'test@[IPv6:1111:2222:3333:4444:5555:6666:7777:255.255.255.255]' => array( + 'address' => 'test@[IPv6:1111:2222:3333:4444:5555:6666:7777:255.255.255.255]', + 'analysis' => array( + 'category' => ISEMAIL_RFC5322, + 'diagnosis' => array( + 0 => ISEMAIL_RFC5322_IPV6_GRPCOUNT, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Michael Rushton', + 'link' => 'http://squiloople.com/tag/email/', + ), + 'id' => '80', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 598, + ), + ), + 'test@[IPv6:1111:2222:3333:4444::255.255.255.255]' => array( + 'address' => 'test@[IPv6:1111:2222:3333:4444::255.255.255.255]', + 'analysis' => array( + 'category' => ISEMAIL_RFC5321, + 'diagnosis' => array( + 0 => ISEMAIL_RFC5321_ADDRESSLITERAL, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Michael Rushton', + 'link' => 'http://squiloople.com/tag/email/', + ), + 'id' => '81', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 605, + ), + ), + 'test@[IPv6:1111:2222:3333:4444:5555:6666::255.255.255.255]' => array( + 'address' => 'test@[IPv6:1111:2222:3333:4444:5555:6666::255.255.255.255]', + 'analysis' => array( + 'category' => ISEMAIL_RFC5322, + 'diagnosis' => array( + 0 => ISEMAIL_RFC5322_IPV6_MAXGRPS, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Michael Rushton', + 'link' => 'http://squiloople.com/tag/email/', + ), + 'id' => '82', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 612, + ), + ), + 'test@[IPv6:1111:2222:3333:4444:::255.255.255.255]' => array( + 'address' => 'test@[IPv6:1111:2222:3333:4444:::255.255.255.255]', + 'analysis' => array( + 'category' => ISEMAIL_RFC5322, + 'diagnosis' => array( + 0 => ISEMAIL_RFC5322_IPV6_2X2XCOLON, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Michael Rushton', + 'link' => 'http://squiloople.com/tag/email/', + ), + 'id' => '83', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 619, + ), + ), + 'test@[IPv6::255.255.255.255]' => array( + 'address' => 'test@[IPv6::255.255.255.255]', + 'analysis' => array( + 'category' => ISEMAIL_RFC5322, + 'diagnosis' => array( + 0 => ISEMAIL_RFC5322_IPV6_COLONSTRT, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Michael Rushton', + 'link' => 'http://squiloople.com/tag/email/', + ), + 'id' => '84', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 626, + ), + ), + ' test @iana.org' => array( + 'address' => ' test @iana.org', + 'analysis' => array( + 'category' => ISEMAIL_DEPREC, + 'diagnosis' => array( + 0 => ISEMAIL_DEPREC_CFWS_NEAR_AT, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Michael Rushton', + 'link' => 'http://squiloople.com/tag/email/', + ), + 'id' => '85', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 633, + ), + ), + 'test@ iana .com' => array( + 'address' => 'test@ iana .com', + 'analysis' => array( + 'category' => ISEMAIL_DEPREC, + 'diagnosis' => array( + 0 => ISEMAIL_DEPREC_CFWS_NEAR_AT, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Michael Rushton', + 'link' => 'http://squiloople.com/tag/email/', + ), + 'id' => '86', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 640, + ), + ), + 'test . test@iana.org' => array( + 'address' => 'test . test@iana.org', + 'analysis' => array( + 'category' => ISEMAIL_DEPREC, + 'diagnosis' => array( + 0 => ISEMAIL_DEPREC_FWS, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Michael Rushton', + 'link' => 'http://squiloople.com/tag/email/', + ), + 'id' => '87', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 647, + ), + ), + ' + test@iana.org' => array( + 'address' => ' + test@iana.org', + 'analysis' => array( + 'category' => ISEMAIL_CFWS, + 'diagnosis' => array( + 0 => ISEMAIL_CFWS_FWS, + ), + ), + 'comment' => 'FWS', + 'credit' => array( + 'name' => 'Michael Rushton', + 'link' => 'http://squiloople.com/tag/email/', + ), + 'id' => '88', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 654, + ), + ), + ' + + test@iana.org' => array( + 'address' => ' + + test@iana.org', + 'analysis' => array( + 'category' => ISEMAIL_DEPREC, + 'diagnosis' => array( + 0 => ISEMAIL_DEPREC_FWS, + ), + ), + 'comment' => 'FWS with one line composed entirely of WSP -- only allowed as obsolete FWS (someone might allow only non-obsolete FWS)', + 'credit' => array( + 'name' => 'Michael Rushton', + 'link' => 'http://squiloople.com/tag/email/', + ), + 'id' => '89', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 662, + ), + ), + '(comment)test@iana.org' => array( + 'address' => '(comment)test@iana.org', + 'analysis' => array( + 'category' => ISEMAIL_CFWS, + 'diagnosis' => array( + 0 => ISEMAIL_CFWS_COMMENT, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Michael Rushton', + 'link' => 'http://squiloople.com/tag/email/', + ), + 'id' => '90', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 670, + ), + ), + '((comment)test@iana.org' => array( + 'address' => '((comment)test@iana.org', + 'analysis' => array( + 'category' => ISEMAIL_ERR, + 'diagnosis' => array( + 0 => ISEMAIL_ERR_UNCLOSEDCOMMENT, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Michael Rushton', + 'link' => 'http://squiloople.com/tag/email/', + ), + 'id' => '91', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 677, + ), + ), + '(comment(comment))test@iana.org' => array( + 'address' => '(comment(comment))test@iana.org', + 'analysis' => array( + 'category' => ISEMAIL_CFWS, + 'diagnosis' => array( + 0 => ISEMAIL_CFWS_COMMENT, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Michael Rushton', + 'link' => 'http://squiloople.com/tag/email/', + ), + 'id' => '92', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 684, + ), + ), + 'test@(comment)iana.org' => array( + 'address' => 'test@(comment)iana.org', + 'analysis' => array( + 'category' => ISEMAIL_DEPREC, + 'diagnosis' => array( + 0 => ISEMAIL_DEPREC_CFWS_NEAR_AT, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Michael Rushton', + 'link' => 'http://squiloople.com/tag/email/', + ), + 'id' => '93', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 691, + ), + ), + 'test(comment)test@iana.org' => array( + 'address' => 'test(comment)test@iana.org', + 'analysis' => array( + 'category' => ISEMAIL_ERR, + 'diagnosis' => array( + 0 => ISEMAIL_ERR_ATEXT_AFTER_CFWS, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Michael Rushton', + 'link' => 'http://squiloople.com/tag/email/', + ), + 'id' => '94', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 698, + ), + ), + 'test@(comment)[255.255.255.255]' => array( + 'address' => 'test@(comment)[255.255.255.255]', + 'analysis' => array( + 'category' => ISEMAIL_DEPREC, + 'diagnosis' => array( + 0 => ISEMAIL_DEPREC_CFWS_NEAR_AT, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Michael Rushton', + 'link' => 'http://squiloople.com/tag/email/', + ), + 'id' => '95', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 705, + ), + ), + '(comment)abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghiklm@iana.org' => array( + 'address' => '(comment)abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghiklm@iana.org', + 'analysis' => array( + 'category' => ISEMAIL_CFWS, + 'diagnosis' => array( + 0 => ISEMAIL_CFWS_COMMENT, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Michael Rushton', + 'link' => 'http://squiloople.com/tag/email/', + ), + 'id' => '96', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 712, + ), + ), + 'test@(comment)abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghikl.com' => array( + 'address' => 'test@(comment)abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghikl.com', + 'analysis' => array( + 'category' => ISEMAIL_DEPREC, + 'diagnosis' => array( + 0 => ISEMAIL_DEPREC_CFWS_NEAR_AT, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Michael Rushton', + 'link' => 'http://squiloople.com/tag/email/', + ), + 'id' => '97', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 719, + ), + ), + '(comment)test@abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghik.abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghik.abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijk.abcdefghijklmnopqrstuvwxyzabcdefghijk.abcdefghijklmnopqrstu' => array( + 'address' => '(comment)test@abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghik.abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghik.abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijk.abcdefghijklmnopqrstuvwxyzabcdefghijk.abcdefghijklmnopqrstu', + 'analysis' => array( + 'category' => ISEMAIL_CFWS, + 'diagnosis' => array( + 0 => ISEMAIL_CFWS_COMMENT, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Michael Rushton', + 'link' => 'http://squiloople.com/tag/email/', + ), + 'id' => '98', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 726, + ), + ), + 'test@iana.org +' => array( + 'address' => 'test@iana.org +', + 'analysis' => array( + 'category' => ISEMAIL_ERR, + 'diagnosis' => array( + 0 => ISEMAIL_ERR_EXPECTING_ATEXT, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Michael Rushton', + 'link' => 'http://squiloople.com/tag/email/', + ), + 'id' => '99', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 733, + ), + ), + 'test@xn--hxajbheg2az3al.xn--jxalpdlp' => array( + 'address' => 'test@xn--hxajbheg2az3al.xn--jxalpdlp', + 'analysis' => array( + 'category' => ISEMAIL_DNSWARN, + 'diagnosis' => array( + 0 => ISEMAIL_DNSWARN_NO_RECORD, + ), + ), + 'comment' => 'A valid IDN from ICANN\'s IDN TLD evaluation gateway', + 'credit' => array( + 'name' => 'Michael Rushton', + 'link' => 'http://squiloople.com/tag/email/', + ), + 'id' => '100', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 740, + ), + ), + 'xn--test@iana.org' => array( + 'address' => 'xn--test@iana.org', + 'analysis' => array( + 'category' => ISEMAIL_VALID_CATEGORY, + 'diagnosis' => array( + 0 => ISEMAIL_VALID, + ), + ), + 'comment' => 'RFC 3490: "unless the + email standards are revised to invite the use of IDNA for local + parts, a domain label that holds the local part of an email address + SHOULD NOT begin with the ACE prefix, and even if it does, it is to + be interpreted literally as a local part that happens to begin with + the ACE prefix"', + 'credit' => array( + 'name' => 'Dominic Sayers', + 'link' => 'http://isemail.info', + ), + 'id' => '101', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 748, + ), + ), + 'test@iana.org-' => array( + 'address' => 'test@iana.org-', + 'analysis' => array( + 'category' => ISEMAIL_ERR, + 'diagnosis' => array( + 0 => ISEMAIL_ERR_DOMAINHYPHENEND, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Dominic Sayers', + 'link' => 'http://isemail.info', + ), + 'id' => '102', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 761, + ), + ), + '(test@iana.org' => array( + 'address' => '(test@iana.org', + 'analysis' => array( + 'category' => ISEMAIL_ERR, + 'diagnosis' => array( + 0 => ISEMAIL_ERR_UNCLOSEDCOMMENT, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Dominic Sayers', + 'link' => 'http://isemail.info', + ), + 'id' => '104', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 775, + ), + ), + 'test@(iana.org' => array( + 'address' => 'test@(iana.org', + 'analysis' => array( + 'category' => ISEMAIL_ERR, + 'diagnosis' => array( + 0 => ISEMAIL_ERR_UNCLOSEDCOMMENT, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Dominic Sayers', + 'link' => 'http://isemail.info', + ), + 'id' => '105', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 782, + ), + ), + 'test@[1.2.3.4' => array( + 'address' => 'test@[1.2.3.4', + 'analysis' => array( + 'category' => ISEMAIL_ERR, + 'diagnosis' => array( + 0 => ISEMAIL_ERR_UNCLOSEDDOMLIT, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Dominic Sayers', + 'link' => 'http://isemail.info', + ), + 'id' => '106', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 789, + ), + ), + '"test\\"@iana.org' => array( + 'address' => '"test\\"@iana.org', + 'analysis' => array( + 'category' => ISEMAIL_ERR, + 'diagnosis' => array( + 0 => ISEMAIL_ERR_UNCLOSEDQUOTEDSTR, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Dominic Sayers', + 'link' => 'http://isemail.info', + ), + 'id' => '107', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 796, + ), + ), + '(comment\\)test@iana.org' => array( + 'address' => '(comment\\)test@iana.org', + 'analysis' => array( + 'category' => ISEMAIL_ERR, + 'diagnosis' => array( + 0 => ISEMAIL_ERR_UNCLOSEDCOMMENT, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Dominic Sayers', + 'link' => 'http://isemail.info', + ), + 'id' => '108', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 803, + ), + ), + 'test@iana.org(comment\\)' => array( + 'address' => 'test@iana.org(comment\\)', + 'analysis' => array( + 'category' => ISEMAIL_ERR, + 'diagnosis' => array( + 0 => ISEMAIL_ERR_UNCLOSEDCOMMENT, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Dominic Sayers', + 'link' => 'http://isemail.info', + ), + 'id' => '109', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 810, + ), + ), + 'test@iana.org(comment\\' => array( + 'address' => 'test@iana.org(comment\\', + 'analysis' => array( + 'category' => ISEMAIL_ERR, + 'diagnosis' => array( + 0 => ISEMAIL_ERR_BACKSLASHEND, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Dominic Sayers', + 'link' => 'http://isemail.info', + ), + 'id' => '110', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 817, + ), + ), + 'test@[RFC-5322-domain-literal]' => array( + 'address' => 'test@[RFC-5322-domain-literal]', + 'analysis' => array( + 'category' => ISEMAIL_RFC5322, + 'diagnosis' => array( + 0 => ISEMAIL_RFC5322_DOMAINLITERAL, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Dominic Sayers', + 'link' => 'http://isemail.info', + ), + 'id' => '112', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 824, + ), + ), + 'test@[RFC-5322]-domain-literal]' => array( + 'address' => 'test@[RFC-5322]-domain-literal]', + 'analysis' => array( + 'category' => ISEMAIL_ERR, + 'diagnosis' => array( + 0 => ISEMAIL_ERR_ATEXT_AFTER_DOMLIT, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Dominic Sayers', + 'link' => 'http://isemail.info', + ), + 'id' => '113', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 831, + ), + ), + 'test@[RFC-5322-[domain-literal]' => array( + 'address' => 'test@[RFC-5322-[domain-literal]', + 'analysis' => array( + 'category' => ISEMAIL_ERR, + 'diagnosis' => array( + 0 => ISEMAIL_ERR_EXPECTING_DTEXT, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Dominic Sayers', + 'link' => 'http://isemail.info', + ), + 'id' => '114', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 838, + ), + ), + 'test@[RFC-5322-\\-domain-literal]' => array( + 'address' => 'test@[RFC-5322-\\-domain-literal]', + 'analysis' => array( + 'category' => ISEMAIL_RFC5322, + 'diagnosis' => array( + 0 => ISEMAIL_RFC5322_DOMLIT_OBSDTEXT, + ), + ), + 'comment' => 'obs-dtext and obs-qp', + 'credit' => array( + 'name' => 'Dominic Sayers', + 'link' => 'http://isemail.info', + ), + 'id' => '115', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 845, + ), + ), + 'test@[RFC-5322-\\ -domain-literal]' => array( + 'address' => 'test@[RFC-5322-\\ -domain-literal]', + 'analysis' => array( + 'category' => ISEMAIL_RFC5322, + 'diagnosis' => array( + 0 => ISEMAIL_RFC5322_DOMLIT_OBSDTEXT, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Dominic Sayers', + 'link' => 'http://isemail.info', + ), + 'id' => '116', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 853, + ), + ), + 'test@[RFC-5322-\\]-domain-literal]' => array( + 'address' => 'test@[RFC-5322-\\]-domain-literal]', + 'analysis' => array( + 'category' => ISEMAIL_RFC5322, + 'diagnosis' => array( + 0 => ISEMAIL_RFC5322_DOMLIT_OBSDTEXT, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Dominic Sayers', + 'link' => 'http://isemail.info', + ), + 'id' => '117', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 860, + ), + ), + 'test@[RFC-5322-domain-literal\\]' => array( + 'address' => 'test@[RFC-5322-domain-literal\\]', + 'analysis' => array( + 'category' => ISEMAIL_ERR, + 'diagnosis' => array( + 0 => ISEMAIL_ERR_UNCLOSEDDOMLIT, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Dominic Sayers', + 'link' => 'http://isemail.info', + ), + 'id' => '118', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 867, + ), + ), + 'test@[RFC-5322-domain-literal\\' => array( + 'address' => 'test@[RFC-5322-domain-literal\\', + 'analysis' => array( + 'category' => ISEMAIL_ERR, + 'diagnosis' => array( + 0 => ISEMAIL_ERR_BACKSLASHEND, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Dominic Sayers', + 'link' => 'http://isemail.info', + ), + 'id' => '119', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 874, + ), + ), + 'test@[RFC 5322 domain literal]' => array( + 'address' => 'test@[RFC 5322 domain literal]', + 'analysis' => array( + 'category' => ISEMAIL_RFC5322, + 'diagnosis' => array( + 0 => ISEMAIL_RFC5322_DOMAINLITERAL, + ), + ), + 'comment' => 'Spaces are FWS in a domain literal', + 'credit' => array( + 'name' => 'Dominic Sayers', + 'link' => 'http://isemail.info', + ), + 'id' => '120', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 881, + ), + ), + 'test@[RFC-5322-domain-literal] (comment)' => array( + 'address' => 'test@[RFC-5322-domain-literal] (comment)', + 'analysis' => array( + 'category' => ISEMAIL_RFC5322, + 'diagnosis' => array( + 0 => ISEMAIL_RFC5322_DOMAINLITERAL, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Dominic Sayers', + 'link' => 'http://isemail.info', + ), + 'id' => '121', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 889, + ), + ), + '@iana.org' => array( + 'address' => '@iana.org', + 'analysis' => array( + 'category' => ISEMAIL_ERR, + 'diagnosis' => array( + 0 => ISEMAIL_ERR_EXPECTING_ATEXT, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Dominic Sayers', + 'link' => 'http://isemail.info', + ), + 'id' => '122', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 896, + ), + ), + 'test@.org' => array( + 'address' => 'test@.org', + 'analysis' => array( + 'category' => ISEMAIL_ERR, + 'diagnosis' => array( + 0 => ISEMAIL_ERR_EXPECTING_ATEXT, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Dominic Sayers', + 'link' => 'http://isemail.info', + ), + 'id' => '123', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 903, + ), + ), + '""@iana.org' => array( + 'address' => '""@iana.org', + 'analysis' => array( + 'category' => ISEMAIL_DEPREC, + 'diagnosis' => array( + 0 => ISEMAIL_DEPREC_QTEXT, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Dominic Sayers', + 'link' => 'http://isemail.info', + ), + 'id' => '124', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 910, + ), + ), + '"\\"@iana.org' => array( + 'address' => '"\\"@iana.org', + 'analysis' => array( + 'category' => ISEMAIL_DEPREC, + 'diagnosis' => array( + 0 => ISEMAIL_DEPREC_QP, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Dominic Sayers', + 'link' => 'http://isemail.info', + ), + 'id' => '125', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 917, + ), + ), + '()test@iana.org' => array( + 'address' => '()test@iana.org', + 'analysis' => array( + 'category' => ISEMAIL_DEPREC, + 'diagnosis' => array( + 0 => ISEMAIL_DEPREC_CTEXT, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Dominic Sayers', + 'link' => 'http://isemail.info', + ), + 'id' => '126', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 924, + ), + ), + 'test@iana.org ' => array( + 'address' => 'test@iana.org ', + 'analysis' => array( + 'category' => ISEMAIL_ERR, + 'diagnosis' => array( + 0 => ISEMAIL_ERR_CR_NO_LF, + ), + ), + 'comment' => 'No LF after the CR', + 'credit' => array( + 'name' => 'Dominic Sayers', + 'link' => 'http://isemail.info', + ), + 'id' => '127', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 931, + ), + ), + ' test@iana.org' => array( + 'address' => ' test@iana.org', + 'analysis' => array( + 'category' => ISEMAIL_ERR, + 'diagnosis' => array( + 0 => ISEMAIL_ERR_CR_NO_LF, + ), + ), + 'comment' => 'No LF after the CR', + 'credit' => array( + 'name' => 'Dominic Sayers', + 'link' => 'http://isemail.info', + ), + 'id' => '128', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 939, + ), + ), + '" test"@iana.org' => array( + 'address' => '" test"@iana.org', + 'analysis' => array( + 'category' => ISEMAIL_ERR, + 'diagnosis' => array( + 0 => ISEMAIL_ERR_CR_NO_LF, + ), + ), + 'comment' => 'No LF after the CR', + 'credit' => array( + 'name' => 'Dominic Sayers', + 'link' => 'http://isemail.info', + ), + 'id' => '129', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 947, + ), + ), + '( )test@iana.org' => array( + 'address' => '( )test@iana.org', + 'analysis' => array( + 'category' => ISEMAIL_ERR, + 'diagnosis' => array( + 0 => ISEMAIL_ERR_CR_NO_LF, + ), + ), + 'comment' => 'No LF after the CR', + 'credit' => array( + 'name' => 'Dominic Sayers', + 'link' => 'http://isemail.info', + ), + 'id' => '130', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 955, + ), + ), + 'test@iana.org( )' => array( + 'address' => 'test@iana.org( )', + 'analysis' => array( + 'category' => ISEMAIL_ERR, + 'diagnosis' => array( + 0 => ISEMAIL_ERR_CR_NO_LF, + ), + ), + 'comment' => 'No LF after the CR', + 'credit' => array( + 'name' => 'Dominic Sayers', + 'link' => 'http://isemail.info', + ), + 'id' => '131', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 963, + ), + ), + ' +test@iana.org' => array( + 'address' => ' +test@iana.org', + 'analysis' => array( + 'category' => ISEMAIL_ERR, + 'diagnosis' => array( + 0 => ISEMAIL_ERR_EXPECTING_ATEXT, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Michael Rushton', + 'link' => 'http://squiloople.com/tag/email/', + ), + 'id' => '132', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 971, + ), + ), + '" +"@iana.org' => array( + 'address' => '" +"@iana.org', + 'analysis' => array( + 'category' => ISEMAIL_ERR, + 'diagnosis' => array( + 0 => ISEMAIL_ERR_EXPECTING_QTEXT, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Dominic Sayers', + 'link' => 'http://isemail.info', + ), + 'id' => '133', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 978, + ), + ), + '"\\ +"@iana.org' => array( + 'address' => '"\\ +"@iana.org', + 'analysis' => array( + 'category' => ISEMAIL_DEPREC, + 'diagnosis' => array( + 0 => ISEMAIL_DEPREC_QP, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Dominic Sayers', + 'link' => 'http://isemail.info', + ), + 'id' => '134', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 985, + ), + ), + '( +)test@iana.org' => array( + 'address' => '( +)test@iana.org', + 'analysis' => array( + 'category' => ISEMAIL_ERR, + 'diagnosis' => array( + 0 => ISEMAIL_ERR_EXPECTING_CTEXT, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Dominic Sayers', + 'link' => 'http://isemail.info', + ), + 'id' => '135', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 992, + ), + ), + '@iana.org' => array( + 'address' => '@iana.org', + 'analysis' => array( + 'category' => ISEMAIL_ERR, + 'diagnosis' => array( + 0 => ISEMAIL_ERR_EXPECTING_ATEXT, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Dominic Sayers', + 'link' => 'http://isemail.info', + ), + 'id' => '136', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 999, + ), + ), + 'test@.org' => array( + 'address' => 'test@.org', + 'analysis' => array( + 'category' => ISEMAIL_ERR, + 'diagnosis' => array( + 0 => ISEMAIL_ERR_EXPECTING_ATEXT, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Dominic Sayers', + 'link' => 'http://isemail.info', + ), + 'id' => '137', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 1006, + ), + ), + '""@iana.org' => array( + 'address' => '""@iana.org', + 'analysis' => array( + 'category' => ISEMAIL_DEPREC, + 'diagnosis' => array( + 0 => ISEMAIL_DEPREC_QTEXT, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Dominic Sayers', + 'link' => 'http://isemail.info', + ), + 'id' => '138', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 1013, + ), + ), + '"\\"@iana.org' => array( + 'address' => '"\\"@iana.org', + 'analysis' => array( + 'category' => ISEMAIL_DEPREC, + 'diagnosis' => array( + 0 => ISEMAIL_DEPREC_QP, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Dominic Sayers', + 'link' => 'http://isemail.info', + ), + 'id' => '139', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 1020, + ), + ), + '()test@iana.org' => array( + 'address' => '()test@iana.org', + 'analysis' => array( + 'category' => ISEMAIL_DEPREC, + 'diagnosis' => array( + 0 => ISEMAIL_DEPREC_CTEXT, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Dominic Sayers', + 'link' => 'http://isemail.info', + ), + 'id' => '140', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 1027, + ), + ), + ' +test@iana.org' => array( + 'address' => ' +test@iana.org', + 'analysis' => array( + 'category' => ISEMAIL_ERR, + 'diagnosis' => array( + 0 => ISEMAIL_ERR_FWS_CRLF_END, + ), + ), + 'comment' => 'Not FWS because no actual white space', + 'credit' => array( + 'name' => 'Dominic Sayers', + 'link' => 'http://isemail.info', + ), + 'id' => '141', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 1034, + ), + ), + ' + +test@iana.org' => array( + 'address' => ' + +test@iana.org', + 'analysis' => array( + 'category' => ISEMAIL_ERR, + 'diagnosis' => array( + 0 => ISEMAIL_ERR_FWS_CRLF_END, + ), + ), + 'comment' => 'Not obs-FWS because there must be white space on each "fold"', + 'credit' => array( + 'name' => 'Dominic Sayers', + 'link' => 'http://isemail.info', + ), + 'id' => '142', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 1042, + ), + ), + ' +test@iana.org' => array( + 'address' => ' +test@iana.org', + 'analysis' => array( + 'category' => ISEMAIL_ERR, + 'diagnosis' => array( + 0 => ISEMAIL_ERR_FWS_CRLF_END, + ), + ), + 'comment' => 'Not FWS because no white space after the fold', + 'credit' => array( + 'name' => 'Dominic Sayers', + 'link' => 'http://isemail.info', + ), + 'id' => '143', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 1050, + ), + ), + ' + test@iana.org' => array( + 'address' => ' + test@iana.org', + 'analysis' => array( + 'category' => ISEMAIL_CFWS, + 'diagnosis' => array( + 0 => ISEMAIL_CFWS_FWS, + ), + ), + 'comment' => 'FWS', + 'credit' => array( + 'name' => 'Dominic Sayers', + 'link' => 'http://isemail.info', + ), + 'id' => '144', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 1058, + ), + ), + ' + +test@iana.org' => array( + 'address' => ' + +test@iana.org', + 'analysis' => array( + 'category' => ISEMAIL_ERR, + 'diagnosis' => array( + 0 => ISEMAIL_ERR_FWS_CRLF_END, + ), + ), + 'comment' => 'Not FWS because no white space after the second fold', + 'credit' => array( + 'name' => 'Dominic Sayers', + 'link' => 'http://isemail.info', + ), + 'id' => '145', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 1066, + ), + ), + ' + +test@iana.org' => array( + 'address' => ' + +test@iana.org', + 'analysis' => array( + 'category' => ISEMAIL_ERR, + 'diagnosis' => array( + 0 => ISEMAIL_ERR_FWS_CRLF_X2, + ), + ), + 'comment' => 'Not FWS because no white space after either fold', + 'credit' => array( + 'name' => 'Dominic Sayers', + 'link' => 'http://isemail.info', + ), + 'id' => '146', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 1074, + ), + ), + ' + + test@iana.org' => array( + 'address' => ' + + test@iana.org', + 'analysis' => array( + 'category' => ISEMAIL_ERR, + 'diagnosis' => array( + 0 => ISEMAIL_ERR_FWS_CRLF_X2, + ), + ), + 'comment' => 'Not FWS because no white space after the first fold', + 'credit' => array( + 'name' => 'Dominic Sayers', + 'link' => 'http://isemail.info', + ), + 'id' => '147', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 1082, + ), + ), + 'test@iana.org + ' => array( + 'address' => 'test@iana.org + ', + 'analysis' => array( + 'category' => ISEMAIL_CFWS, + 'diagnosis' => array( + 0 => ISEMAIL_CFWS_FWS, + ), + ), + 'comment' => 'FWS', + 'credit' => array( + 'name' => 'Dominic Sayers', + 'link' => 'http://isemail.info', + ), + 'id' => '148', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 1090, + ), + ), + 'test@iana.org + + ' => array( + 'address' => 'test@iana.org + + ', + 'analysis' => array( + 'category' => ISEMAIL_DEPREC, + 'diagnosis' => array( + 0 => ISEMAIL_DEPREC_FWS, + ), + ), + 'comment' => 'FWS with one line composed entirely of WSP -- only allowed as obsolete FWS (someone might allow only non-obsolete FWS)', + 'credit' => array( + 'name' => 'Dominic Sayers', + 'link' => 'http://isemail.info', + ), + 'id' => '149', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 1098, + ), + ), + 'test@iana.org +' => array( + 'address' => 'test@iana.org +', + 'analysis' => array( + 'category' => ISEMAIL_ERR, + 'diagnosis' => array( + 0 => ISEMAIL_ERR_FWS_CRLF_END, + ), + ), + 'comment' => 'Not FWS because no actual white space', + 'credit' => array( + 'name' => 'Dominic Sayers', + 'link' => 'http://isemail.info', + ), + 'id' => '150', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 1106, + ), + ), + 'test@iana.org + +' => array( + 'address' => 'test@iana.org + +', + 'analysis' => array( + 'category' => ISEMAIL_ERR, + 'diagnosis' => array( + 0 => ISEMAIL_ERR_FWS_CRLF_END, + ), + ), + 'comment' => 'Not obs-FWS because there must be white space on each "fold"', + 'credit' => array( + 'name' => 'Dominic Sayers', + 'link' => 'http://isemail.info', + ), + 'id' => '151', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 1114, + ), + ), + 'test@iana.org +' => array( + 'address' => 'test@iana.org +', + 'analysis' => array( + 'category' => ISEMAIL_ERR, + 'diagnosis' => array( + 0 => ISEMAIL_ERR_FWS_CRLF_END, + ), + ), + 'comment' => 'Not FWS because no white space after the fold', + 'credit' => array( + 'name' => 'Dominic Sayers', + 'link' => 'http://isemail.info', + ), + 'id' => '152', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 1122, + ), + ), + 'test@iana.org + ' => array( + 'address' => 'test@iana.org + ', + 'analysis' => array( + 'category' => ISEMAIL_CFWS, + 'diagnosis' => array( + 0 => ISEMAIL_CFWS_FWS, + ), + ), + 'comment' => 'FWS', + 'credit' => array( + 'name' => 'Dominic Sayers', + 'link' => 'http://isemail.info', + ), + 'id' => '153', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 1130, + ), + ), + 'test@iana.org + +' => array( + 'address' => 'test@iana.org + +', + 'analysis' => array( + 'category' => ISEMAIL_ERR, + 'diagnosis' => array( + 0 => ISEMAIL_ERR_FWS_CRLF_END, + ), + ), + 'comment' => 'Not FWS because no white space after the second fold', + 'credit' => array( + 'name' => 'Dominic Sayers', + 'link' => 'http://isemail.info', + ), + 'id' => '154', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 1138, + ), + ), + 'test@iana.org + +' => array( + 'address' => 'test@iana.org + +', + 'analysis' => array( + 'category' => ISEMAIL_ERR, + 'diagnosis' => array( + 0 => ISEMAIL_ERR_FWS_CRLF_X2, + ), + ), + 'comment' => 'Not FWS because no white space after either fold', + 'credit' => array( + 'name' => 'Dominic Sayers', + 'link' => 'http://isemail.info', + ), + 'id' => '155', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 1146, + ), + ), + 'test@iana.org + + ' => array( + 'address' => 'test@iana.org + + ', + 'analysis' => array( + 'category' => ISEMAIL_ERR, + 'diagnosis' => array( + 0 => ISEMAIL_ERR_FWS_CRLF_X2, + ), + ), + 'comment' => 'Not FWS because no white space after the first fold', + 'credit' => array( + 'name' => 'Dominic Sayers', + 'link' => 'http://isemail.info', + ), + 'id' => '156', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 1154, + ), + ), + ' test@iana.org' => array( + 'address' => ' test@iana.org', + 'analysis' => array( + 'category' => ISEMAIL_CFWS, + 'diagnosis' => array( + 0 => ISEMAIL_CFWS_FWS, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Dominic Sayers', + 'link' => 'http://isemail.info', + ), + 'id' => '157', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 1162, + ), + ), + 'test@iana.org ' => array( + 'address' => 'test@iana.org ', + 'analysis' => array( + 'category' => ISEMAIL_CFWS, + 'diagnosis' => array( + 0 => ISEMAIL_CFWS_FWS, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Dominic Sayers', + 'link' => 'http://isemail.info', + ), + 'id' => '158', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 1169, + ), + ), + 'test@[IPv6:1::2:]' => array( + 'address' => 'test@[IPv6:1::2:]', + 'analysis' => array( + 'category' => ISEMAIL_RFC5322, + 'diagnosis' => array( + 0 => ISEMAIL_RFC5322_IPV6_COLONEND, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Dominic Sayers', + 'link' => 'http://isemail.info', + ), + 'id' => '159', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 1176, + ), + ), + '"test\\©"@iana.org' => array( + 'address' => '"test\\©"@iana.org', + 'analysis' => array( + 'category' => ISEMAIL_ERR, + 'diagnosis' => array( + 0 => ISEMAIL_ERR_EXPECTING_QPAIR, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Dominic Sayers', + 'link' => 'http://isemail.info', + ), + 'id' => '160', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 1183, + ), + ), + 'test@iana/icann.org' => array( + 'address' => 'test@iana/icann.org', + 'analysis' => array( + 'category' => ISEMAIL_RFC5322, + 'diagnosis' => array( + 0 => ISEMAIL_RFC5322_DOMAIN, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Dominic Sayers', + 'link' => 'http://isemail.info', + ), + 'id' => '161', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 1190, + ), + ), + 'test.(comment)test@iana.org' => array( + 'address' => 'test.(comment)test@iana.org', + 'analysis' => array( + 'category' => ISEMAIL_DEPREC, + 'diagnosis' => array( + 0 => ISEMAIL_DEPREC_COMMENT, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Dominic Sayers', + 'link' => 'http://isemail.info', + ), + 'id' => '165', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 1197, + ), + ), + 'test@org' => array( + 'address' => 'test@org', + 'analysis' => array( + 'category' => ISEMAIL_RFC5321, + 'diagnosis' => array( + 0 => ISEMAIL_RFC5321_TLD, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Dominic Sayers', + 'link' => 'http://isemail.info', + ), + 'id' => '166', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 1204, + ), + ), + 'test@test.com' => array( + 'address' => 'test@test.com', + 'analysis' => array( + 'category' => ISEMAIL_VALID_CATEGORY, + 'diagnosis' => array( + 0 => ISEMAIL_VALID, + ), + ), + 'comment' => 'test.com has an A-record but not an MX-record (as a 2014-09-14 has an MX-record)', + 'credit' => array( + 'name' => 'Dominic Sayers', + 'link' => 'http://isemail.info', + ), + 'id' => '167', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 1211, + ), + ), + 'test@nic.no' => array( + 'address' => 'test@nic.no', + 'analysis' => array( + 'category' => ISEMAIL_DNSWARN, + 'diagnosis' => array( + 0 => ISEMAIL_DNSWARN_NO_RECORD, + ), + ), + 'comment' => 'nic.no currently has no MX-records or A-records (Feb 2011). If you are seeing an A-record for nic.io then try setting your DNS server to 8.8.8.8 (the Google DNS server) - your DNS server may be faking an A-record (OpenDNS does this, for instance).', + 'credit' => array( + 'name' => 'Dominic Sayers', + 'link' => 'http://isemail.info', + ), + 'id' => '168', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests.xml'), + 'line' => 1219, + ), + ), + 'cal(woo(yay)hoopla)@iamcal.com' => array( + 'address' => 'cal(woo(yay)hoopla)@iamcal.com', + 'analysis' => array( + 'category' => ISEMAIL_DEPREC, + 'diagnosis' => array( + 0 => ISEMAIL_DEPREC_CFWS_NEAR_AT, + ), + ), + 'comment' => 'A valid address containing comments', + 'credit' => array( + 'name' => 'Cal Henderson', + 'link' => 'http://code.iamcal.com/php/rfc822/', + ), + 'id' => '165', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests-original.xml'), + 'line' => 1282, + ), + ), + 'cal(foo\\@bar)@iamcal.com' => array( + 'address' => 'cal(foo\\@bar)@iamcal.com', + 'analysis' => array( + 'category' => ISEMAIL_DEPREC, + 'diagnosis' => array( + 0 => ISEMAIL_DEPREC_CFWS_NEAR_AT, + ), + ), + 'comment' => 'A valid address containing comments', + 'credit' => array( + 'name' => 'Cal Henderson', + 'link' => 'http://code.iamcal.com/php/rfc822/', + ), + 'id' => '166', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests-original.xml'), + 'line' => 1290, + ), + ), + 'cal(foo\\)bar)@iamcal.com' => array( + 'address' => 'cal(foo\\)bar)@iamcal.com', + 'analysis' => array( + 'category' => ISEMAIL_DEPREC, + 'diagnosis' => array( + 0 => ISEMAIL_DEPREC_CFWS_NEAR_AT, + ), + ), + 'comment' => 'A valid address containing comments and an escaped parenthesis', + 'credit' => array( + 'name' => 'Cal Henderson', + 'link' => 'http://code.iamcal.com/php/rfc822/', + ), + 'id' => '167', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests-original.xml'), + 'line' => 1298, + ), + ), + 'cal(foo(bar)@iamcal.com' => array( + 'address' => 'cal(foo(bar)@iamcal.com', + 'analysis' => array( + 'category' => ISEMAIL_ERR, + 'diagnosis' => array( + 0 => ISEMAIL_ERR_UNCLOSEDCOMMENT, + ), + ), + 'comment' => 'Unclosed parenthesis in comment', + 'credit' => array( + 'name' => 'Cal Henderson', + 'link' => 'http://code.iamcal.com/php/rfc822/', + ), + 'id' => '168', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests-original.xml'), + 'line' => 1306, + ), + ), + 'cal(foo)bar)@iamcal.com' => array( + 'address' => 'cal(foo)bar)@iamcal.com', + 'analysis' => array( + 'category' => ISEMAIL_ERR, + 'diagnosis' => array( + 0 => ISEMAIL_ERR_ATEXT_AFTER_CFWS, + ), + ), + 'comment' => 'Too many closing parentheses', + 'credit' => array( + 'name' => 'Cal Henderson', + 'link' => 'http://code.iamcal.com/php/rfc822/', + ), + 'id' => '169', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests-original.xml'), + 'line' => 1314, + ), + ), + 'cal(foo\\)@iamcal.com' => array( + 'address' => 'cal(foo\\)@iamcal.com', + 'analysis' => array( + 'category' => ISEMAIL_ERR, + 'diagnosis' => array( + 0 => ISEMAIL_ERR_UNCLOSEDCOMMENT, + ), + ), + 'comment' => 'Backslash at end of comment has nothing to escape', + 'credit' => array( + 'name' => 'Cal Henderson', + 'link' => 'http://code.iamcal.com/php/rfc822/', + ), + 'id' => '170', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests-original.xml'), + 'line' => 1322, + ), + ), + 'first().last@iana.org' => array( + 'address' => 'first().last@iana.org', + 'analysis' => array( + 'category' => ISEMAIL_DEPREC, + 'diagnosis' => array( + 0 => ISEMAIL_DEPREC_LOCALPART, + ), + ), + 'comment' => 'A valid address containing an empty comment', + 'credit' => array( + 'name' => 'Dominic Sayers', + 'link' => 'http://isemail.info', + ), + 'id' => '171', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests-original.xml'), + 'line' => 1330, + ), + ), + 'first.( + middle + )last@iana.org' => array( + 'address' => 'first.( + middle + )last@iana.org', + 'analysis' => array( + 'category' => ISEMAIL_DEPREC, + 'diagnosis' => array( + 0 => ISEMAIL_DEPREC_COMMENT, + ), + ), + 'comment' => 'Comment with folding white space', + 'credit' => array( + 'name' => 'Dominic Sayers', + 'link' => 'http://isemail.info', + ), + 'id' => '172', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests-original.xml'), + 'line' => 1338, + ), + ), + 'first(12345678901234567890123456789012345678901234567890)last@(1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890)iana.org' => array( + 'address' => 'first(12345678901234567890123456789012345678901234567890)last@(1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890)iana.org', + 'analysis' => array( + 'category' => ISEMAIL_ERR, + 'diagnosis' => array( + 0 => ISEMAIL_ERR_ATEXT_AFTER_CFWS, + ), + ), + 'comment' => 'Too long with comments, not too long without', + 'credit' => array( + 'name' => 'Dominic Sayers', + 'link' => 'http://isemail.info', + ), + 'id' => '173', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests-original.xml'), + 'line' => 1346, + ), + ), + 'first(Welcome to + the ("wonderful" (!)) world + of email)@iana.org' => array( + 'address' => 'first(Welcome to + the ("wonderful" (!)) world + of email)@iana.org', + 'analysis' => array( + 'category' => ISEMAIL_DEPREC, + 'diagnosis' => array( + 0 => ISEMAIL_DEPREC_CFWS_NEAR_AT, + ), + ), + 'comment' => 'Silly example from my blog post', + 'credit' => array( + 'name' => 'Dominic Sayers', + 'link' => 'http://isemail.info', + ), + 'id' => '174', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests-original.xml'), + 'line' => 1354, + ), + ), + 'pete(his account)@silly.test(his host)' => array( + 'address' => 'pete(his account)@silly.test(his host)', + 'analysis' => array( + 'category' => ISEMAIL_DEPREC, + 'diagnosis' => array( + 0 => ISEMAIL_DEPREC_CFWS_NEAR_AT, + ), + ), + 'comment' => 'Canonical example from RFC 5322', + 'credit' => array( + 'name' => 'RFC 5322', + 'link' => 'http://tools.ietf.org/html/rfc5322', + ), + 'id' => '175', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests-original.xml'), + 'line' => 1362, + ), + ), + 'c@(Chris\'s host.)public.example' => array( + 'address' => 'c@(Chris\'s host.)public.example', + 'analysis' => array( + 'category' => ISEMAIL_DEPREC, + 'diagnosis' => array( + 0 => ISEMAIL_DEPREC_CFWS_NEAR_AT, + ), + ), + 'comment' => 'Canonical example from RFC 5322', + 'credit' => array( + 'name' => 'RFC 5322', + 'link' => 'http://tools.ietf.org/html/rfc5322', + ), + 'id' => '176', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests-original.xml'), + 'line' => 1370, + ), + ), + 'jdoe@machine(comment). example' => array( + 'address' => 'jdoe@machine(comment). example', + 'analysis' => array( + 'category' => ISEMAIL_DEPREC, + 'diagnosis' => array( + 0 => ISEMAIL_DEPREC_FWS, + ), + ), + 'comment' => 'Canonical example from RFC 5322', + 'credit' => array( + 'name' => 'RFC 5322', + 'link' => 'http://tools.ietf.org/html/rfc5322', + ), + 'id' => '177', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests-original.xml'), + 'line' => 1378, + ), + ), + '1234 @ local(blah) .machine .example' => array( + 'address' => '1234 @ local(blah) .machine .example', + 'analysis' => array( + 'category' => ISEMAIL_DEPREC, + 'diagnosis' => array( + 0 => ISEMAIL_DEPREC_CFWS_NEAR_AT, + ), + ), + 'comment' => 'Canonical example from RFC 5322', + 'credit' => array( + 'name' => 'RFC 5322', + 'link' => 'http://tools.ietf.org/html/rfc5322', + ), + 'id' => '178', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests-original.xml'), + 'line' => 1386, + ), + ), + 'first(middle)last@iana.org' => array( + 'address' => 'first(middle)last@iana.org', + 'analysis' => array( + 'category' => ISEMAIL_ERR, + 'diagnosis' => array( + 0 => ISEMAIL_ERR_ATEXT_AFTER_CFWS, + ), + ), + 'comment' => 'Can\'t have a comment or white space except at an element boundary', + 'credit' => array( + 'name' => 'Dominic Sayers', + 'link' => 'http://isemail.info', + ), + 'id' => '179', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests-original.xml'), + 'line' => 1394, + ), + ), + 'first(abc.def).last@iana.org' => array( + 'address' => 'first(abc.def).last@iana.org', + 'analysis' => array( + 'category' => ISEMAIL_DEPREC, + 'diagnosis' => array( + 0 => ISEMAIL_DEPREC_LOCALPART, + ), + ), + 'comment' => 'Comment can contain a dot', + 'credit' => array( + 'name' => 'Dominic Sayers', + 'link' => 'http://isemail.info', + ), + 'id' => '180', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests-original.xml'), + 'line' => 1402, + ), + ), + 'first(a"bc.def).last@iana.org' => array( + 'address' => 'first(a"bc.def).last@iana.org', + 'analysis' => array( + 'category' => ISEMAIL_DEPREC, + 'diagnosis' => array( + 0 => ISEMAIL_DEPREC_LOCALPART, + ), + ), + 'comment' => 'Comment can contain double quote', + 'credit' => array( + 'name' => 'Dominic Sayers', + 'link' => 'http://isemail.info', + ), + 'id' => '181', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests-original.xml'), + 'line' => 1410, + ), + ), + 'first.(")middle.last(")@iana.org' => array( + 'address' => 'first.(")middle.last(")@iana.org', + 'analysis' => array( + 'category' => ISEMAIL_DEPREC, + 'diagnosis' => array( + 0 => ISEMAIL_DEPREC_CFWS_NEAR_AT, + ), + ), + 'comment' => 'Comment can contain a quote', + 'credit' => array( + 'name' => 'Dominic Sayers', + 'link' => 'http://isemail.info', + ), + 'id' => '182', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests-original.xml'), + 'line' => 1418, + ), + ), + 'first(abc("def".ghi).mno)middle(abc("def".ghi).mno).last@(abc("def".ghi).mno)example(abc("def".ghi).mno).(abc("def".ghi).mno)com(abc("def".ghi).mno)' => array( + 'address' => 'first(abc("def".ghi).mno)middle(abc("def".ghi).mno).last@(abc("def".ghi).mno)example(abc("def".ghi).mno).(abc("def".ghi).mno)com(abc("def".ghi).mno)', + 'analysis' => array( + 'category' => ISEMAIL_ERR, + 'diagnosis' => array( + 0 => ISEMAIL_ERR_ATEXT_AFTER_CFWS, + ), + ), + 'comment' => 'Can\'t have comments or white space except at an element boundary', + 'credit' => array( + 'name' => 'Dominic Sayers', + 'link' => 'http://isemail.info', + ), + 'id' => '183', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests-original.xml'), + 'line' => 1426, + ), + ), + 'first(abc\\(def)@iana.org' => array( + 'address' => 'first(abc\\(def)@iana.org', + 'analysis' => array( + 'category' => ISEMAIL_DEPREC, + 'diagnosis' => array( + 0 => ISEMAIL_DEPREC_CFWS_NEAR_AT, + ), + ), + 'comment' => 'Comment can contain quoted-pair', + 'credit' => array( + 'name' => 'Dominic Sayers', + 'link' => 'http://isemail.info', + ), + 'id' => '184', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests-original.xml'), + 'line' => 1434, + ), + ), + 'first.last@iana(1234567890123456789012345678901234567890123456789012345678901234567890).org' => array( + 'address' => 'first.last@iana(1234567890123456789012345678901234567890123456789012345678901234567890).org', + 'analysis' => array( + 'category' => ISEMAIL_CFWS, + 'diagnosis' => array( + 0 => ISEMAIL_CFWS_COMMENT, + ), + ), + 'comment' => 'Label is longer than 63 octets, but not with comment removed', + 'credit' => array( + 'name' => 'Cal Henderson', + 'link' => 'http://code.iamcal.com/php/rfc822/', + ), + 'id' => '185', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests-original.xml'), + 'line' => 1442, + ), + ), + 'a(a(b(c)d(e(f))g)h(i)j)@iana.org' => array( + 'address' => 'a(a(b(c)d(e(f))g)h(i)j)@iana.org', + 'analysis' => array( + 'category' => ISEMAIL_DEPREC, + 'diagnosis' => array( + 0 => ISEMAIL_DEPREC_CFWS_NEAR_AT, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Cal Henderson', + 'link' => 'http://code.iamcal.com/php/rfc822/', + ), + 'id' => '186', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests-original.xml'), + 'line' => 1450, + ), + ), + 'a(a(b(c)d(e(f))g)(h(i)j)@iana.org' => array( + 'address' => 'a(a(b(c)d(e(f))g)(h(i)j)@iana.org', + 'analysis' => array( + 'category' => ISEMAIL_ERR, + 'diagnosis' => array( + 0 => ISEMAIL_ERR_UNCLOSEDCOMMENT, + ), + ), + 'comment' => 'Braces are not properly matched', + 'credit' => array( + 'name' => 'Cal Henderson', + 'link' => 'http://code.iamcal.com/php/rfc822/', + ), + 'id' => '187', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests-original.xml'), + 'line' => 1457, + ), + ), + 'name.lastname@domain.com' => array( + 'address' => 'name.lastname@domain.com', + 'analysis' => array( + 'category' => ISEMAIL_VALID_CATEGORY, + 'diagnosis' => array( + 0 => ISEMAIL_VALID, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Paul Gregg', + 'link' => 'http://pgregg.com/projects/php/code/showvalidemail.php', + ), + 'id' => '188', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests-original.xml'), + 'line' => 1465, + ), + ), + '.@' => array( + 'address' => '.@', + 'analysis' => array( + 'category' => ISEMAIL_ERR, + 'diagnosis' => array( + 0 => ISEMAIL_ERR_DOT_START, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Paul Gregg', + 'link' => 'http://pgregg.com/projects/php/code/showvalidemail.php', + ), + 'id' => '189', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests-original.xml'), + 'line' => 1472, + ), + ), + 'a@b' => array( + 'address' => 'a@b', + 'analysis' => array( + 'category' => ISEMAIL_RFC5321, + 'diagnosis' => array( + 0 => ISEMAIL_RFC5321_TLD, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Paul Gregg', + 'link' => 'http://pgregg.com/projects/php/code/showvalidemail.php', + ), + 'id' => '190', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests-original.xml'), + 'line' => 1479, + ), + ), + '@bar.com' => array( + 'address' => '@bar.com', + 'analysis' => array( + 'category' => ISEMAIL_ERR, + 'diagnosis' => array( + 0 => ISEMAIL_ERR_NOLOCALPART, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Paul Gregg', + 'link' => 'http://pgregg.com/projects/php/code/showvalidemail.php', + ), + 'id' => '191', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests-original.xml'), + 'line' => 1486, + ), + ), + '@@bar.com' => array( + 'address' => '@@bar.com', + 'analysis' => array( + 'category' => ISEMAIL_ERR, + 'diagnosis' => array( + 0 => ISEMAIL_ERR_NOLOCALPART, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Paul Gregg', + 'link' => 'http://pgregg.com/projects/php/code/showvalidemail.php', + ), + 'id' => '192', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests-original.xml'), + 'line' => 1493, + ), + ), + 'a@bar.com' => array( + 'address' => 'a@bar.com', + 'analysis' => array( + 'category' => ISEMAIL_DNSWARN, + 'diagnosis' => array( + 0 => ISEMAIL_DNSWARN_NO_MX_RECORD, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Paul Gregg', + 'link' => 'http://pgregg.com/projects/php/code/showvalidemail.php', + ), + 'id' => '193', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests-original.xml'), + 'line' => 1500, + ), + ), + 'aaa.com' => array( + 'address' => 'aaa.com', + 'analysis' => array( + 'category' => ISEMAIL_ERR, + 'diagnosis' => array( + 0 => ISEMAIL_ERR_NODOMAIN, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Paul Gregg', + 'link' => 'http://pgregg.com/projects/php/code/showvalidemail.php', + ), + 'id' => '194', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests-original.xml'), + 'line' => 1507, + ), + ), + 'aaa@.com' => array( + 'address' => 'aaa@.com', + 'analysis' => array( + 'category' => ISEMAIL_ERR, + 'diagnosis' => array( + 0 => ISEMAIL_ERR_DOT_START, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Paul Gregg', + 'link' => 'http://pgregg.com/projects/php/code/showvalidemail.php', + ), + 'id' => '195', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests-original.xml'), + 'line' => 1514, + ), + ), + 'aaa@.123' => array( + 'address' => 'aaa@.123', + 'analysis' => array( + 'category' => ISEMAIL_ERR, + 'diagnosis' => array( + 0 => ISEMAIL_ERR_DOT_START, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Paul Gregg', + 'link' => 'http://pgregg.com/projects/php/code/showvalidemail.php', + ), + 'id' => '196', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests-original.xml'), + 'line' => 1521, + ), + ), + 'aaa@[123.123.123.123]' => array( + 'address' => 'aaa@[123.123.123.123]', + 'analysis' => array( + 'category' => ISEMAIL_RFC5321, + 'diagnosis' => array( + 0 => ISEMAIL_RFC5321_ADDRESSLITERAL, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Paul Gregg', + 'link' => 'http://pgregg.com/projects/php/code/showvalidemail.php', + ), + 'id' => '197', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests-original.xml'), + 'line' => 1528, + ), + ), + 'aaa@[123.123.123.123]a' => array( + 'address' => 'aaa@[123.123.123.123]a', + 'analysis' => array( + 'category' => ISEMAIL_ERR, + 'diagnosis' => array( + 0 => ISEMAIL_ERR_ATEXT_AFTER_DOMLIT, + ), + ), + 'comment' => 'extra data outside address-literal', + 'credit' => array( + 'name' => 'Paul Gregg', + 'link' => 'http://pgregg.com/projects/php/code/showvalidemail.php', + ), + 'id' => '198', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests-original.xml'), + 'line' => 1535, + ), + ), + 'aaa@[123.123.123.333]' => array( + 'address' => 'aaa@[123.123.123.333]', + 'analysis' => array( + 'category' => ISEMAIL_RFC5322, + 'diagnosis' => array( + 0 => ISEMAIL_RFC5322_DOMAINLITERAL, + ), + ), + 'comment' => 'not a valid IP', + 'credit' => array( + 'name' => 'Paul Gregg', + 'link' => 'http://pgregg.com/projects/php/code/showvalidemail.php', + ), + 'id' => '199', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests-original.xml'), + 'line' => 1543, + ), + ), + 'a@bar.com.' => array( + 'address' => 'a@bar.com.', + 'analysis' => array( + 'category' => ISEMAIL_ERR, + 'diagnosis' => array( + 0 => ISEMAIL_ERR_DOT_END, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Paul Gregg', + 'link' => 'http://pgregg.com/projects/php/code/showvalidemail.php', + ), + 'id' => '200', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests-original.xml'), + 'line' => 1551, + ), + ), + 'a@bar' => array( + 'address' => 'a@bar', + 'analysis' => array( + 'category' => ISEMAIL_RFC5321, + 'diagnosis' => array( + 0 => ISEMAIL_RFC5321_TLD, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Paul Gregg', + 'link' => 'http://pgregg.com/projects/php/code/showvalidemail.php', + ), + 'id' => '201', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests-original.xml'), + 'line' => 1558, + ), + ), + 'a-b@bar.com' => array( + 'address' => 'a-b@bar.com', + 'analysis' => array( + 'category' => ISEMAIL_DNSWARN, + 'diagnosis' => array( + 0 => ISEMAIL_DNSWARN_NO_MX_RECORD, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Paul Gregg', + 'link' => 'http://pgregg.com/projects/php/code/showvalidemail.php', + ), + 'id' => '202', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests-original.xml'), + 'line' => 1565, + ), + ), + '+@b.c' => array( + 'address' => '+@b.c', + 'analysis' => array( + 'category' => ISEMAIL_DNSWARN, + 'diagnosis' => array( + 0 => ISEMAIL_DNSWARN_NO_RECORD, + ), + ), + 'comment' => 'TLDs can be any length', + 'credit' => array( + 'name' => 'Paul Gregg', + 'link' => 'http://pgregg.com/projects/php/code/showvalidemail.php', + ), + 'id' => '203', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests-original.xml'), + 'line' => 1572, + ), + ), + '+@b.com' => array( + 'address' => '+@b.com', + 'analysis' => array( + 'category' => ISEMAIL_DNSWARN, + 'diagnosis' => array( + 0 => ISEMAIL_DNSWARN_NO_RECORD, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Paul Gregg', + 'link' => 'http://pgregg.com/projects/php/code/showvalidemail.php', + ), + 'id' => '204', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests-original.xml'), + 'line' => 1580, + ), + ), + 'a@-b.com' => array( + 'address' => 'a@-b.com', + 'analysis' => array( + 'category' => ISEMAIL_ERR, + 'diagnosis' => array( + 0 => ISEMAIL_ERR_DOMAINHYPHENSTART, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Paul Gregg', + 'link' => 'http://pgregg.com/projects/php/code/showvalidemail.php', + ), + 'id' => '205', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests-original.xml'), + 'line' => 1587, + ), + ), + 'a@b-.com' => array( + 'address' => 'a@b-.com', + 'analysis' => array( + 'category' => ISEMAIL_ERR, + 'diagnosis' => array( + 0 => ISEMAIL_ERR_DOMAINHYPHENEND, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Paul Gregg', + 'link' => 'http://pgregg.com/projects/php/code/showvalidemail.php', + ), + 'id' => '206', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests-original.xml'), + 'line' => 1594, + ), + ), + '-@..com' => array( + 'address' => '-@..com', + 'analysis' => array( + 'category' => ISEMAIL_ERR, + 'diagnosis' => array( + 0 => ISEMAIL_ERR_DOT_START, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Paul Gregg', + 'link' => 'http://pgregg.com/projects/php/code/showvalidemail.php', + ), + 'id' => '207', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests-original.xml'), + 'line' => 1601, + ), + ), + '-@a..com' => array( + 'address' => '-@a..com', + 'analysis' => array( + 'category' => ISEMAIL_ERR, + 'diagnosis' => array( + 0 => ISEMAIL_ERR_CONSECUTIVEDOTS, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Paul Gregg', + 'link' => 'http://pgregg.com/projects/php/code/showvalidemail.php', + ), + 'id' => '208', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests-original.xml'), + 'line' => 1608, + ), + ), + 'a@b.co-foo.uk' => array( + 'address' => 'a@b.co-foo.uk', + 'analysis' => array( + 'category' => ISEMAIL_DNSWARN, + 'diagnosis' => array( + 0 => ISEMAIL_DNSWARN_NO_RECORD, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Paul Gregg', + 'link' => 'http://pgregg.com/projects/php/code/showvalidemail.php', + ), + 'id' => '209', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests-original.xml'), + 'line' => 1615, + ), + ), + '"hello my name is"@stutter.com' => array( + 'address' => '"hello my name is"@stutter.com', + 'analysis' => array( + 'category' => ISEMAIL_RFC5321, + 'diagnosis' => array( + 0 => ISEMAIL_RFC5321_QUOTEDSTRING, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Paul Gregg', + 'link' => 'http://pgregg.com/projects/php/code/showvalidemail.php', + ), + 'id' => '210', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests-original.xml'), + 'line' => 1622, + ), + ), + '"Test \\"Fail\\" Ing"@iana.org' => array( + 'address' => '"Test \\"Fail\\" Ing"@iana.org', + 'analysis' => array( + 'category' => ISEMAIL_RFC5321, + 'diagnosis' => array( + 0 => ISEMAIL_RFC5321_QUOTEDSTRING, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Paul Gregg', + 'link' => 'http://pgregg.com/projects/php/code/showvalidemail.php', + ), + 'id' => '211', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests-original.xml'), + 'line' => 1629, + ), + ), + 'valid@about.museum' => array( + 'address' => 'valid@about.museum', + 'analysis' => array( + 'category' => ISEMAIL_VALID_CATEGORY, + 'diagnosis' => array( + 0 => ISEMAIL_VALID, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Paul Gregg', + 'link' => 'http://pgregg.com/projects/php/code/showvalidemail.php', + ), + 'id' => '212', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests-original.xml'), + 'line' => 1636, + ), + ), + 'invalid@about.museum-' => array( + 'address' => 'invalid@about.museum-', + 'analysis' => array( + 'category' => ISEMAIL_ERR, + 'diagnosis' => array( + 0 => ISEMAIL_ERR_DOMAINHYPHENEND, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Paul Gregg', + 'link' => 'http://pgregg.com/projects/php/code/showvalidemail.php', + ), + 'id' => '213', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests-original.xml'), + 'line' => 1643, + ), + ), + 'shaitan@my-domain.thisisminekthx' => array( + 'address' => 'shaitan@my-domain.thisisminekthx', + 'analysis' => array( + 'category' => ISEMAIL_DNSWARN, + 'diagnosis' => array( + 0 => ISEMAIL_DNSWARN_NO_RECORD, + ), + ), + 'comment' => 'Disagree with Paul Gregg here', + 'credit' => array( + 'name' => 'Paul Gregg', + 'link' => 'http://pgregg.com/projects/php/code/showvalidemail.php', + ), + 'id' => '214', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests-original.xml'), + 'line' => 1650, + ), + ), + 'test@...........com' => array( + 'address' => 'test@...........com', + 'analysis' => array( + 'category' => ISEMAIL_ERR, + 'diagnosis' => array( + 0 => ISEMAIL_ERR_DOT_START, + ), + ), + 'comment' => '......', + 'credit' => array( + 'name' => 'Paul Gregg', + 'link' => 'http://pgregg.com/projects/php/code/showvalidemail.php', + ), + 'id' => '215', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests-original.xml'), + 'line' => 1658, + ), + ), + 'foobar@192.168.0.1' => array( + 'address' => 'foobar@192.168.0.1', + 'analysis' => array( + 'category' => ISEMAIL_RFC5321, + 'diagnosis' => array( + 0 => ISEMAIL_RFC5321_TLDNUMERIC, + ), + ), + 'comment' => 'ip need to be []', + 'credit' => array( + 'name' => 'Paul Gregg', + 'link' => 'http://pgregg.com/projects/php/code/showvalidemail.php', + ), + 'id' => '216', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests-original.xml'), + 'line' => 1666, + ), + ), + '"Joe\\\\Blow"@iana.org' => array( + 'address' => '"Joe\\\\Blow"@iana.org', + 'analysis' => array( + 'category' => ISEMAIL_RFC5321, + 'diagnosis' => array( + 0 => ISEMAIL_RFC5321_QUOTEDSTRING, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Paul Gregg', + 'link' => 'http://pgregg.com/projects/php/code/showvalidemail.php', + ), + 'id' => '217', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests-original.xml'), + 'line' => 1674, + ), + ), + 'Invalid \\ + Folding \\ + Whitespace@iana.org' => array( + 'address' => 'Invalid \\ + Folding \\ + Whitespace@iana.org', + 'analysis' => array( + 'category' => ISEMAIL_ERR, + 'diagnosis' => array( + 0 => ISEMAIL_ERR_ATEXT_AFTER_CFWS, + ), + ), + 'comment' => 'Even obs-local-part doesn\'t allow CFWS in the middle of an atom', + 'credit' => array( + 'name' => 'Paul Gregg', + 'link' => 'http://pgregg.com/projects/php/code/showvalidemail.php', + ), + 'id' => '218', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests-original.xml'), + 'line' => 1681, + ), + ), + 'HM2Kinsists@(that comments are allowed)this.is.ok' => array( + 'address' => 'HM2Kinsists@(that comments are allowed)this.is.ok', + 'analysis' => array( + 'category' => ISEMAIL_DEPREC, + 'diagnosis' => array( + 0 => ISEMAIL_DEPREC_CFWS_NEAR_AT, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Paul Gregg', + 'link' => 'http://pgregg.com/projects/php/code/showvalidemail.php', + ), + 'id' => '219', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests-original.xml'), + 'line' => 1689, + ), + ), + 'user%uucp!path@berkeley.edu' => array( + 'address' => 'user%uucp!path@berkeley.edu', + 'analysis' => array( + 'category' => ISEMAIL_VALID_CATEGORY, + 'diagnosis' => array( + 0 => ISEMAIL_VALID, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Paul Gregg', + 'link' => 'http://pgregg.com/projects/php/code/showvalidemail.php', + ), + 'id' => '220', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests-original.xml'), + 'line' => 1696, + ), + ), + '"first(last)"@iana.org' => array( + 'address' => '"first(last)"@iana.org', + 'analysis' => array( + 'category' => ISEMAIL_RFC5321, + 'diagnosis' => array( + 0 => ISEMAIL_RFC5321_QUOTEDSTRING, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Dominic Sayers', + 'link' => 'http://isemail.info', + ), + 'id' => '221', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests-original.xml'), + 'line' => 1703, + ), + ), + ' + ( + x + ) + first + ( + x + ) + . + ( + x) + last + ( x + ) + @iana.org' => array( + 'address' => ' + ( + x + ) + first + ( + x + ) + . + ( + x) + last + ( x + ) + @iana.org', + 'analysis' => array( + 'category' => ISEMAIL_DEPREC, + 'diagnosis' => array( + 0 => ISEMAIL_DEPREC_CFWS_NEAR_AT, + ), + ), + 'comment' => '', + 'credit' => array( + 'name' => 'Dominic Sayers', + 'link' => 'http://isemail.info', + ), + 'id' => '222', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests-original.xml'), + 'line' => 1710, + ), + ), + 'first.last @iana.org' => array( + 'address' => 'first.last @iana.org', + 'analysis' => array( + 'category' => ISEMAIL_DEPREC, + 'diagnosis' => array( + 0 => ISEMAIL_DEPREC_CFWS_NEAR_AT, + ), + ), + 'comment' => 'FWS is allowed after local part (this is similar to #152 but is the test proposed by John Kloor)', + 'credit' => array( + 'name' => 'John Kloor', + 'link' => 'http://isemail.info', + ), + 'id' => '223', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests-original.xml'), + 'line' => 1717, + ), + ), + 'test. + + obs@syntax.com' => array( + 'address' => 'test. + + obs@syntax.com', + 'analysis' => array( + 'category' => ISEMAIL_DEPREC, + 'diagnosis' => array( + 0 => ISEMAIL_DEPREC_FWS, + ), + ), + 'comment' => 'obs-fws allows multiple lines (test 2: space before break)', + 'credit' => array( + 'name' => 'George Pollard', + 'link' => 'http://porg.es/blog/properly-validating-e-mail-addresses', + ), + 'id' => '224', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests-original.xml'), + 'line' => 1725, + ), + ), + 'test. + + obs@syntax.com' => array( + 'address' => 'test. + + obs@syntax.com', + 'analysis' => array( + 'category' => ISEMAIL_ERR, + 'diagnosis' => array( + 0 => ISEMAIL_ERR_FWS_CRLF_X2, + ), + ), + 'comment' => 'obs-fws must have at least one WSP per line', + 'credit' => array( + 'name' => 'George Pollard', + 'link' => 'http://porg.es/blog/properly-validating-e-mail-addresses', + ), + 'id' => '225', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests-original.xml'), + 'line' => 1733, + ), + ), + '"Unicode NULL \\"@char.com' => array( + 'address' => '"Unicode NULL \\"@char.com', + 'analysis' => array( + 'category' => ISEMAIL_DEPREC, + 'diagnosis' => array( + 0 => ISEMAIL_DEPREC_QP, + ), + ), + 'comment' => 'Can have escaped Unicode Character \'NULL\' (U+0000)', + 'credit' => array( + 'name' => 'George Pollard', + 'link' => 'http://porg.es/blog/properly-validating-e-mail-addresses', + ), + 'id' => '226', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests-original.xml'), + 'line' => 1741, + ), + ), + '"Unicode NULL "@char.com' => array( + 'address' => '"Unicode NULL "@char.com', + 'analysis' => array( + 'category' => ISEMAIL_ERR, + 'diagnosis' => array( + 0 => ISEMAIL_ERR_EXPECTING_QTEXT, + ), + ), + 'comment' => 'Cannot have unescaped Unicode Character \'NULL\' (U+0000)', + 'credit' => array( + 'name' => 'George Pollard', + 'link' => 'http://porg.es/blog/properly-validating-e-mail-addresses', + ), + 'id' => '227', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests-original.xml'), + 'line' => 1749, + ), + ), + 'Unicode NULL \\@char.com' => array( + 'address' => 'Unicode NULL \\@char.com', + 'analysis' => array( + 'category' => ISEMAIL_ERR, + 'diagnosis' => array( + 0 => ISEMAIL_ERR_ATEXT_AFTER_CFWS, + ), + ), + 'comment' => 'Escaped Unicode Character \'NULL\' (U+0000) must be in quoted string', + 'credit' => array( + 'name' => 'George Pollard', + 'link' => 'http://porg.es/blog/properly-validating-e-mail-addresses', + ), + 'id' => '228', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests-original.xml'), + 'line' => 1757, + ), + ), + 'cdburgess+!#$%&\'*-/=?+_{}|~test@gmail.com' => array( + 'address' => 'cdburgess+!#$%&\'*-/=?+_{}|~test@gmail.com', + 'analysis' => array( + 'category' => ISEMAIL_VALID_CATEGORY, + 'diagnosis' => array( + 0 => ISEMAIL_VALID, + ), + ), + 'comment' => 'Example given in comments', + 'credit' => array( + 'name' => 'cdburgess', + 'link' => 'http://isemail.info/#comment-30024957', + ), + 'id' => '229', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests-original.xml'), + 'line' => 1765, + ), + ), + 'first.last@[IPv6:::a2:a3:a4:b1:b2:b3:b4]' => array( + 'address' => 'first.last@[IPv6:::a2:a3:a4:b1:b2:b3:b4]', + 'analysis' => array( + 'category' => ISEMAIL_RFC5321, + 'diagnosis' => array( + 0 => ISEMAIL_RFC5321_IPV6DEPRECATED, + ), + ), + 'comment' => ':: only elides one zero group (IPv6 authority is RFC 4291)', + 'credit' => array( + 'name' => 'Dominic Sayers', + 'link' => 'http://isemail.info', + ), + 'id' => '230', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests-original.xml'), + 'line' => 1773, + ), + ), + 'first.last@[IPv6:a1:a2:a3:a4:b1:b2:b3::]' => array( + 'address' => 'first.last@[IPv6:a1:a2:a3:a4:b1:b2:b3::]', + 'analysis' => array( + 'category' => ISEMAIL_RFC5321, + 'diagnosis' => array( + 0 => ISEMAIL_RFC5321_IPV6DEPRECATED, + ), + ), + 'comment' => ':: only elides one zero group (IPv6 authority is RFC 4291)', + 'credit' => array( + 'name' => 'Dominic Sayers', + 'link' => 'http://isemail.info', + ), + 'id' => '231', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests-original.xml'), + 'line' => 1781, + ), + ), + 'first.last@[IPv6::]' => array( + 'address' => 'first.last@[IPv6::]', + 'analysis' => array( + 'category' => ISEMAIL_RFC5322, + 'diagnosis' => array( + 0 => ISEMAIL_RFC5322_IPV6_COLONSTRT, + ), + ), + 'comment' => 'IPv6 authority is RFC 4291', + 'credit' => array( + 'name' => 'Dominic Sayers', + 'link' => 'http://isemail.info', + ), + 'id' => '232', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests-original.xml'), + 'line' => 1789, + ), + ), + 'first.last@[IPv6:::]' => array( + 'address' => 'first.last@[IPv6:::]', + 'analysis' => array( + 'category' => ISEMAIL_RFC5321, + 'diagnosis' => array( + 0 => ISEMAIL_RFC5321_ADDRESSLITERAL, + ), + ), + 'comment' => 'IPv6 authority is RFC 4291', + 'credit' => array( + 'name' => 'Dominic Sayers', + 'link' => 'http://isemail.info', + ), + 'id' => '233', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests-original.xml'), + 'line' => 1797, + ), + ), + 'first.last@[IPv6::::]' => array( + 'address' => 'first.last@[IPv6::::]', + 'analysis' => array( + 'category' => ISEMAIL_RFC5322, + 'diagnosis' => array( + 0 => ISEMAIL_RFC5322_IPV6_2X2XCOLON, + ), + ), + 'comment' => 'IPv6 authority is RFC 4291', + 'credit' => array( + 'name' => 'Dominic Sayers', + 'link' => 'http://isemail.info', + ), + 'id' => '234', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests-original.xml'), + 'line' => 1805, + ), + ), + 'first.last@[IPv6::b4]' => array( + 'address' => 'first.last@[IPv6::b4]', + 'analysis' => array( + 'category' => ISEMAIL_RFC5322, + 'diagnosis' => array( + 0 => ISEMAIL_RFC5322_IPV6_COLONSTRT, + ), + ), + 'comment' => 'IPv6 authority is RFC 4291', + 'credit' => array( + 'name' => 'Dominic Sayers', + 'link' => 'http://isemail.info', + ), + 'id' => '235', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests-original.xml'), + 'line' => 1813, + ), + ), + 'first.last@[IPv6:::b4]' => array( + 'address' => 'first.last@[IPv6:::b4]', + 'analysis' => array( + 'category' => ISEMAIL_RFC5321, + 'diagnosis' => array( + 0 => ISEMAIL_RFC5321_ADDRESSLITERAL, + ), + ), + 'comment' => 'IPv6 authority is RFC 4291', + 'credit' => array( + 'name' => 'Dominic Sayers', + 'link' => 'http://isemail.info', + ), + 'id' => '236', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests-original.xml'), + 'line' => 1821, + ), + ), + 'first.last@[IPv6::::b4]' => array( + 'address' => 'first.last@[IPv6::::b4]', + 'analysis' => array( + 'category' => ISEMAIL_RFC5322, + 'diagnosis' => array( + 0 => ISEMAIL_RFC5322_IPV6_2X2XCOLON, + ), + ), + 'comment' => 'IPv6 authority is RFC 4291', + 'credit' => array( + 'name' => 'Dominic Sayers', + 'link' => 'http://isemail.info', + ), + 'id' => '237', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests-original.xml'), + 'line' => 1829, + ), + ), + 'first.last@[IPv6::b3:b4]' => array( + 'address' => 'first.last@[IPv6::b3:b4]', + 'analysis' => array( + 'category' => ISEMAIL_RFC5322, + 'diagnosis' => array( + 0 => ISEMAIL_RFC5322_IPV6_COLONSTRT, + ), + ), + 'comment' => 'IPv6 authority is RFC 4291', + 'credit' => array( + 'name' => 'Dominic Sayers', + 'link' => 'http://isemail.info', + ), + 'id' => '238', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests-original.xml'), + 'line' => 1837, + ), + ), + 'first.last@[IPv6:::b3:b4]' => array( + 'address' => 'first.last@[IPv6:::b3:b4]', + 'analysis' => array( + 'category' => ISEMAIL_RFC5321, + 'diagnosis' => array( + 0 => ISEMAIL_RFC5321_ADDRESSLITERAL, + ), + ), + 'comment' => 'IPv6 authority is RFC 4291', + 'credit' => array( + 'name' => 'Dominic Sayers', + 'link' => 'http://isemail.info', + ), + 'id' => '239', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests-original.xml'), + 'line' => 1845, + ), + ), + 'first.last@[IPv6::::b3:b4]' => array( + 'address' => 'first.last@[IPv6::::b3:b4]', + 'analysis' => array( + 'category' => ISEMAIL_RFC5322, + 'diagnosis' => array( + 0 => ISEMAIL_RFC5322_IPV6_2X2XCOLON, + ), + ), + 'comment' => 'IPv6 authority is RFC 4291', + 'credit' => array( + 'name' => 'Dominic Sayers', + 'link' => 'http://isemail.info', + ), + 'id' => '240', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests-original.xml'), + 'line' => 1853, + ), + ), + 'first.last@[IPv6:a1::b4]' => array( + 'address' => 'first.last@[IPv6:a1::b4]', + 'analysis' => array( + 'category' => ISEMAIL_RFC5321, + 'diagnosis' => array( + 0 => ISEMAIL_RFC5321_ADDRESSLITERAL, + ), + ), + 'comment' => 'IPv6 authority is RFC 4291', + 'credit' => array( + 'name' => 'Dominic Sayers', + 'link' => 'http://isemail.info', + ), + 'id' => '241', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests-original.xml'), + 'line' => 1861, + ), + ), + 'first.last@[IPv6:a1:::b4]' => array( + 'address' => 'first.last@[IPv6:a1:::b4]', + 'analysis' => array( + 'category' => ISEMAIL_RFC5322, + 'diagnosis' => array( + 0 => ISEMAIL_RFC5322_IPV6_2X2XCOLON, + ), + ), + 'comment' => 'IPv6 authority is RFC 4291', + 'credit' => array( + 'name' => 'Dominic Sayers', + 'link' => 'http://isemail.info', + ), + 'id' => '242', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests-original.xml'), + 'line' => 1869, + ), + ), + 'first.last@[IPv6:a1:]' => array( + 'address' => 'first.last@[IPv6:a1:]', + 'analysis' => array( + 'category' => ISEMAIL_RFC5322, + 'diagnosis' => array( + 0 => ISEMAIL_RFC5322_IPV6_COLONEND, + ), + ), + 'comment' => 'IPv6 authority is RFC 4291', + 'credit' => array( + 'name' => 'Dominic Sayers', + 'link' => 'http://isemail.info', + ), + 'id' => '243', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests-original.xml'), + 'line' => 1877, + ), + ), + 'first.last@[IPv6:a1::]' => array( + 'address' => 'first.last@[IPv6:a1::]', + 'analysis' => array( + 'category' => ISEMAIL_RFC5321, + 'diagnosis' => array( + 0 => ISEMAIL_RFC5321_ADDRESSLITERAL, + ), + ), + 'comment' => 'IPv6 authority is RFC 4291', + 'credit' => array( + 'name' => 'Dominic Sayers', + 'link' => 'http://isemail.info', + ), + 'id' => '244', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests-original.xml'), + 'line' => 1885, + ), + ), + 'first.last@[IPv6:a1:::]' => array( + 'address' => 'first.last@[IPv6:a1:::]', + 'analysis' => array( + 'category' => ISEMAIL_RFC5322, + 'diagnosis' => array( + 0 => ISEMAIL_RFC5322_IPV6_2X2XCOLON, + ), + ), + 'comment' => 'IPv6 authority is RFC 4291', + 'credit' => array( + 'name' => 'Dominic Sayers', + 'link' => 'http://isemail.info', + ), + 'id' => '245', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests-original.xml'), + 'line' => 1893, + ), + ), + 'first.last@[IPv6:a1:a2:]' => array( + 'address' => 'first.last@[IPv6:a1:a2:]', + 'analysis' => array( + 'category' => ISEMAIL_RFC5322, + 'diagnosis' => array( + 0 => ISEMAIL_RFC5322_IPV6_COLONEND, + ), + ), + 'comment' => 'IPv6 authority is RFC 4291', + 'credit' => array( + 'name' => 'Dominic Sayers', + 'link' => 'http://isemail.info', + ), + 'id' => '246', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests-original.xml'), + 'line' => 1901, + ), + ), + 'first.last@[IPv6:a1:a2::]' => array( + 'address' => 'first.last@[IPv6:a1:a2::]', + 'analysis' => array( + 'category' => ISEMAIL_RFC5321, + 'diagnosis' => array( + 0 => ISEMAIL_RFC5321_ADDRESSLITERAL, + ), + ), + 'comment' => 'IPv6 authority is RFC 4291', + 'credit' => array( + 'name' => 'Dominic Sayers', + 'link' => 'http://isemail.info', + ), + 'id' => '247', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests-original.xml'), + 'line' => 1909, + ), + ), + 'first.last@[IPv6:a1:a2:::]' => array( + 'address' => 'first.last@[IPv6:a1:a2:::]', + 'analysis' => array( + 'category' => ISEMAIL_RFC5322, + 'diagnosis' => array( + 0 => ISEMAIL_RFC5322_IPV6_2X2XCOLON, + ), + ), + 'comment' => 'IPv6 authority is RFC 4291', + 'credit' => array( + 'name' => 'Dominic Sayers', + 'link' => 'http://isemail.info', + ), + 'id' => '248', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests-original.xml'), + 'line' => 1917, + ), + ), + 'first.last@[IPv6:0123:4567:89ab:cdef::]' => array( + 'address' => 'first.last@[IPv6:0123:4567:89ab:cdef::]', + 'analysis' => array( + 'category' => ISEMAIL_RFC5321, + 'diagnosis' => array( + 0 => ISEMAIL_RFC5321_ADDRESSLITERAL, + ), + ), + 'comment' => 'IPv6 authority is RFC 4291', + 'credit' => array( + 'name' => 'Dominic Sayers', + 'link' => 'http://isemail.info', + ), + 'id' => '249', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests-original.xml'), + 'line' => 1925, + ), + ), + 'first.last@[IPv6:0123:4567:89ab:CDEF::]' => array( + 'address' => 'first.last@[IPv6:0123:4567:89ab:CDEF::]', + 'analysis' => array( + 'category' => ISEMAIL_RFC5321, + 'diagnosis' => array( + 0 => ISEMAIL_RFC5321_ADDRESSLITERAL, + ), + ), + 'comment' => 'IPv6 authority is RFC 4291', + 'credit' => array( + 'name' => 'Dominic Sayers', + 'link' => 'http://isemail.info', + ), + 'id' => '250', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests-original.xml'), + 'line' => 1933, + ), + ), + 'first.last@[IPv6:::a3:a4:b1:ffff:11.22.33.44]' => array( + 'address' => 'first.last@[IPv6:::a3:a4:b1:ffff:11.22.33.44]', + 'analysis' => array( + 'category' => ISEMAIL_RFC5321, + 'diagnosis' => array( + 0 => ISEMAIL_RFC5321_ADDRESSLITERAL, + ), + ), + 'comment' => 'IPv6 authority is RFC 4291', + 'credit' => array( + 'name' => 'Dominic Sayers', + 'link' => 'http://isemail.info', + ), + 'id' => '251', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests-original.xml'), + 'line' => 1941, + ), + ), + 'first.last@[IPv6:::a2:a3:a4:b1:ffff:11.22.33.44]' => array( + 'address' => 'first.last@[IPv6:::a2:a3:a4:b1:ffff:11.22.33.44]', + 'analysis' => array( + 'category' => ISEMAIL_RFC5321, + 'diagnosis' => array( + 0 => ISEMAIL_RFC5321_IPV6DEPRECATED, + ), + ), + 'comment' => ':: only elides one zero group (IPv6 authority is RFC 4291)', + 'credit' => array( + 'name' => 'Dominic Sayers', + 'link' => 'http://isemail.info', + ), + 'id' => '252', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests-original.xml'), + 'line' => 1949, + ), + ), + 'first.last@[IPv6:a1:a2:a3:a4::11.22.33.44]' => array( + 'address' => 'first.last@[IPv6:a1:a2:a3:a4::11.22.33.44]', + 'analysis' => array( + 'category' => ISEMAIL_RFC5321, + 'diagnosis' => array( + 0 => ISEMAIL_RFC5321_ADDRESSLITERAL, + ), + ), + 'comment' => 'IPv6 authority is RFC 4291', + 'credit' => array( + 'name' => 'Dominic Sayers', + 'link' => 'http://isemail.info', + ), + 'id' => '253', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests-original.xml'), + 'line' => 1957, + ), + ), + 'first.last@[IPv6:a1:a2:a3:a4:b1::11.22.33.44]' => array( + 'address' => 'first.last@[IPv6:a1:a2:a3:a4:b1::11.22.33.44]', + 'analysis' => array( + 'category' => ISEMAIL_RFC5321, + 'diagnosis' => array( + 0 => ISEMAIL_RFC5321_IPV6DEPRECATED, + ), + ), + 'comment' => ':: only elides one zero group (IPv6 authority is RFC 4291)', + 'credit' => array( + 'name' => 'Dominic Sayers', + 'link' => 'http://isemail.info', + ), + 'id' => '254', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests-original.xml'), + 'line' => 1965, + ), + ), + 'first.last@[IPv6::11.22.33.44]' => array( + 'address' => 'first.last@[IPv6::11.22.33.44]', + 'analysis' => array( + 'category' => ISEMAIL_RFC5322, + 'diagnosis' => array( + 0 => ISEMAIL_RFC5322_IPV6_COLONSTRT, + ), + ), + 'comment' => 'IPv6 authority is RFC 4291', + 'credit' => array( + 'name' => 'Dominic Sayers', + 'link' => 'http://isemail.info', + ), + 'id' => '255', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests-original.xml'), + 'line' => 1973, + ), + ), + 'first.last@[IPv6::::11.22.33.44]' => array( + 'address' => 'first.last@[IPv6::::11.22.33.44]', + 'analysis' => array( + 'category' => ISEMAIL_RFC5322, + 'diagnosis' => array( + 0 => ISEMAIL_RFC5322_IPV6_2X2XCOLON, + ), + ), + 'comment' => 'IPv6 authority is RFC 4291', + 'credit' => array( + 'name' => 'Dominic Sayers', + 'link' => 'http://isemail.info', + ), + 'id' => '256', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests-original.xml'), + 'line' => 1981, + ), + ), + 'first.last@[IPv6:a1:11.22.33.44]' => array( + 'address' => 'first.last@[IPv6:a1:11.22.33.44]', + 'analysis' => array( + 'category' => ISEMAIL_RFC5322, + 'diagnosis' => array( + 0 => ISEMAIL_RFC5322_IPV6_GRPCOUNT, + ), + ), + 'comment' => 'IPv6 authority is RFC 4291', + 'credit' => array( + 'name' => 'Dominic Sayers', + 'link' => 'http://isemail.info', + ), + 'id' => '257', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests-original.xml'), + 'line' => 1989, + ), + ), + 'first.last@[IPv6:a1::11.22.33.44]' => array( + 'address' => 'first.last@[IPv6:a1::11.22.33.44]', + 'analysis' => array( + 'category' => ISEMAIL_RFC5321, + 'diagnosis' => array( + 0 => ISEMAIL_RFC5321_ADDRESSLITERAL, + ), + ), + 'comment' => 'IPv6 authority is RFC 4291', + 'credit' => array( + 'name' => 'Dominic Sayers', + 'link' => 'http://isemail.info', + ), + 'id' => '258', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests-original.xml'), + 'line' => 1997, + ), + ), + 'first.last@[IPv6:a1:::11.22.33.44]' => array( + 'address' => 'first.last@[IPv6:a1:::11.22.33.44]', + 'analysis' => array( + 'category' => ISEMAIL_RFC5322, + 'diagnosis' => array( + 0 => ISEMAIL_RFC5322_IPV6_2X2XCOLON, + ), + ), + 'comment' => 'IPv6 authority is RFC 4291', + 'credit' => array( + 'name' => 'Dominic Sayers', + 'link' => 'http://isemail.info', + ), + 'id' => '259', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests-original.xml'), + 'line' => 2005, + ), + ), + 'first.last@[IPv6:a1:a2::11.22.33.44]' => array( + 'address' => 'first.last@[IPv6:a1:a2::11.22.33.44]', + 'analysis' => array( + 'category' => ISEMAIL_RFC5321, + 'diagnosis' => array( + 0 => ISEMAIL_RFC5321_ADDRESSLITERAL, + ), + ), + 'comment' => 'IPv6 authority is RFC 4291', + 'credit' => array( + 'name' => 'Dominic Sayers', + 'link' => 'http://isemail.info', + ), + 'id' => '260', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests-original.xml'), + 'line' => 2013, + ), + ), + 'first.last@[IPv6:a1:a2:::11.22.33.44]' => array( + 'address' => 'first.last@[IPv6:a1:a2:::11.22.33.44]', + 'analysis' => array( + 'category' => ISEMAIL_RFC5322, + 'diagnosis' => array( + 0 => ISEMAIL_RFC5322_IPV6_2X2XCOLON, + ), + ), + 'comment' => 'IPv6 authority is RFC 4291', + 'credit' => array( + 'name' => 'Dominic Sayers', + 'link' => 'http://isemail.info', + ), + 'id' => '261', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests-original.xml'), + 'line' => 2021, + ), + ), + 'first.last@[IPv6:0123:4567:89ab:cdef::11.22.33.44]' => array( + 'address' => 'first.last@[IPv6:0123:4567:89ab:cdef::11.22.33.44]', + 'analysis' => array( + 'category' => ISEMAIL_RFC5321, + 'diagnosis' => array( + 0 => ISEMAIL_RFC5321_ADDRESSLITERAL, + ), + ), + 'comment' => 'IPv6 authority is RFC 4291', + 'credit' => array( + 'name' => 'Dominic Sayers', + 'link' => 'http://isemail.info', + ), + 'id' => '262', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests-original.xml'), + 'line' => 2029, + ), + ), + 'first.last@[IPv6:0123:4567:89ab:cdef::11.22.33.xx]' => array( + 'address' => 'first.last@[IPv6:0123:4567:89ab:cdef::11.22.33.xx]', + 'analysis' => array( + 'category' => ISEMAIL_RFC5322, + 'diagnosis' => array( + 0 => ISEMAIL_RFC5322_IPV6_BADCHAR, + ), + ), + 'comment' => 'IPv6 authority is RFC 4291', + 'credit' => array( + 'name' => 'Dominic Sayers', + 'link' => 'http://isemail.info', + ), + 'id' => '263', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests-original.xml'), + 'line' => 2037, + ), + ), + 'first.last@[IPv6:0123:4567:89ab:CDEF::11.22.33.44]' => array( + 'address' => 'first.last@[IPv6:0123:4567:89ab:CDEF::11.22.33.44]', + 'analysis' => array( + 'category' => ISEMAIL_RFC5321, + 'diagnosis' => array( + 0 => ISEMAIL_RFC5321_ADDRESSLITERAL, + ), + ), + 'comment' => 'IPv6 authority is RFC 4291', + 'credit' => array( + 'name' => 'Dominic Sayers', + 'link' => 'http://isemail.info', + ), + 'id' => '264', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests-original.xml'), + 'line' => 2045, + ), + ), + 'first.last@[IPv6:0123:4567:89ab:CDEFF::11.22.33.44]' => array( + 'address' => 'first.last@[IPv6:0123:4567:89ab:CDEFF::11.22.33.44]', + 'analysis' => array( + 'category' => ISEMAIL_RFC5322, + 'diagnosis' => array( + 0 => ISEMAIL_RFC5322_IPV6_BADCHAR, + ), + ), + 'comment' => 'IPv6 authority is RFC 4291', + 'credit' => array( + 'name' => 'Dominic Sayers', + 'link' => 'http://isemail.info', + ), + 'id' => '265', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests-original.xml'), + 'line' => 2053, + ), + ), + 'first.last@[IPv6:a1::a4:b1::b4:11.22.33.44]' => array( + 'address' => 'first.last@[IPv6:a1::a4:b1::b4:11.22.33.44]', + 'analysis' => array( + 'category' => ISEMAIL_RFC5322, + 'diagnosis' => array( + 0 => ISEMAIL_RFC5322_IPV6_2X2XCOLON, + ), + ), + 'comment' => 'IPv6 authority is RFC 4291', + 'credit' => array( + 'name' => 'Dominic Sayers', + 'link' => 'http://isemail.info', + ), + 'id' => '266', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests-original.xml'), + 'line' => 2061, + ), + ), + 'first.last@[IPv6:a1::11.22.33]' => array( + 'address' => 'first.last@[IPv6:a1::11.22.33]', + 'analysis' => array( + 'category' => ISEMAIL_RFC5322, + 'diagnosis' => array( + 0 => ISEMAIL_RFC5322_IPV6_BADCHAR, + ), + ), + 'comment' => 'IPv6 authority is RFC 4291', + 'credit' => array( + 'name' => 'Dominic Sayers', + 'link' => 'http://isemail.info', + ), + 'id' => '267', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests-original.xml'), + 'line' => 2069, + ), + ), + 'first.last@[IPv6:a1::11.22.33.44.55]' => array( + 'address' => 'first.last@[IPv6:a1::11.22.33.44.55]', + 'analysis' => array( + 'category' => ISEMAIL_RFC5322, + 'diagnosis' => array( + 0 => ISEMAIL_RFC5322_IPV6_BADCHAR, + ), + ), + 'comment' => 'IPv6 authority is RFC 4291', + 'credit' => array( + 'name' => 'Dominic Sayers', + 'link' => 'http://isemail.info', + ), + 'id' => '268', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests-original.xml'), + 'line' => 2077, + ), + ), + 'first.last@[IPv6:a1::b211.22.33.44]' => array( + 'address' => 'first.last@[IPv6:a1::b211.22.33.44]', + 'analysis' => array( + 'category' => ISEMAIL_RFC5322, + 'diagnosis' => array( + 0 => ISEMAIL_RFC5322_IPV6_BADCHAR, + ), + ), + 'comment' => 'IPv6 authority is RFC 4291', + 'credit' => array( + 'name' => 'Dominic Sayers', + 'link' => 'http://isemail.info', + ), + 'id' => '269', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests-original.xml'), + 'line' => 2085, + ), + ), + 'first.last@[IPv6:a1::b2:11.22.33.44]' => array( + 'address' => 'first.last@[IPv6:a1::b2:11.22.33.44]', + 'analysis' => array( + 'category' => ISEMAIL_RFC5321, + 'diagnosis' => array( + 0 => ISEMAIL_RFC5321_ADDRESSLITERAL, + ), + ), + 'comment' => 'IPv6 authority is RFC 4291', + 'credit' => array( + 'name' => 'Dominic Sayers', + 'link' => 'http://isemail.info', + ), + 'id' => '270', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests-original.xml'), + 'line' => 2093, + ), + ), + 'first.last@[IPv6:a1::b2::11.22.33.44]' => array( + 'address' => 'first.last@[IPv6:a1::b2::11.22.33.44]', + 'analysis' => array( + 'category' => ISEMAIL_RFC5322, + 'diagnosis' => array( + 0 => ISEMAIL_RFC5322_IPV6_2X2XCOLON, + ), + ), + 'comment' => 'IPv6 authority is RFC 4291', + 'credit' => array( + 'name' => 'Dominic Sayers', + 'link' => 'http://isemail.info', + ), + 'id' => '271', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests-original.xml'), + 'line' => 2101, + ), + ), + 'first.last@[IPv6:a1::b3:]' => array( + 'address' => 'first.last@[IPv6:a1::b3:]', + 'analysis' => array( + 'category' => ISEMAIL_RFC5322, + 'diagnosis' => array( + 0 => ISEMAIL_RFC5322_IPV6_COLONEND, + ), + ), + 'comment' => 'IPv6 authority is RFC 4291', + 'credit' => array( + 'name' => 'Dominic Sayers', + 'link' => 'http://isemail.info', + ), + 'id' => '272', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests-original.xml'), + 'line' => 2109, + ), + ), + 'first.last@[IPv6::a2::b4]' => array( + 'address' => 'first.last@[IPv6::a2::b4]', + 'analysis' => array( + 'category' => ISEMAIL_RFC5322, + 'diagnosis' => array( + 0 => ISEMAIL_RFC5322_IPV6_COLONSTRT, + ), + ), + 'comment' => 'IPv6 authority is RFC 4291', + 'credit' => array( + 'name' => 'Dominic Sayers', + 'link' => 'http://isemail.info', + ), + 'id' => '273', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests-original.xml'), + 'line' => 2117, + ), + ), + 'first.last@[IPv6:a1:a2:a3:a4:b1:b2:b3:]' => array( + 'address' => 'first.last@[IPv6:a1:a2:a3:a4:b1:b2:b3:]', + 'analysis' => array( + 'category' => ISEMAIL_RFC5322, + 'diagnosis' => array( + 0 => ISEMAIL_RFC5322_IPV6_COLONEND, + ), + ), + 'comment' => 'IPv6 authority is RFC 4291', + 'credit' => array( + 'name' => 'Dominic Sayers', + 'link' => 'http://isemail.info', + ), + 'id' => '274', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests-original.xml'), + 'line' => 2125, + ), + ), + 'first.last@[IPv6::a2:a3:a4:b1:b2:b3:b4]' => array( + 'address' => 'first.last@[IPv6::a2:a3:a4:b1:b2:b3:b4]', + 'analysis' => array( + 'category' => ISEMAIL_RFC5322, + 'diagnosis' => array( + 0 => ISEMAIL_RFC5322_IPV6_COLONSTRT, + ), + ), + 'comment' => 'IPv6 authority is RFC 4291', + 'credit' => array( + 'name' => 'Dominic Sayers', + 'link' => 'http://isemail.info', + ), + 'id' => '275', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests-original.xml'), + 'line' => 2133, + ), + ), + 'first.last@[IPv6:a1:a2:a3:a4::b1:b2:b3:b4]' => array( + 'address' => 'first.last@[IPv6:a1:a2:a3:a4::b1:b2:b3:b4]', + 'analysis' => array( + 'category' => ISEMAIL_RFC5322, + 'diagnosis' => array( + 0 => ISEMAIL_RFC5322_IPV6_MAXGRPS, + ), + ), + 'comment' => 'IPv6 authority is RFC 4291', + 'credit' => array( + 'name' => 'Daniel Marschall', + 'link' => 'http://isemail.info', + ), + 'id' => '276', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests-original.xml'), + 'line' => 2141, + ), + ), + 'test@example.com +' => array( + 'address' => 'test@example.com +', + 'analysis' => array( + 'category' => ISEMAIL_ERR, + 'diagnosis' => array( + 0 => ISEMAIL_ERR_EXPECTING_ATEXT, + ), + ), + 'comment' => 'Address has a newline at the end', + 'credit' => array( + 'name' => 'Michael Rushton', + 'link' => 'http://squiloople.com/tag/email/', + ), + 'id' => '278', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests-original.xml'), + 'line' => 2157, + ), + ), + 'test@xn--example.com' => array( + 'address' => 'test@xn--example.com', + 'analysis' => array( + 'category' => ISEMAIL_DNSWARN, + 'diagnosis' => array( + 0 => ISEMAIL_DNSWARN_NO_RECORD, + ), + ), + 'comment' => 'Address is at an Internationalized Domain Name (Punycode)', + 'credit' => array( + 'name' => 'Michael Rushton', + 'link' => 'http://squiloople.com/tag/email/', + ), + 'id' => '279', + 'source' => array( + 'path' => new \SplFileInfo(dirname(__DIR__) . '/xml/tests-original.xml'), + 'line' => 2165, + ), + ), +); diff --git a/Resources/xml/meta.xml b/Resources/xml/meta.xml new file mode 100644 index 0000000..c5affb3 --- /dev/null +++ b/Resources/xml/meta.xml @@ -0,0 +1,857 @@ + + + + + + 1 + Address is valid + + + 7 + Address is valid but a DNS check was not successful + + + 15 + Address is valid for SMTP but has unusual elements + + + 31 + Address is valid within the message but cannot be used unmodified for the envelope + + + 63 + Address contains deprecated elements but may still be valid in restricted contexts + + + 127 + The address is only valid according to the broad definition of RFC 5322. It is otherwise invalid. + + + 255 + Address is invalid for any purpose + + + + + + 250 2.1.5 ok + 2.1.5 + + + 553 5.1.0 Other address status + 5.1.0 + + + 553 5.1.1 Bad destination mailbox address + 5.1.1 + + + 553 5.1.2 Bad destination system address + 5.1.2 + + + 553 5.1.3 Bad destination mailbox address syntax + 5.1.3 + + + + + +
+ local-part = dot-atom / quoted-string / obs-local-part + + dot-atom = [CFWS] dot-atom-text [CFWS] + + dot-atom-text = 1*atext *("." 1*atext) + + quoted-string = [CFWS] + DQUOTE *([FWS] qcontent) [FWS] DQUOTE + [CFWS] + + obs-local-part = word *("." word) + + word = atom / quoted-string + + atom = [CFWS] 1*atext [CFWS]
+ RFC 5322 section 3.4.1 +
+ +
+ The maximum total length of a user name or other local-part is 64 + octets.
+ RFC 5322 section 4.5.3.1.1 +
+ +
+ obs-local-part = word *("." word) + + word = atom / quoted-string + + atom = [CFWS] 1*atext [CFWS] + + quoted-string = [CFWS] + DQUOTE *([FWS] qcontent) [FWS] DQUOTE + [CFWS] +
+ RFC 5322 section 3.4.1 +
+ +
+ dot-atom = [CFWS] dot-atom-text [CFWS] + + dot-atom-text = 1*atext *("." 1*atext) +
+ RFC 5322 section 3.4.1 +
+ +
+ quoted-string = [CFWS] + DQUOTE *([FWS] qcontent) [FWS] DQUOTE + [CFWS] + + qcontent = qtext / quoted-pair + + qtext = %d33 / ; Printable US-ASCII + %d35-91 / ; characters not including + %d93-126 / ; "\" or the quote character + obs-qtext + + quoted-pair = ("\" (VCHAR / WSP)) / obs-qp +
+ RFC 5322 section 3.4.1 +
+ +
+ Comments and folding white space + SHOULD NOT be used around the "@" in the addr-spec. +
+ RFC 5322 section 3.4.1 +
+ +
+ 4. SHOULD NOT This phrase, or the phrase "NOT RECOMMENDED" mean that + there may exist valid reasons in particular circumstances when the + particular behavior is acceptable or even useful, but the full + implications should be understood and the case carefully weighed + before implementing any behavior described with this label. +
+ RFC 2119 section 4 +
+ +
+ atext = ALPHA / DIGIT / ; Printable US-ASCII + "!" / "#" / ; characters not including + "$" / "%" / ; specials. Used for atoms. + "&" / "'" / + "*" / "+" / + "-" / "/" / + "=" / "?" / + "^" / "_" / + "`" / "{" / + "|" / "}" / + "~" +
+ RFC 5322 section 3.2.3 +
+ +
+ obs-domain = atom *("." atom) + + atom = [CFWS] 1*atext [CFWS] +
+ RFC 5322 section 3.4.1 +
+ +
+ domain = dot-atom / domain-literal / obs-domain + + dot-atom = [CFWS] dot-atom-text [CFWS] + + dot-atom-text = 1*atext *("." 1*atext) +
+ RFC 5322 section 3.4.1 +
+ +
+ Domain = sub-domain *("." sub-domain) +
+ RFC 5321 section 4.1.2 +
+ +
+ Domain = sub-domain *("." sub-domain) + + Let-dig = ALPHA / DIGIT + + Ldh-str = *( ALPHA / DIGIT / "-" ) Let-dig +
+ RFC 5321 section 4.1.2 +
+ +
+ labels 63 octets or less +
+ RFC 5321 section 4.1.2 +
+ +
+ CRLF = %d13.10 +
+ RFC 5234 section 2.3 +
+ +
+ CFWS = (1*([FWS] comment) [FWS]) / FWS + + FWS = ([*WSP CRLF] 1*WSP) / obs-FWS + ; Folding white space + + comment = "(" *([FWS] ccontent) [FWS] ")" + + ccontent = ctext / quoted-pair / comment + + ctext = %d33-39 / ; Printable US-ASCII + %d42-91 / ; characters not including + %d93-126 / ; "(", ")", or "\" + obs-ctext +
+ RFC 5322 section 3.2.2 +
+ +
+ domain-literal = [CFWS] "[" *([FWS] dtext) [FWS] "]" [CFWS] +
+ RFC 5322 section 3.4.1 +
+ +
+ address-literal = "[" ( IPv4-address-literal / + IPv6-address-literal / + General-address-literal ) "]" +
+ RFC 5321 section 4.1.2 +
+ +
+ IPv4-address-literal = Snum 3("." Snum) + + Snum = 1*3DIGIT + ; representing a decimal integer + ; value in the range 0 through 255 +
+ RFC 5321 section 4.1.3 +
+ +
+ IPv6-address-literal = "IPv6:" IPv6-addr + + IPv6-addr = IPv6-full / IPv6-comp / IPv6v4-full / IPv6v4-comp + + IPv6-hex = 1*4HEXDIG + + IPv6-full = IPv6-hex 7(":" IPv6-hex) + + IPv6-comp = [IPv6-hex *5(":" IPv6-hex)] "::" + [IPv6-hex *5(":" IPv6-hex)] + ; The "::" represents at least 2 16-bit groups of + ; zeros. No more than 6 groups in addition to the + ; "::" may be present. + + IPv6v4-full = IPv6-hex 5(":" IPv6-hex) ":" IPv4-address-literal + + IPv6v4-comp = [IPv6-hex *3(":" IPv6-hex)] "::" + [IPv6-hex *3(":" IPv6-hex) ":"] + IPv4-address-literal + ; The "::" represents at least 2 16-bit groups of + ; zeros. No more than 4 groups in addition to the + ; "::" and IPv4-address-literal may be present. +
+ RFC 5321 section 4.1.3 +
+ +
+ dtext = %d33-90 / ; Printable US-ASCII + %d94-126 / ; characters not including + obs-dtext ; "[", "]", or "\" +
+ RFC 5322 section 3.4.1 +
+ +
+ obs-dtext = obs-NO-WS-CTL / quoted-pair + + obs-NO-WS-CTL = %d1-8 / ; US-ASCII control + %d11 / ; characters that do not + %d12 / ; include the carriage + %d14-31 / ; return, line feed, and + %d127 ; white space characters +
+ RFC 5322 section 3.4.1 +
+ +
+ qtext = %d33 / ; Printable US-ASCII + %d35-91 / ; characters not including + %d93-126 / ; "\" or the quote character + obs-qtext +
+ RFC 5322 section 3.2.4 +
+ +
+ obs-qtext = obs-NO-WS-CTL + + obs-NO-WS-CTL = %d1-8 / ; US-ASCII control + %d11 / ; characters that do not + %d12 / ; include the carriage + %d14-31 / ; return, line feed, and + %d127 ; white space characters +
+ RFC 5322 section 4.1 +
+ +
+ ctext = %d33-39 / ; Printable US-ASCII + %d42-91 / ; characters not including + %d93-126 / ; "(", ")", or "\" + obs-ctext +
+ RFC 5322 section 3.2.3 +
+ +
+ obs-qtext = obs-NO-WS-CTL + + obs-NO-WS-CTL = %d1-8 / ; US-ASCII control + %d11 / ; characters that do not + %d12 / ; include the carriage + %d14-31 / ; return, line feed, and + %d127 ; white space characters +
+ RFC 5322 section 4.1 +
+ +
+ quoted-pair = ("\" (VCHAR / WSP)) / obs-qp + + VCHAR = %d33-126 ; visible (printing) characters + WSP = SP / HTAB ; white space +
+ RFC 5322 section 3.2.1 +
+ +
+ obs-qp = "\" (%d0 / obs-NO-WS-CTL / LF / CR) + + obs-NO-WS-CTL = %d1-8 / ; US-ASCII control + %d11 / ; characters that do not + %d12 / ; include the carriage + %d14-31 / ; return, line feed, and + %d127 ; white space characters +
+ RFC 5322 section 4.1 +
+ +
+ In the case + of a top-level domain used by itself in an email address, a single + string is used without any dots. This makes the requirement, + described in more detail below, that only fully-qualified domain + names appear in SMTP transactions on the public Internet, + particularly important where top-level domains are involved. +
+ RFC 5321 section 2.3.5 +
+ +
+ Errata ID 1081, reported 2007-11-20, identifies a problem with the + evolution of naming of top-level domains and the text of RFC 1123. + It reads: + + Section 2.1 says: + + However, a valid host name can never + have the dotted-decimal form #.#.#.#, since at least the + highest-level component label will be alphabetic. + + It should say: + + However, a valid host name can never + have the dotted-decimal form #.#.#.#, since at least the + highest-level component label will be not all-numeric. + + Notes: + + RFC 3696 section 2 states: "There is an additional rule that + essentially requires that top-level domain names not be + all-numeric." The eleven IDN test TLDs created in + September 2007 contain hyphen-minus as specified in the + IDNA RFCs. + It should say: + + However, a valid host name can never have the dotted-decimal + form #.#.#.#, since this change does not permit the highest-level + component label to start with a digit even if it is not all-numeric. + Notes: + + This is a correct identification of the problem, but the wrong fix. + RFC 3696, which ID 1081 cites, is an informational document that is + deliberately relaxed about the fine details and says so. It is not + relevant to determination of the text that should have been (with + perfect knowledge of the future) in 1123. + + Based on discussions when we were doing RFC 1591 and subsequently, + the expectation then (and presumably when 1123 was written) was + that the name of any new TLD would follow the rules for the + existing ones, i.e., that they would be exactly two or three + characters long and be all-alphabetic (which is exactly what 1123 + says). The slightly-odd "will be" language in 1123 was, I believe, + because that restriction was expected to be enforced by IANA, + rather than being a protocol issue. ICANN, with a different set of + assignment policies, effectively eliminated the length rule with + the TLDs allocated in 2000. IDNA (RFC 3490) uses a syntax for IDNs + that requires embedded hyphens in TLDs if there were ever to be an + actual IDN TLD (hence the comment in ID 1081 about the IANA IDN + testbed). + + While the proposed correction in Errata ID 1081 would fix the + problem by imposing the narrowest possible restriction ("not + all-numeric"), the original host name rule and the original + statement in 1123 both assume the possibility of a minimal check + to differentiate between domain names and IP addresses, i.e., + checking the first digit only. Because I believe that there are + probably implementations that depend on such minimal parsing --some + probably ancient and embedded-- it would appear to be wise to relax + the rule as little as possible and, in particular, to restrict the + "leading digit" exception to domains below the top-level, as 1123 + effectively does. + + The suggested text above reflects that reasoning. Because of the + possible consequences of this issue, I would hope that it would be + discussed with the relevant DNS-related WGs, the Root Server Advisory + Committee (RSAC), and with IANA for comment and as a heads-up. This + issue is substantive enough that it should probably be dealt with by + a document that explicitly updates 1123 and that is processed on the + Standards Track, but an accurate statement in the errata is the + next-best option until that can be done. In the interim and while + this suggestion is being discussed, Errata ID 1081 should probably + be taken out of "validated" status.
+ John Klensin, RFC 1123 erratum 1353 +
+ +
+ However, there is a restriction in RFC 2821 on the length of an + address in MAIL and RCPT commands of 254 characters. Since addresses + that do not fit in those fields are not normally useful, the upper + limit on address lengths should normally be considered to be 254. +
+ Dominic Sayers, RFC 3696 erratum 1690 +
+ +
+ The maximum total length of a domain name or number is 255 octets. +
+ RFC 5321 section 4.5.3.1.2 +
+ +
+ Mailbox = Local-part "@" ( Domain / address-literal ) +
+ RFC 5321 section 4.1.2 +
+ +
+ addr-spec = local-part "@" domain +
+ RFC 5322 section 3.4.1 +
+
+ + + + 0 + ISEMAIL_VALID_CATEGORY + Address is valid. Please note that this does not mean the address actually exists, nor even that the domain actually exists. This address could be issued by the domain owner without breaking the rules of any RFCs. + ISEMAIL_META_SMTP_250_215 + + + 5 + ISEMAIL_DNSWARN + Couldn't find an MX record for this domain but an A-record does exist + ISEMAIL_META_SMTP_250_215 + + + 6 + ISEMAIL_DNSWARN + Couldn't find an MX record or an A-record for this domain + ISEMAIL_META_SMTP_250_215 + + + 9 + ISEMAIL_RFC5321 + Address is valid but at a Top Level Domain + ISEMAIL_META_SMTP_250_215 + TLD + + + 10 + ISEMAIL_RFC5321 + Address is valid but the Top Level Domain begins with a number + ISEMAIL_META_SMTP_250_215 + TLD-format + + + 11 + ISEMAIL_RFC5321 + Address is valid but contains a quoted string + ISEMAIL_META_SMTP_250_215 + quoted-string + + + 12 + ISEMAIL_RFC5321 + Address is valid but at a literal address not a domain + ISEMAIL_META_SMTP_250_215 + address-literal + address-literal-IPv4 + + + 13 + ISEMAIL_DEPREC + Address is valid but contains a :: that only elides one zero group. All implementations must accept and be able to handle any legitimate RFC 4291 format. + ISEMAIL_META_SMTP_250_215 + address-literal-IPv6 + + + 17 + ISEMAIL_CFWS + Address contains comments + ISEMAIL_META_SMTP_250_215 + dot-atom + + + 18 + ISEMAIL_CFWS + Address contains Folding White Space + ISEMAIL_META_SMTP_250_215 + local-part + + + 33 + ISEMAIL_DEPREC + The local part is in a deprecated form + ISEMAIL_META_SMTP_553_511 + obs-local-part + + + 34 + ISEMAIL_DEPREC + Address contains an obsolete form of Folding White Space + ISEMAIL_META_SMTP_553_513 + obs-local-part + obs-domain + + + 35 + ISEMAIL_DEPREC + A quoted string contains a deprecated character + ISEMAIL_META_SMTP_553_513 + obs-qtext + + + 36 + ISEMAIL_DEPREC + A quoted pair contains a deprecated character + ISEMAIL_META_SMTP_553_513 + obs-qp + + + 37 + ISEMAIL_DEPREC + Address contains a comment in a position that is deprecated + ISEMAIL_META_SMTP_553_513 + obs-local-part + obs-domain + + + 38 + ISEMAIL_DEPREC + A comment contains a deprecated character + ISEMAIL_META_SMTP_553_513 + obs-ctext + + + 49 + ISEMAIL_DEPREC + Address contains a comment or Folding White Space around the @ sign + ISEMAIL_META_SMTP_553_513 + CFWS-near-at + SHOULD-NOT + + + 65 + ISEMAIL_RFC5322 + Address is RFC 5322 compliant but contains domain characters that are not allowed by DNS + ISEMAIL_META_SMTP_553_512 + domain-RFC5322 + + + 66 + ISEMAIL_RFC5322 + Address is too long + ISEMAIL_META_SMTP_553_513 + mailbox-maximum + + + 67 + ISEMAIL_RFC5322 + The local part of the address is too long + ISEMAIL_META_SMTP_553_511 + local-part-maximum + + + 68 + ISEMAIL_RFC5322 + The domain part is too long + ISEMAIL_META_SMTP_553_512 + domain-maximum + + + 69 + ISEMAIL_RFC5322 + The domain part contains an element that is too long + ISEMAIL_META_SMTP_553_512 + label + + + 70 + ISEMAIL_RFC5322 + The domain literal is not a valid RFC 5321 address literal + ISEMAIL_META_SMTP_553_513 + domain-literal + + + 71 + ISEMAIL_RFC5322 + The domain literal is not a valid RFC 5321 address literal and it contains obsolete characters + ISEMAIL_META_SMTP_553_513 + obs-dtext + + + 72 + ISEMAIL_RFC5322 + The IPv6 literal address contains the wrong number of groups + ISEMAIL_META_SMTP_553_513 + address-literal-IPv6 + + + 73 + ISEMAIL_RFC5322 + The IPv6 literal address contains too many :: sequences + ISEMAIL_META_SMTP_553_513 + address-literal-IPv6 + + + 74 + ISEMAIL_RFC5322 + The IPv6 address contains an illegal group of characters + ISEMAIL_META_SMTP_553_513 + address-literal-IPv6 + + + 75 + ISEMAIL_RFC5322 + The IPv6 address has too many groups + ISEMAIL_META_SMTP_553_513 + address-literal-IPv6 + + + 76 + ISEMAIL_RFC5322 + IPv6 address starts with a single colon + ISEMAIL_META_SMTP_553_513 + address-literal-IPv6 + + + 77 + ISEMAIL_RFC5322 + IPv6 address ends with a single colon + ISEMAIL_META_SMTP_553_513 + address-literal-IPv6 + + + 129 + ISEMAIL_ERR + A domain literal contains a character that is not allowed + ISEMAIL_META_SMTP_553_512 + dtext + + + 130 + ISEMAIL_ERR + Address has no local part + ISEMAIL_META_SMTP_553_511 + local-part + + + 131 + ISEMAIL_ERR + Address has no domain part + ISEMAIL_META_SMTP_553_512 + addr-spec + mailbox + + + 132 + ISEMAIL_ERR + The address may not contain consecutive dots + ISEMAIL_META_SMTP_553_511 + local-part + domain-RFC5322 + domain-RFC5321 + + + 133 + ISEMAIL_ERR + Address contains text after a comment or Folding White Space + ISEMAIL_META_SMTP_553_513 + local-part + domain-RFC5322 + + + 134 + ISEMAIL_ERR + Address contains text after a quoted string + ISEMAIL_META_SMTP_553_511 + local-part + + + 135 + ISEMAIL_ERR + Extra characters were found after the end of the domain literal + ISEMAIL_META_SMTP_553_512 + domain-RFC5322 + + + 136 + ISEMAIL_ERR + The address contains a character that is not allowed in a quoted pair + ISEMAIL_META_SMTP_553_511 + quoted-pair + + + 137 + ISEMAIL_ERR + Address contains a character that is not allowed + ISEMAIL_META_SMTP_553_511 + atext + + + 138 + ISEMAIL_ERR + A quoted string contains a character that is not allowed + ISEMAIL_META_SMTP_553_511 + qtext + + + 139 + ISEMAIL_ERR + A comment contains a character that is not allowed + ISEMAIL_META_SMTP_553_511 + qtext + + + 140 + ISEMAIL_ERR + The address can't end with a backslash + ISEMAIL_META_SMTP_553_512 + domain-RFC5322 + domain-RFC5321 + quoted-pair + + + 141 + ISEMAIL_ERR + Neither part of the address may begin with a dot + ISEMAIL_META_SMTP_553_511 + local-part + domain-RFC5322 + domain-RFC5321 + + + 142 + ISEMAIL_ERR + Neither part of the address may end with a dot + ISEMAIL_META_SMTP_553_511 + local-part + domain-RFC5322 + domain-RFC5321 + + + 143 + ISEMAIL_ERR + A domain or subdomain cannot begin with a hyphen + ISEMAIL_META_SMTP_553_512 + sub-domain + + + 144 + ISEMAIL_ERR + A domain or subdomain cannot end with a hyphen + ISEMAIL_META_SMTP_553_512 + sub-domain + + + 145 + ISEMAIL_ERR + Unclosed quoted string + ISEMAIL_META_SMTP_553_512 + quoted-string + + + 146 + ISEMAIL_ERR + Unclosed comment + ISEMAIL_META_SMTP_553_512 + CFWS + + + 147 + ISEMAIL_ERR + Domain literal is missing its closing bracket + ISEMAIL_META_SMTP_553_512 + domain-literal + + + 148 + ISEMAIL_ERR + Folding White Space contains consecutive CRLF sequences + ISEMAIL_META_SMTP_553_513 + CFWS + + + 149 + ISEMAIL_ERR + Folding White Space ends with a CRLF sequence + ISEMAIL_META_SMTP_553_513 + CFWS + + + 150 + ISEMAIL_ERR + Address contains a carriage return that is not followed by a line feed + ISEMAIL_META_SMTP_553_513 + CFWS + CRLF + + + diff --git a/Resources/xml/meta.xsd b/Resources/xml/meta.xsd new file mode 100644 index 0000000..fe7c7bb --- /dev/null +++ b/Resources/xml/meta.xsd @@ -0,0 +1,119 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/tests-original.xml b/Resources/xml/tests-original.xml similarity index 100% rename from tests/tests-original.xml rename to Resources/xml/tests-original.xml diff --git a/tests/tests.xml b/Resources/xml/tests.xml similarity index 100% rename from tests/tests.xml rename to Resources/xml/tests.xml diff --git a/tests/tests.xsd b/Resources/xml/tests.xsd similarity index 100% rename from tests/tests.xsd rename to Resources/xml/tests.xsd diff --git a/Resources/xml2php b/Resources/xml2php new file mode 100755 index 0000000..8417eef --- /dev/null +++ b/Resources/xml2php @@ -0,0 +1,602 @@ +#!/usr/bin/env php + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +require_once __DIR__ . '/../vendor/autoload.php'; + +// Launch builder +call_user_func(function () { + return new Builder(); +})->run(); + +/** + * Convert meta.xml and test.xml files into PHP code + * + * @author Oscar Cubo Medina + */ +class Builder +{ + /** + * Runs application + */ + public function run() + { + $classes = array( + // Metadata + 'Categories' => __DIR__ . '/xml/meta.xml', + 'Diagnoses' => __DIR__ . '/xml/meta.xml', + 'References' => __DIR__ . '/xml/meta.xml', + 'SMTP' => __DIR__ . '/xml/meta.xml', + // Tests + 'Tests' => array( + __DIR__ . '/xml/tests-original.xml', + __DIR__ . '/xml/tests.xml', + ), + ); + + foreach ($classes as $class => $source) { + try { + $path = sprintf('%s/data/%s.php', __DIR__, strtolower($class)); + fprintf(STDOUT, "Generating %s dictionary on \"%s\"...\n", $class, $path); + + $dirname = dirname($path); + if (!file_exists($dirname)) { + fprintf(STDOUT, "Create %s dictionary parent directory \"%s\"...\n", $class, $dirname); + mkdir($dirname, 0777, true); + } + unset($dirname); + + $data = call_user_func(array($this, 'load' . $class), $source); + $file = new \SplFileObject($path, 'w+'); + $file->fwrite(<< + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + +return {$this->generatePhp($data, 1)}; + +EOF + ); + + fprintf(STDOUT, "%s dictionary generated.\n", $class); + } catch (\Exception $err) { + fprintf(STDOUT, "%s dictionary failed.\n", $funtion); + throw $err; + } + } + } + + /** + * Convert categories metadata XML into PHP file + * + * @param array $source XML source paths + * + * @return array + * + * + * + * @return array + */ + protected function loadCategories($source) + { + return array_reduce( + iterator_to_array(array_reduce( + is_array($source) ? $source : (array) $source, + function (\Traversable $iterator, $path) { + $document = new \DOMDocument(); + $document->load($path); + $document->schemaValidate(dirname($path) . '/meta.xsd'); + + $xpath = new \DOMXPath($document); + $nodes = $xpath->query('/meta/Categories/item[@id]'); + + if ($nodes) { + $iterator->append(new \ArrayIterator(iterator_to_array($nodes))); + } + + return $iterator; + }, + new \AppendIterator() + )), + function ($items, $node) { + $item = array( + 'value' => '', + 'description' => '', + // Extract id attribute + 'id' => $node->hasAttribute('id') ? $node->getAttribute('id') : '', + // For reference + 'source' => array( + 'path' => new \SplFileInfo($node->baseURI), + 'line' => $node->getLineNo(), + ), + ); + + foreach ($node->childNodes as $name => $child) { + switch ($child->localName) { + case '': + break; + + case 'description': + $item[$child->localName] = (string) $child->nodeValue; + break; + + case 'value': + $item[$child->localName] = 0 + $child->nodeValue; + break; + + default: + fprintf(STDERR, "Ignoring \"%s\" attribute\n", $child->localName); + break; + } + } + + if (isset($items[$item['id']])) { + fprintf( + STDERR, + "Ignoring duplicate test for \"%s\" on %s:%d id=%s (previous: %s:%d id=%s)\n", + $item['id'], + $item['source']['path'], + $item['source']['line'], + $item['id'], + $items[$item['id']]['source']['path'], + $items[$item['id']]['source']['line'], + $items[$item['id']]['id'] + ); + + return $items; + } + + $items[$item['id']] = $item; + + return $items; + }, + array() + ); + } + + /** + * Convert diagnoses metadata XML into PHP file + * + * @param array $source XML source paths + * + * @return array + */ + protected function loadDiagnoses($source) + { + return array_reduce( + iterator_to_array(array_reduce( + is_array($source) ? $source : (array) $source, + function (\Traversable $iterator, $path) { + $document = new \DOMDocument(); + $document->load($path); + $document->schemaValidate(dirname($path) . '/meta.xsd'); + + $xpath = new \DOMXPath($document); + $nodes = $xpath->query('/meta/Diagnoses/item[@id]'); + + if ($nodes) { + $iterator->append(new \ArrayIterator(iterator_to_array($nodes))); + } + + return $iterator; + }, + new \AppendIterator() + )), + function ($items, $node) { + $item = array( + 'value' => '', + 'category' => '', + 'description' => '', + 'smtp' => '', + 'references' => array(), + // Extract id attribute + 'id' => $node->hasAttribute('id') ? $node->getAttribute('id') : '', + // For reference + 'source' => array( + 'path' => new \SplFileInfo($node->baseURI), + 'line' => $node->getLineNo(), + ), + ); + + foreach ($node->childNodes as $name => $child) { + switch ($child->localName) { + case '': + break; + + case 'category': + case 'description': + case 'smtp': + $item[$child->localName] = (string) $child->nodeValue; + break; + + case 'value': + $item[$child->localName] = 0 + $child->nodeValue; + break; + + case 'reference': + $item['references'][] = (string) $child->nodeValue; + break; + + default: + fprintf(STDERR, "Ignoring %s element\n", $child->localName); + break; + } + } + + if (isset($items[$item['id']])) { + fprintf( + STDERR, + "Ignoring duplicate test for \"%s\" on %s:%d id=%s (previous: %s:%d id=%s)\n", + $item['id'], + $item['source']['path'], + $item['source']['line'], + $item['id'], + $items[$item['id']]['source']['path'], + $items[$item['id']]['source']['line'], + $items[$item['id']]['id'] + ); + + return $items; + } + + $items[$item['id']] = $item; + + return $items; + }, + array() + ); + } + + /** + * Convert reference metadata XML into PHP file + * + * @param array $source XML source paths + * + * @return array + */ + protected function loadReferences($source) + { + return array_reduce( + iterator_to_array(array_reduce( + is_array($source) ? $source : (array) $source, + function (\Traversable $iterator, $path) { + $document = new \DOMDocument(); + $document->load($path); + $document->schemaValidate(dirname($path) . '/meta.xsd'); + + $xpath = new \DOMXPath($document); + $nodes = $xpath->query('/meta/References/item[@id]'); + + if ($nodes) { + $iterator->append(new \ArrayIterator(iterator_to_array($nodes))); + } + + return $iterator; + }, + new \AppendIterator() + )), + function ($items, $node) { + $item = array( + 'cite' => '', + 'quote' => '', + 'link' => '', + // Extract id attribute + 'id' => $node->hasAttribute('id') ? $node->getAttribute('id') : '', + // For reference + 'source' => array( + 'path' => new \SplFileInfo($node->baseURI), + 'line' => $node->getLineNo(), + ), + ); + + foreach ($node->childNodes as $name => $child) { + switch ($child->localName) { + case '': + break; + + case 'cite': + $item[$child->localName] = (string) $child->nodeValue; + break; + + case 'blockquote': + $item['quote'] = (string) $child->nodeValue; + $item['link'] = (string) $child->getAttribute('cite'); + break; + + default: + fprintf(STDERR, "Ignoring %s element\n", $child->localName); + break; + } + } + + if (isset($items[$item['id']])) { + fprintf( + STDERR, + "Ignoring duplicate test for \"%s\" on %s:%d id=%s (previous: %s:%d id=%s)\n", + $item['id'], + $item['source']['path'], + $item['source']['line'], + $item['id'], + $items[$item['id']]['source']['path'], + $items[$item['id']]['source']['line'], + $items[$item['id']]['id'] + ); + + return $items; + } + + $items[$item['id']] = $item; + + return $items; + }, + array() + ); + } + + /** + * Convert SMTP metadata XML into PHP file + * + * @param array $source XML source paths + * + * @return array + */ + protected function loadSMTP($source) + { + return array_reduce( + iterator_to_array(array_reduce( + is_array($source) ? $source : (array) $source, + function (\Traversable $iterator, $path) { + $document = new \DOMDocument(); + $document->load($path); + $document->schemaValidate(dirname($path) . '/meta.xsd'); + + $xpath = new \DOMXPath($document); + $nodes = $xpath->query('/meta/SMTP/item[@id]'); + + if ($nodes) { + $iterator->append(new \ArrayIterator(iterator_to_array($nodes))); + } + + return $iterator; + }, + new \AppendIterator() + )), + function ($items, $node) { + $item = array( + 'text' => '', + 'value' => '', + // Extract id attribute + 'id' => $node->hasAttribute('id') ? $node->getAttribute('id') : '', + // For reference + 'source' => array( + 'path' => new \SplFileInfo($node->baseURI), + 'line' => $node->getLineNo(), + ), + ); + + foreach ($node->childNodes as $name => $child) { + switch ($child->localName) { + case '': + break; + + case 'text': + case 'value': + $item[$child->localName] = (string) $child->nodeValue; + break; + + default: + fprintf(STDERR, "Ignoring \"%s\" attribute\n", $child->localName); + break; + } + } + + if (isset($items[$item['id']])) { + fprintf( + STDERR, + "Ignoring duplicate test for \"%s\" on %s:%d id=%s (previous: %s:%d id=%s)\n", + $item['id'], + $item['source']['path'], + $item['source']['line'], + $item['id'], + $items[$item['id']]['source']['path'], + $items[$item['id']]['source']['line'], + $items[$item['id']]['id'] + ); + + return $items; + } + + $items[$item['id']] = $item; + + return $items; + }, + array() + ); + } + + /** + * Convert test XML into PHP file + * + * @param array $source XML source paths + * + * @return array + */ + protected function loadTests($source) + { + // Replace special characters (http://github.com/dominicsayers/isemail/blob/master/test/tests.php#L138) + $searchs = array(' ', mb_convert_encoding('␍␊', 'UTF-8', 'HTML-ENTITIES')); + $replace = array(' ', chr(13) . chr(10)); + for ($i = 0; $i < 32; $i++) { + // PHP bug doesn't allow us to use hex notation (http://bugs.php.net/48645) + $entity = mb_convert_encoding('&#' . (string) (9216 + $i) . ';', 'UTF-8', 'HTML-ENTITIES'); + $searchs[] = $entity; + $replace[] = chr($i); + } + + return array_reduce( + iterator_to_array(array_reduce( + is_array($source) ? $source : (array) $source, + function (\Traversable $iterator, $path) { + $document = new \DOMDocument(); + $document->load($path); + $document->schemaValidate(dirname($path) . '/tests.xsd'); + + $xpath = new \DOMXPath($document); + $nodes = $xpath->query('//test'); + + if ($nodes) { + $iterator->append(new \ArrayIterator(iterator_to_array($nodes))); + } + + return $iterator; + }, + new \AppendIterator() + )), + function ($tests, $node) use ($searchs, $replace) { + $test = array( + 'address' => '', + 'analysis' => array( + 'category' => '', + 'diagnosis' => '', + ), + 'comment' => '', + 'credit' => array(), + // Extract id attribute + 'id' => $node->hasAttribute('id') ? $node->getAttribute('id') : '', + // For reference + 'source' => array( + 'path' => new \SplFileInfo($node->baseURI), + 'line' => $node->getLineNo(), + ), + ); + + foreach ($node->childNodes as $name => $child) { + switch ($child->localName) { + case '': + break; + + case 'address': + case 'comment': + $test[$child->localName] = str_replace($searchs, $replace, $child->nodeValue); + break; + + case 'category': + $test['analysis'][$child->localName] = (string) $child->nodeValue; + break; + + case 'diagnosis': + $test['analysis'][$child->localName][] = (string) $child->nodeValue; + break; + + case 'source': + $test['credit']['name'] = (string) $child->nodeValue; + break; + + case 'sourcelink': + $test['credit']['link'] = (string) $child->nodeValue; + break; + + default: + fprintf(STDERR, "Ignoring \"%s\" attribute\n", $child->localName); + break; + } + } + + if (isset($tests[$test['address']])) { + fprintf( + STDERR, + "Ignoring duplicate test for \"%s\" on %s:%d id=%s (previous: %s:%d id=%s)\n", + $test['address'], + $test['source']['path'], + $test['source']['line'], + $test['id'], + $tests[$test['address']]['source']['path'], + $tests[$test['address']]['source']['line'], + $tests[$test['address']]['id'] + ); + + return $tests; + } + + $tests[$test['address']] = $test; + + return $tests; + }, + array() + ); + } + + /** + * Generate PHP code for the value + * + * @param mixed $value Value to dump + * @param integer $level Level of identation + * @param boolean $const Do convert constants into its values + * + * @return string + */ + protected function generatePhp($value, $level = 0, $const = true) + { + if (is_null($value)) { + return 'null'; + } elseif ($value instanceof \SplFileInfo) { + static $root = null; + static $len = null; + if (null === $root) { + $root = __DIR__; + $len = strlen($root); + } + + return strncmp($root, $value, $len) + // Out of working dir => use absolute path + ? sprintf("new \\SplFileInfo('%s')", $value) + // Use relative path under root dir + : sprintf("new \\SplFileInfo(dirname(__DIR__) . '%s')", substr($value, strlen(__DIR__))); + ; + } else if (is_int($value)) { + return (string) $value; + } elseif (is_array($value)) { + if (empty($value)) { + return 'array()'; + } + + $array = array(); + foreach ($value as $key => $val) { + $array[] = sprintf( + "%s%s => %s,", + str_repeat(' ', 4 * $level), + self::generatePhp($key), + self::generatePhp($val, $level + 1, 'id' !== $key) + ); + } + + return sprintf( + "array(\n%s\n%s)", + implode("\n", $array), + str_repeat(' ', 4 * ($level - 1)) + ); + } elseif (is_string($value)) { + return $const && defined($value) + ? $value // Constant value + : sprintf("'%s'", addcslashes($value, '\\\'')) // String (escaped '\' and "'") + ; + } else { + trigger_error("Unsupported type of \$value, in index $key."); + } + } +} diff --git a/tests/IsEmailTest.php b/tests/IsEmailTest.php index dd635ab..5f1da94 100644 --- a/tests/IsEmailTest.php +++ b/tests/IsEmailTest.php @@ -53,102 +53,9 @@ public function testEmailAddress($address, $output, $source, $comment = '') */ public function provideEmails() { - // Replace special characters (http://github.com/dominicsayers/isemail/blob/master/test/tests.php#L138) - $searchs = array(' ', mb_convert_encoding('␍␊', 'UTF-8', 'HTML-ENTITIES')); - $replace = array(' ', chr(13) . chr(10)); - for ($i = 0; $i < 32; $i++) { - // PHP bug doesn't allow us to use hex notation (http://bugs.php.net/48645) - $entity = mb_convert_encoding('&#' . (string) (9216 + $i) . ';', 'UTF-8', 'HTML-ENTITIES'); - $searchs[] = $entity; - $replace[] = chr($i); - } - - return array_values(array_reduce( - iterator_to_array(array_reduce( - array( - __DIR__ . '/tests-original.xml', - __DIR__ . '/tests.xml', - ), - function (\Traversable $iterator, $path) { - $document = new \DOMDocument(); - $document->load($path); - $document->schemaValidate(__DIR__ . '/tests.xsd'); - - $xpath = new \DOMXPath($document); - $nodes = $xpath->query('//test'); - - if ($nodes) { - $iterator->append(new \ArrayIterator(iterator_to_array($nodes))); - } - - return $iterator; - }, - new \AppendIterator() - )), - function ($tests, $node) use ($searchs, $replace) { - $test = array( - 'address' => '', - 'analysis' => array( - 'category' => '', - 'diagnosis' => '', - ), - 'comment' => '', - 'credit' => array(), - 'id' => $node->hasAttribute('id') ? $node->getAttribute('id') : '', - // For reference - 'source' => array( - 'path' => new \SplFileInfo($node->baseURI), - 'line' => $node->getLineNo(), - ), - ); - - foreach ($node->childNodes as $child) { - switch ($child->localName) { - case '': - break; - - case 'address': - case 'comment': - $test[$child->localName] = str_replace($searchs, $replace, $child->nodeValue); - break; - - case 'category': - $test['analysis'][$child->localName] = constant($child->nodeValue); - break; - - case 'diagnosis': - $test['analysis'][$child->localName][] = constant($child->nodeValue); - break; - - case 'source': - $test['credit']['name'] = (string) $child->nodeValue; - break; - - case 'sourcelink': - $test['credit']['link'] = (string) $child->nodeValue; - break; - - default: - fprintf(STDERR, "Ignoring \"%s\" attribute\n", $child->localName); - break; - } - } - - if (isset($tests[$test['address']])) { - fprintf( - STDERR, - "Ignoring duplicate test for \"%s\" on %s:%s (id=%s) (previous: %s)\n", - $test['address'], - $test['source']['path'], - $test['source']['line'], - $test['id'], - $tests[$test['address']]['source'] - ); - - return $tests; - } - - $tests[$test['address']] = array( + return array_map( + function ($test) { + return array( 'address' => $test['address'], 'output' => array( 'status' => $test['analysis']['diagnosis'], @@ -161,10 +68,8 @@ function ($tests, $node) use ($searchs, $replace) { )), 'comment' => $test['comment'], ); - - return $tests; }, - array() - )); + require(__DIR__ . '/../Resources/data/tests.php') + ); } }