Skip to content

Add dns lookup to check for email domain aliases.#97

Draft
motionless wants to merge 2 commits intophillipp:masterfrom
freeletics:domain-mx-lookup
Draft

Add dns lookup to check for email domain aliases.#97
motionless wants to merge 2 commits intophillipp:masterfrom
freeletics:domain-mx-lookup

Conversation

@motionless
Copy link
Copy Markdown

This should help to make the blacklist more valuable.

Context:
Trash mailers provide email aliases that are mapped to a different domain. Using resolv to get to the original MX record helps to catch more email addresses that coming from trash mailer.

@motionless motionless mentioned this pull request Mar 24, 2021
@cbhp
Copy link
Copy Markdown
Collaborator

cbhp commented Mar 29, 2021

Hi and thank you for your contribution. We haven't implemented DNS lookup so far because of speed loss and the big amount of queries. I have some questions:

  • What happens if the record lookup times out?
  • What's the default timeout?
  • Why is the record lookup performed always, not only if the domain is not found in the blacklist?
  • Is it possible to somehow cache the record lookups?
  • You shouldn't just take the first MX record, but the one with lowest preference value
  • You should also apply .downcase to the MX domain
  • It's more likely the main_domain is in the blacklist than the complete_domain. That's why we had the checks in that order. Is there a reason why you changed the order?

@cbhp cbhp marked this pull request as draft April 1, 2021 21:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants