Re: testing email deliverability... [message #186068 is a reply to message #186065] |
Mon, 09 June 2014 23:08 |
Eli the Bearded
Messages: 22 Registered: April 2011
Karma:
|
Junior Member |
|
|
In comp.lang.php, Arno Welzel <usenet(at)arnowelzel(dot)de> wrote:
> Eli the Bearded, 2014-06-05 06:53:
>> I have NEVER seen a "syntactically valid" check that really works. The
> This one should:
> <http://www.ex-parrot.com/~pdw/Mail-RFC822-Address.html>
Did you actually read that page? Right there before the regexp is this
clear warning:
The regular expression does not cope with comments in email
addresses. The RFC allows comments to be arbitrarily nested. A
single regular expression cannot cope with this. The Perl module
pre-processes email addresses to remove comments before applying the
mail regular expression.
That particular test claims RFC822 awareness, but allows "å@å.å" which
does not pass the ASCII-ASCII-ASCII! RFC822 muster or RFC2822 muster,
even if it might be valid now depending on encoding (see RFC6532, which
first allowed non-ASCII email header values back in February 2012).
It also fails the too-rigid test: RFC822 does not allow email addresses
with a localpart that ends with a period, but periods are allowed
everywhere else in a localpart. This test enforces that rule, when real
world mailservers don't care all that much about <rfc822.@example.com>
not being RFC822 kosher.
Elijah
------
although a localpart of only periods is likely to fail
|
|
|