freenode / Sigyn

A Limnoria plugin to fight abuse on IRC networks
Other
46 stars 31 forks source link

deduplicate code for mxbl, also look at email domain A records #54

Closed jesopo closed 3 years ago

jesopo commented 3 years ago

this uses a sorta-recursive resolve (see while to_resolve:) to flatten out and deduplicate the idea being used before, but this also would look at the A records for example.com when we see a registration for user@example.com, not just the A records for example.com's MX records. e.g.:

we used to just do user@example.com -> MX mx.example.com -> A 192.168.0.2 now we do user@example.com -> A 192.168.0.1 + MX mx.example.com -> A 192.168.0.2

jesopo commented 3 years ago

I didn't understand this:

for item in items:
    if email in item:   
        found = item

if email is gmail.com and items is ["gmail.com", "yahoo.com", "192.168.0.1"] - why are we checking is gmail.com is a substring in any of the items in items?