mirror of https://github.com/M66B/FairEmail.git
Block parent domain
This commit is contained in:
parent
fc1637bc59
commit
4eac1f60eb
|
@ -1339,6 +1339,9 @@ public class EntityRule {
|
|||
if (block_domain) {
|
||||
String domain = UriHelper.getEmailDomain(sender);
|
||||
if (!TextUtils.isEmpty(domain) && !domains.contains(domain)) {
|
||||
String parent = UriHelper.getParentDomain(context, domain);
|
||||
if (parent != null)
|
||||
domain = parent;
|
||||
domains.add(domain);
|
||||
regex = true;
|
||||
sender = ".*@.*" + Pattern.quote(domain) + ".*";
|
||||
|
|
|
@ -344,6 +344,9 @@ public class FragmentDialogJunk extends FragmentDialogBase {
|
|||
String domain = UriHelper.getEmailDomain(email);
|
||||
if (TextUtils.isEmpty(domain) || domains.contains(domain))
|
||||
continue;
|
||||
String parent = UriHelper.getParentDomain(context, domain);
|
||||
if (parent != null)
|
||||
domain = parent;
|
||||
|
||||
domains.add(domain);
|
||||
|
||||
|
|
Loading…
Reference in New Issue