onesiphore / php-smtp-email-validation

Automatically exported from code.google.com/p/php-smtp-email-validation
0 stars 0 forks source link

4xx temporary errors result in failed validation #1

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
While testing the php-smtp-email-validation r3 against a random set of
email addresses from a large collection i found some problems with 4xx
error code handling. Graylisting and overloaded SMTP servers seem to be the
top troublemaker for reliable validation.

These example SMTP status codes resulted in validation errors, even tough
the email address might exist: 

451 Greylisted.  Please try again in 4 minutes.

421 mail.domain.com: Too many concurrent SMTP connections; please try again
later.

450 <some-email@domain.com>: Recipient address rejected: Greylisted, please
try again later!

Most of the time this isn't a problem, but relying on smtp validation
before accepting email addresses might not work for everybody.

Original issue reported on code.google.com by dawol...@gmail.com on 10 Dec 2008 at 12:30

GoogleCodeExporter commented 8 years ago
After some more investigation:

The 451 error code was returned by the SMTP as reply to my MAIL FROM command 
and this
reply is not handled by r3. The code after issuing RCPT TO was a 503, therefore
resulting in a failed validation.

The 421 error is not handled by r3. Actually only 451 and 452 errors pass 
validation,
but only if they are returned after the RCPT TO command. Thats the reason why 
the 450
graylisting reported above fails validation.

So my suggestion would be to treat all 4xx return codes, also those returned 
right
after MAIL FROM to pass validation.

Original comment by dawol...@gmail.com on 10 Dec 2008 at 1:09

GoogleCodeExporter commented 8 years ago
This should maybe be made optional by a config variable.
As well as currently unreachable servers, which are treated by MTAs as temporary
errors as well, which still don't invalidate the e-mail address

Original comment by pjocksnk@gmail.com on 29 Oct 2009 at 2:04