a list of disposable email domains
This repo contains a list of disposable and temporary email address domains often used to register dummy users in order to spam or abuse some services.
We cannot guarantee all of these can still be considered disposable but we do basic checking so chances are they were disposable at one point in time.
One of the most impactful mechanisms we currently have is prohibiting known "throw-away" email domains from creating accounts on the index. We currently use the
disposable-email-domainslist as well as our own internal list to block registration with -or association of - such domains for PyPI accounts.
-- Ee Durbin, PyPI Admin, Director of Infrastructure (PSF) link
Feel free to create PR with additions or request removal of some domain (with reasons).
Specifically, please provide a screenshot in your PR of a page where one can generate a disposable email address which uses that domain.
Add new disposable domains directly into disposable_email_blocklist.conf in the same format (only second level domains on new line without @, unless they use public suffix, in which case include the 3rd level domain), then run:
# Create and activate a virtual environment (recommended)
python -m venv .venv
source .venv/bin/activate
# Install dependencies
pip install -r requirements.txt
# Validate and auto-fix the blocklist
python verify.py --fix
This will automatically fix formatting issues (lowercase, sorting, duplicates) and validate against public suffix rules. The older maintain.sh script is deprecated — it only does basic lowercase/sort/uniq without PSL validation.
1/9/25 Enabled GitHub sponsorhip for this work. Everybody can do it, but currently only one person does it. Send them $2 for a coffee if you care.
2/11/21 We created a github org account and transferred the repository to it.
4/18/19 @di joined as a core maintainer of this project. Thank you!
7/31/17 @deguif joined as a core maintainer of this project. Thanks!
12/6/16 - Available as PyPI module thanks to @di
7/27/16 - Converted all domains to the second level. This means that starting from this commit the implementers should take care of matching the second level domain names properly i.e. @xxx.yyy.zzz should match yyy.zzz in blocklist where zzz is a public suffix. More info in #46
9/2/14 - First commit 393c21f5
TOC: Python, PHP, Go, Ruby, NodeJS, C#, bash, Java, Kotlin, Swift, Elixir
with open('disposable_email_blocklist.conf') as blocklist:
blocklist_content = {line.rstrip() for line in blocklist.readlines()}
domain_parts = email.partition('@')[2].split(".")
for i in range(len(domain_parts) - 1):
if ".".join(domain_parts[i:]) in blocklist_content:
message = "Please enter your permanent email address."
return (False, message)
return True
Available as PyPI module thanks to @di
>>> from disposable_email_domains import blocklist
>>> 'bearsarefuzzy.com' in blocklist
True
…
Alternatively check out Composer package https://github.com/elliotjreed/disposable-emails-filter-php.
import ("bufio"; "os"; "strings";)
var disposableList = make(map[string]struct{}, 3500)
func init() {
f, _ := os.Open("disposable_email_blocklist.conf")
for scanner := bufio.NewScanner(f); scanner.Scan(); {
disposableList[scanner.Text()] = struct{}{}
}
f.Close()
}
func isDisposableEmail(email string) (disposable bool) {
domain_parts := strings.Split(strings.Split(email, "@")[1], ".")
for i := 0; i < len(domain_parts)-1; i++ {
if _, ok := disposableList[strings.Join(domain_parts[i:], ".")]; ok {
return true
}
}
return false
}
Alternatively check out Go package https://github.com/rocketlaunchr/anti-disposable-email.
BLOCKLIST_CONTENT = File.readlines('disposable_email_blocklist.conf', chomp: true).to_set.freeze
def disposable_email?(email)
domain_parts = email.split('@')[1].split('.')
(0...domain_parts.length - 1).each do |i|
if BLOCKLIST_CONTENT.include?(domain_parts[i..-1].join('.'))
return true
end
end
false
end
const { readFileSync } = require("fs");
const blocklistContent = new Set(
readFileSync("disposable_email_blocklist.conf", "utf-8")
.split("\r\n")
.map((line) => line.trim())
.slice(0, -1)
);
function isPermanentEmail(email) {
const domainParts = email.split("@")[1].split(".");
for (let i = 0; i < domainParts.length - 1; i++) {
if (blocklistContent.has(domainParts.slice(i).join("."))) {
const message = "Please enter your permanent email address.";
return [false, message];
}
}
return [true];
}
Alternatively check out NPM packages https://github.com/mziyut/disposable-email-domains-js (updated weekly) and https://www.npmjs.com/package/fakeout (updated daily).
private static readonly Lazy<HashSet<string>> _emailBlockList = new Lazy<HashSet<string>>(() =>
{
var lines = File.ReadLines("disposable_email_blocklist.conf")
.Where(line => !string.IsNullOrWhiteSpace(line) && !line.TrimStart().StartsWith("//"));
return new HashSet<string>(lines, StringComparer.OrdinalIgnoreCase);
});
private static bool IsBlocklisted(string domain) => _emailBlockList.Value.Contains(domain);
...
var addr = new MailAddress(email);
if (IsBlocklisted(addr.Host)))
throw new ApplicationException("Email is blocklisted.");
…
Code assumes that you have added disposable_email_blocklist.conf next to your class as classpath resource.
…
contributed by @nillpoe
…
contributed by @1998code
…
defmodule MyApp.Email do
@blocklist File.read!("priv/disposable_email_blocklist.conf")
|> String.split("\n", trim: true)
|> MapSet.new()
def disposable?(email) do
case String.split(email, "@") do
[_, domain] ->
domain_parts = String.split(domain, ".")
length = length(domain_parts)
Enum.any?(0..(length - 1), fn i ->
suffix = Enum.slice(domain_parts, i..-1//1) |> Enum.join(".")
MapSet.member?(@blocklist, suffix)
end)
_ ->
false
end
end
end
Alternatively check out Elixir package https://github.com/oshanz/disposable-email.
No open issues yet, or sync has not completed.