svilen

svilen

Author of Concurrent Data Processing in Elixir

EmailGuard — library for detecting disposable or personal email addresses

EmailGuard is a simple utility library for detecting disposable (burner) or personal email addresses. Comes with two big data sets ready to use:

  • DisposableList (source) containing 3846 domains of temporary email providers and is the default list to use if no params are provided;
  • FreeList (source) containing 5072 domains of free email providers (with domains already in disposable data set removed)

Example usage:

iex> EmailGuard.check("svilen@gmail.com")
:ok 

iex> EmailGuard.check("svilen@mailinator.com")
{:error, "EmailGuard.DisposableList"}

iex> alias EmailGuard.{DisposableList, FreeList}

iex> EmailGuard.check("svilen@gmail.com", [DisposableList, FreeList])
{:error, "EmailGuard.FreeList"}

Hope it’s useful :v:

For more info:

Most Liked

gon782

gon782

I can’t help but think this is a bit user hostile if action is taken based on it, if it’s not one point in a total risk assessment or something.

gon782

gon782

That’s an incredibly off-base analogy. An e-mail address isn’t a payment form and receiving spam from a company that for no reason wants your e-mail isn’t the same as trading money for a product. I’m sorry if I offended anyone who uses this mildly dark pattern and wants to rationalize it, but you’re definitely moving towards user hostility in doing so, unless you can prove value to your users and show that value as an imperative to using a real e-mail address.

idi527

idi527

The lookup process seems a bit inefficient, I would pattern match on function heads instead.

for bad_domain <- File.stream!("bad_domains") do
  def lookup(unquote(bad_domain)), do: "EmailGuard.BadDomainList"
end

def lookup(_unmatched), do: nil

def check(email) do
  domain = extract_domain(email)
  if resp = lookup(domain) do
    {:error, resp}
  else
    :ok 
  end 
end
idi527

idi527

svilen

svilen

Author of Concurrent Data Processing in Elixir

Published 1.1.0 with significant performance improvements, thanks to @idi527 :tada:

See CHANGELOG.md for more info.

Where Next?

Popular in Libraries Top

wmnnd
Hi there, for my project DBLSQD, I needed a file storage solution that is a bit more flexible than Arc. Because I thought others might f...
New
arkgil
Hi all! I’m happy to announce that Telemetry v0.3.0 is out! This release marks the conversion from Elixir to Erlang so that all the libr...
New
kip
Image is an image processing library for Elixir. It is based upon the fabulous vix library that provides a libvips wrapper for Elixir. I...
574 16576 179
New
asiniy
Hey there! I wrote a download elixir package which does exactly what its name about - an easy way to download files. I saw solutions ...
New
nikokozak
Hello all, I’ve been working on Svonix - a library for quickly integrating Svelte components into Phoenix views. It’s a much-needed succ...
New
josevalim
EDIT: since Ecto 3.0 final version is out, this post was amended to use the final versions in the instructions below. Hi everyone, We a...
New
tmbb
I’ve published the first version of my Makeup library. It’s a syntax highlighter for Elixir in the spirit of Pygments, Currently it highl...
New
mbuhot
EctoJob A transactional job queue built with Ecto, PostgreSQL and GenStage Available on Hex.pm: ecto_job | Hex Docs: API Reference — ec...
New
mischov
import Meeseeks.CSS html = HTTPoison.get!("https://news.ycombinator.com/").body for story &lt;- Meeseeks.all(html, css("tr.athing")) do...
New
ostinelli
Let’s write a database! Well not really, but I think it’s a little sad that there doesn’t seem to be a simple in-memory distributed KV da...
New

Other popular topics Top

Patoshizzle
After calling mix ecto.create I get this error: 17:00:32.162 [error] GenServer #PID&lt;0.412.0&gt; terminating ** (Postgrex.Error) FATAL...
New
vrod
I am using the Starship cross-shell prompt – it seems pretty nice, but I get some errors: [WARN] - (starship::utils): Executing command ...
New
Tee
can someone please explain to me how Enum.reduce works with maps
New
gshaw
What is the idiomatic way of matching for not nil in Elixir? E.g., First way: defp halt_if_not_signed_in(conn, signed_in_account) when...
New
quazar
How to set Jason to encode all fields in ecto schema, I don’t care about security and implementing only is taking long list of attributes...
New
sacepums
Hey guys. I'm new to elixir and im really stocked about it. But I ran into a bit of problem - I need to convert a date sting, for examp...
New
ashish173
I am using Ecto timestamps with postgres, I can see the timestamps() use the :naive_dateime but for my use case I wanted to store the ti...
New
alice
Hey, Just curious what are the main benefits of Elixir compared to Clojure? When is Elixir more useful than Clojure and vice versa? Th...
New
vonH
When I run the Plug and I recompile I wind up having to use Ctrl C to quit iex and start again. Witht the help of rlwrap I can use the cu...
New
WestKeys
Currently suffering from paralysis by [HTTP client] analysis. This is rather unusual in Elixirland as there tends to be consensus on the ...
New

Sub Categories:

We're in Beta

About us Mission Statement