-
-
Notifications
You must be signed in to change notification settings - Fork 211
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Should domains with "void.blackhole.mx." be considered valid ? #384
Comments
diff --git a/app/Validator/DNSCheckValidation.php b/app/Validator/DNSCheckValidation.php
index a94f30fd8..a3f181a12 100644
--- a/app/Validator/DNSCheckValidation.php
+++ b/app/Validator/DNSCheckValidation.php
@@ -39,6 +39,18 @@ class DNSCheckValidation implements EmailValidation
'lan',
];
+ /**
+ * @see https://bornoe.org/blog/2016/05/fighting-spam-with-fake-mx-records/
+ */
+ public const INVALID_MX_VALUES = [
+ 'tar.junkemailfilter.com',
+ 'mx.fakemx.net',
+ 'in.verboten.net',
+ 'void.blackhole.mx',
+ // "Null MX" record indicates the domain accepts no mail (https://tools.ietf.org/html/rfc7505)
+ '.',
+ ];
+
public const GOOD_DOMAINS = [
'free.fr',
'sfr.fr',
@@ -651,7 +663,7 @@ class DNSCheckValidation implements EmailValidation
}
// "Null MX" record indicates the domain accepts no mail (https://tools.ietf.org/html/rfc7505)
- if (empty($dnsRecord['target']) || $dnsRecord['target'] === '.') {
+ if (empty($dnsRecord['target']) || in_array($dnsRecord['target'], self::INVALID_MX_VALUES)) {
$this->error = new InvalidEmail(new DomainAcceptsNoMail(), "");
return false;
} |
Hi @williamdes Given the above and answering your question, the domain is syntactically valid. A different matter is if you want to filter out some domains based on other rules. In case you want to add these rules to the validation process of the validator, you always can by implementing the interface. |
Hi @egulias Would you then accept to integrate into this repo validators for:
There is currently no repo or google search else than the blog post linked above that lists such services. GitHub code search did find nothing. /cc @smeinecke |
https://bornoe.org/blog/2016/05/fighting-spam-with-fake-mx-records/
Example domain:
wdes.ru
The text was updated successfully, but these errors were encountered: