dimanche 23 août 2020

Need help on adding feature(Support STARTTLS) to py3-validate-email

https://github.com/karolyi/py3-validate-email/issues/19

I want to work on this pull request, but the last comment says:

any host that will be probed might or might not support STARTTLS. the protocol being negotiated is completely different from the DNS records resolving.

I need more context understanding of this comment and how can I add this feature to the existing codebase.

How should I approach it so it doesn't conflict with the rest of the parts and users can choose to enable/disable the STARTTLS?

I thought of the following approach:

  • Check MX records for the specified host (contradicts with the last comment on issue)
  • If the host has at least one valid MX record then I will check further if it supports upgrade to STARTTLS
  • If the host supports STARTTLS then the rest of the transactions will be carried out after initiating starttls from smtplib and fallback to unencrypted transaction if it fails.

any help will be appreciated.

Aucun commentaire:

Enregistrer un commentaire