Skip to content

Commit

Permalink
Merge pull request #237 from miry/undisposable-net-ua
Browse files Browse the repository at this point in the history
Remove net.ua from disposable email domains
  • Loading branch information
micke authored Jul 11, 2024
2 parents 3608502 + a8e2cce commit be3c9a9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
1 change: 0 additions & 1 deletion config/disposable_email_domains.txt
Original file line number Diff line number Diff line change
Expand Up @@ -103329,7 +103329,6 @@ net-piyango.biz
net-privichkam.ru
net-solution.info
net.ee
net.ua
net100limite.ml
net191.com
net1mail.com
Expand Down
9 changes: 5 additions & 4 deletions pull_mailchecker_emails.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
require "json"
require "net/http"

whitelisted_emails = %w(
whitelisted_emails = %w[
onet.pl poczta.onet.pl fastmail.fm hushmail.com
hush.ai hush.com hushmail.me naver.com qq.com example.com
yandex.net gmx.com gmx.es webdesignspecialist.com.au vp.com
Expand All @@ -15,13 +15,14 @@
passinbox.com passfwd.com passmail.com passmail.net
duck.com mozmail.com dralias.com 8alias.com 8shield.net
mailinblack.com anonaddy.com anonaddy.me addy.io privaterelay.appleid.com appleid.com
)
net.ua
]

existing_emails = File.open("config/disposable_email_domains.txt") { |f| f.read.split("\n") }

remote_emails = [
"https://raw.githubusercontent.com/FGRibreau/mailchecker/master/list.txt",
"https://raw.githubusercontent.com/disposable/disposable-email-domains/master/domains.txt",
"https://raw.githubusercontent.com/disposable/disposable-email-domains/master/domains.txt"
].flat_map do |url|
resp = Net::HTTP.get_response(URI.parse(url))

Expand All @@ -30,4 +31,4 @@

result_emails = (existing_emails + remote_emails).map(&:strip).uniq.sort - whitelisted_emails

File.open("config/disposable_email_domains.txt", "w") { |f| f.write result_emails.join("\n") }
File.write("config/disposable_email_domains.txt", result_emails.join("\n"))

0 comments on commit be3c9a9

Please sign in to comment.