MailChecker

Cross-language disposable email detector backed by a 55,000+ domain blocklist

Library
npm
v6.0.21
1,908 stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum. How we score it →
75 /100 Good
Development Activity 84
Maintenance 40
Community 76
Maturity 60
Momentum 40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation. How we score it →
71 /100 Good
Architecture 70
Code Quality 62
Innovation 65
Learning Curve 85

MailChecker is a zero-dependency, cross-language library for catching temporary and disposable email addresses at signup. It pairs strict RFC-grounded regex validation with a bundled blocklist of over 55,000 known throwaway domains (yopmail-style services, spam-box providers, and similar), so an address can fail either on malformed syntax or on belonging to a domain nobody wants receiving real communication.

The same domain list and validation logic are code-generated from a single template pipeline into native implementations for Node.js, browser JavaScript, PHP, Python, Ruby, Rust, Go, Elixir, and Clojure, so teams standardize on one blocklist across a polyglot stack instead of maintaining separate disposable-email logic per service.

What You Get

  • A single isValid(email) function returning a boolean — strict regex format check plus disposable-domain blocklist check in one call
  • A bundled, regularly-updated blocklist of 55,000+ disposable/throwaway email domains, checked against the target domain and all of its parent domains
  • addCustomDomains(domains) to extend the built-in blocklist at runtime with an organization’s own denylist
  • blacklist() to inspect the full in-memory Set of blocked domains directly
  • Native, functionally-equivalent implementations for Node.js, browser JavaScript, PHP, Python, Ruby, Rust, Go, Elixir, and Clojure generated from one shared template and domain list
  • Bundled TypeScript type declarations (types.d.ts) for the Node/JS API
  • Zero runtime dependencies in the Node package

Common Use Cases

  • Rejecting disposable-email signups at registration time before an account or trial is provisioned
  • Gatekeeping newsletter and lead-capture forms to keep list quality high and avoid paying for throwaway contacts
  • Pre-validating email addresses server-side before triggering a transactional verification email, to cut wasted sends
  • Enforcing one shared disposable-domain policy across services written in different languages (a Node API and a Python worker, for example) via the same generated blocklist
  • Layering into fraud/abuse prevention alongside rate limiting, to raise the cost of creating throwaway accounts for spam or abuse

Under The Hood

Architecture MailChecker’s core logic is deliberately tiny: the Node build (platform/node/index.js) is a generated file wrapping a hardcoded Set of domains and a single unanchored regex literal, exposing isValid, blacklist, and addCustomDomains. isValid lowercases the input, tests it against the regex, then walks the domain right-to-left through isBlacklisted — checking example.com, then com, so subdomains of blocked domains are caught without needing every subdomain listed explicitly. The nine per-language implementations under platform/* are not hand-maintained separately; gen.js drives lib/generator.js, which globs every *.tmpl.* file, injects the shared domain list (list.txt, loaded via lib/loader.js) and regex string through Mustache (mu2), and writes out each language’s native file, guaranteeing the blocklist and validation semantics stay identical across bindings.

Tech Stack The Node/browser runtime artifact has zero dependencies — dependencies: {} in package.json — keeping it safe to drop into any signup path. The build/dev tooling (glob, async, lodash, mu2/eventemitter2, mocha/should) lives entirely in devDependencies and never ships to consumers. Other language platforms carry their own idiomatic toolchains (Cargo for Rust, go.mod for Go, a gemspec for Ruby, setup.py for Python), each generated from the same list.txt source of truth rather than duplicating it by hand.

Code Quality test/platform.node.test.js exercises the public API with Mocha/should: format validity/invalidity (including whitespace and newline edge cases), disposable-domain rejection across a random 2,000-domain sample of the real blocklist, subdomain matching, and the addCustomDomains runtime-extension path. Every other language binding has its own parallel test file (platform.python.test.py, platform.ruby.test.rb, platform.go, etc.), run via Docker in CI so behavior parity across nine languages is actually enforced rather than assumed. The generator itself has coverage too (test/generator.test.js, test/loader.test.js). The main risk surface is the 56,000-line list.txt data file, which is community-curated and reviewed by PR rather than programmatically validated for staleness.

API Design The public surface is deliberately minimal — isValid(email), blacklist(), addCustomDomains(domains) — with consistent naming translated idiomatically per language (isValid/is_valid/valid?). Bundled types.d.ts gives TypeScript consumers full autocomplete with no @types package needed. There’s effectively no boilerplate: install, require, call isValid(). The tradeoff for that simplicity is a fairly blunt API — no async variant, no way to query which specific rule (regex vs. blocklist) failed, and extending the blocklist is additive-only within a process, not persisted.

Used by 5 apps in this directory

TypeScript
92%
AGPL 3.0

Documenso

Digital Signiture

15,224

Self-hosted, open-source DocuSign alternative with legally binding PDF signatures, multi-party workflows, and a full REST and tRPC API.

View details
93
Repo Health
79
Technical
68
Dependency
Built with
TypeScript 92%
Updated 5 days ago
Java
58%
Apache 2.0

Kestra

Automation · Data Engineering · Devops

28,388

Event-driven orchestration platform for data, AI, and infrastructure workflows — define everything in YAML, run anywhere at scale.

View details
93
Repo Health
81
Technical
72
Dependency
Built with
Java 58%
TypeScript 26%
Vue 15%
Updated 1 weeks ago
Python
51%
AGPL 3.0

LearnHouse

CMS · Learning Management

2,301

Open-source LMS with AI tutoring, real-time collaboration boards, live code execution, and built-in course monetization — self-hosted in minutes.

View details
90
Repo Health
77
Technical
66
Dependency
Built with
Python 51%
TypeScript 48%
Updated 6 days ago
TypeScript
65%
Other

Typebot

AI Assistants · AI Development · Developer Tools

10,375

Build sophisticated chatbots visually, embed them anywhere without iframes, and own your data — fully self-hostable with a modular block system and 30+ integrations.

View details
93
Repo Health
82
Technical
65
Dependency
Built with
TypeScript 65%
MDX 34%
Updated 1 weeks ago
TypeScript
51%
Other

World Monitor

Analytics · Monitoring

87,476

Real-time global intelligence dashboard that fuses AI-synthesized news, geopolitical risk scoring, and infrastructure tracking into one open-source situational awareness platform.

View details
87
Repo Health
89
Technical
68
Dependency
Built with
TypeScript 51%
JavaScript 47%
Updated 5 days ago

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers