syrusakbary / validate_email

Validate_email verify if an email address is valid and really exists
Other
579 stars 232 forks source link

BATV #41

Open dmaziuk opened 9 years ago

dmaziuk commented 9 years ago

validate_email.validate_email( "REDACTED", verify = True, debug = True ) DEBUG:validate_email:mailgate.urz.uni-halle.de answer: 550 - missing BATV signature

BATV: http://mipassoc.org/batv/

jonwedell commented 8 years ago

It looks like this can be resolved by modifying

smtp.mail('')

to

smtp.mail('a_valid_email@a_valid_domain.com')

on line 157.

I think that the mail server at mailgate.urz.uni-halle.de is validating the sender's e-mail before allowing the SMTP session to continue. When a valid e-mail is provided the issue is resolved.

dmaziuk commented 8 years ago

BATV draft expired in Nov. 2008, AFAICT it never made it into any of the RFCs. So basically the server reporting anything "BATV" as an error is broken.

I'd say reporting 550 as a failure is correct, but validate_email needs to return the extended status code ("missing BATV signature" ) as well so our code can check it and, in this case, ignore the failure and continue.

jonwedell commented 8 years ago

Hmm. I think the server we are having issues with is indeed broken. I've closed my pull request because the added documentation about BATV is wrong. I suspect the BATV error is actually a red herring.

That being said, I think the actual issue with this server is that it is performing callback verification since there is a delay after the smtp.mail() command during which I believe the server is performing the callback. It's at this step that if a valid sending email is not provided that the server gives the misleading ''missing BATV signature'' message.

My question is twofold:

  1. How common are servers implementing callback verification?
  2. Is it worth it for this module to provide the option to specify a sending address such that email verification will work on those servers? I see that the use of callback verification is discouraged, but giving the option of specifying a valid sending address in order to pass it is not a significant annoyance - at least in our use case - and doesn't require changing the default operation of the validate_email method.