Skip to content
This repository was archived by the owner on May 27, 2021. It is now read-only.

Detecting Accept-All Servers #1

Open
apkrieg opened this issue Nov 3, 2016 · 9 comments
Open

Detecting Accept-All Servers #1

apkrieg opened this issue Nov 3, 2016 · 9 comments
Assignees

Comments

@apkrieg
Copy link
Contributor

apkrieg commented Nov 3, 2016

As stated in the README, this project does not include detection for accept-all servers. Here is my solution:

Have something of a cache for accept-all domains, such as:

var acceptAllCache []string

And detection would be done by creating three random UUIDs and using them as email addresses (eg. 50a90dfc-adb5-45ee-9e70-36b82bbd7c5a@yahoo.com. If the domain accepts all three UUIDs, it's pretty safe to assume it's an accept-all and the domain can be appended to the cache.

The cache would probably make processing large lists much faster because if you have a list that is 50% Yahoo emails, and yahoo.com is an accept-all, the server is only going to check the first Yahoo email on the list and then just return the accept-all signal for the rest of the Yahoo emails.

@twisted1919
Copy link
Owner

When would this check be done?
For instance, should we do a regular check and if the email is accepted and the domain not in acceptAllCache then we should do another try with the uids?
Also, why 3 retries and why uid?

@apkrieg
Copy link
Contributor Author

apkrieg commented Nov 3, 2016

Yes, if the email is accepted, run the check. Something I didn't think of though is how to mark a domain as non-accept-all so we don't have duplicate checks. This could be accomplished by changing the cache type:

var acceptAllCache map[string]bool

So in rough pseudocode:

if cache.contains(email.domain):
  if cache[email.domain]:
    return "ACCEPT-ALL"
  else:
    return (isValid(email) ? "VALID" : "NOT-VALID")
else:
  if checkAcceptAll(email.domain):
    cache[email.domain] = true
    return "ACCEPT-ALL"
  else:
    cache[email.domain] = false
    return (isValid(email) ? "VALID" : "NOT-VALID")

Three tries just to make sure, I guess it could just be one though as the odds are pretty low of it containing the first UUID (or just make it another config variable, where default=1). UUIDs because is't easy to generate with a library uuid.NewV4(), but you could just generate a long random string.

@twisted1919
Copy link
Owner

Gotcha. Well, i think this won't hurt, let's see when i can get the time to implement this.

@twisted1919 twisted1919 self-assigned this Nov 3, 2016
@apkrieg
Copy link
Contributor Author

apkrieg commented Dec 27, 2016

I think maybe Go's plugin buildmode would work great for this, as you could have modules for certain accept-all providers. Just drop the DLLs/SOs in a plugin directory and it will use them for the email provider for which they were made. This would cut back on the domain-specific code in the main project.

Just have a meta in the plugin like:

type Meta struct {
  Domains []string // the domains this works for, some providers have multiple domains that point to the same MX.
  Version string // Version of the package. This might already be a field in the plugin package? We'll have to wait and see.
}

@extremeshok
Copy link

Any updates on this ?

@apkrieg
Copy link
Contributor Author

apkrieg commented Jun 17, 2017

I haven't done much with it, I've been working on a new EVS engine that can also validate Yahoo and other addresses from catch-all domains. I think I'm just going to clean up the code for this project so it's a nice little package for someone who just needs basic validation.

@extremeshok
Copy link

Any news on the new EVS engine ?

@twisted1919
Copy link
Owner

@extremeshok - Unfortunately nowadays i really am swamped with lots of work so it's pretty hard to allocate any time to this, i am sorry for that.
You could fork it and modify it accordingly if you can't wait for me...

@twisted1919
Copy link
Owner

@extremeshok - ah, you meant the one @apkrieg mentioned...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants