Detect disposable / temporary email addresses, and distinguish them from legitimate forwarding aliases (EmailAlias.io, SimpleLogin, addy.io, DuckDuckGo, Firefox Relay, Apple Hide My Email).
Project description
disposable-email-detector
Detect disposable / temporary email addresses, and tell them apart from legitimate forwarding aliases like EmailAlias.io, SimpleLogin, addy.io, DuckDuckGo Email Protection, Firefox Relay, and Sign in with Apple's Hide My Email.
Most disposable-email blocklists treat every "unusual" email domain the same. This one separates two distinct categories:
| Category | Example | Action |
|---|---|---|
| Disposable — mailbox expires, abandoned by design | foo@mailinator.com, bar@10minutemail.com |
Block at signup |
| Forwarding alias — permanent address, forwards to a real inbox the user controls | user@emailalias.io, u@sl.email, foo@duck.com |
Do NOT block — this is a real customer using privacy tooling |
| OK — unknown / probably legit mailbox | jane@gmail.com |
Allow |
Try the hosted checker at emailalias.io/tools/disposable-email-checker.
Install
pip install disposable-email-detector
Python 3.9+. No runtime dependencies.
Usage
from disposable_email_detector import check, is_disposable, is_forwarding_alias
is_disposable("foo@mailinator.com") # True
is_disposable("user@emailalias.io") # False — it's a forwarding alias
is_forwarding_alias("user@emailalias.io") # True
check("user@emailalias.io")
# {
# "verdict": "forwarding_alias",
# "provider": "EmailAlias.io",
# "reason": "Address is a forwarding alias … Do NOT treat as disposable.",
# "email": "user@emailalias.io",
# "domain": "emailalias.io",
# "local": "user"
# }
check() returns one of: "disposable" | "forwarding_alias" | "suspicious" | "ok" | "invalid".
What gets detected
- Disposable domain list (~74,000 providers — Mailinator, 10MinuteMail, GuerrillaMail, YOPmail, Temp-Mail, and the long tail of obscure throwaway services). Synced weekly from upstream MIT-licensed community lists.
- Personally-observed list — domains seen directly in EmailAlias.io abuse logs, with provenance notes (Cloudflare Email Routing MX, NameSilo mail-only, etc.). Survives every upstream refresh.
- Forwarding-alias provider list — used to flip the verdict from
disposabletoforwarding_aliasand tell the integrator who NOT to block. - Heuristics on the local part and TLD:
- Suspicious TLDs:
.tk,.ml,.ga,.cf,.gq - Local part looks randomly generated
- Local part starts with a throwaway keyword (
temp,throw,trash,spam,junk, …)
- Suspicious TLDs:
Two or more heuristic hits flips the verdict to suspicious. One hit alone is left at ok — single signals are too noisy on real addresses.
Why split disposable from forwarding alias?
Mail to a Mailinator address lands in a public inbox that anyone can read. Mail to a DuckDuckGo or EmailAlias.io address forwards to the user's real inbox. Site owners blocking both end up rejecting privacy-conscious customers — exactly the audience least likely to come back. Splitting the verdict lets you block disposable and allow forwarding_alias with one library.
License
MIT. Source and bug reports: github.com/emailalias/disposable-email-detector. The JavaScript/TypeScript sibling package is at @emailalias/disposable-email-detector on npm.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file disposable_email_detector-0.1.2-py3-none-any.whl.
File metadata
- Download URL: disposable_email_detector-0.1.2-py3-none-any.whl
- Upload date:
- Size: 440.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
41f23a988d099af22bd23b72c379e0bf864786d42330b5244b964d35f0dff2e4
|
|
| MD5 |
ff54e00e60215c145eaf05cd023d60b2
|
|
| BLAKE2b-256 |
b51142b36a7282544d908dcd0e1ba3afcadcacceea531b65b2f175163482644c
|
Provenance
The following attestation bundles were made for disposable_email_detector-0.1.2-py3-none-any.whl:
Publisher:
publish.yml on emailalias/disposable-email-detector
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
disposable_email_detector-0.1.2-py3-none-any.whl -
Subject digest:
41f23a988d099af22bd23b72c379e0bf864786d42330b5244b964d35f0dff2e4 - Sigstore transparency entry: 1849082878
- Sigstore integration time:
-
Permalink:
emailalias/disposable-email-detector@0a9fb831254f09bb4fb3acee381493bc6389c9bb -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/emailalias
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@0a9fb831254f09bb4fb3acee381493bc6389c9bb -
Trigger Event:
push
-
Statement type: