spam_email
spam_email copied to clipboard
Add dns lookup to check for email domain aliases.
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.
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?