If you're building a SaaS product or any online service with user registration, you've likely encountered the challenge of disposable email addresses. These temporary emails can significantly impact your service quality and user metrics. In this comprehensive guide, we'll explore the best GitHub repositories for managing disposable email domains and discuss effective solutions to protect your service.
Update 2025-03-26: We've launched a new tool at veille.io/toolbox/compare-disposable-email-blocklists that lets you compare different disposable email blocklists in real-time. You can check any email address or domain against multiple popular GitHub lists to see which ones detect it as disposable.
Why should you block disposable emails?
Disposable email addresses pose several challenges for online services:
- They enable spam and fraudulent account creation
- They distort your user engagement metrics
- They can lead to abuse of free trials and promotions
- They make it difficult to maintain meaningful user communication
Even implementing a basic blocklist from public GitHub repositories can significantly reduce these issues.
Top GitHub repositories for disposable email domains
1. Disposable-Email-Domains/Disposable-Email-Domains
- Repository: github.com/disposable-email-domains/disposable-email-domains
- Domains: ~4,000
- Update frequency: Weekly/Monthly
This repository stands out for its rigorous validation process and community maintenance. Each domain addition requires screenshot evidence, ensuring high accuracy and minimal false positives.
Pros:
- Carefully vetted domains
- Strong community maintenance
- Reliable accuracy
- Low false positive rate
Cons:
- Less frequent updates
- Smaller domain coverage
- Conservative addition process
2. Disposable/Disposable
- Repository: github.com/disposable/disposable
- Domains: ~100,000
- Update frequency: Daily
This repository aggregates multiple lists and actively scrapes disposable email providers, offering the most comprehensive coverage available.
Pros:
- Extensive domain coverage
- Daily updates
- Automated aggregation
Cons:
- Higher false positive rate
- Includes inactive domains
- No direct contribution process
3. 7c/Fakefilter
- Repository: github.com/7c/fakefilter
- Domains: ~5,000
- Update frequency: Daily
An automated solution that continuously monitors known disposable email providers.
Pros:
- Automated updates
- Traceable domain sources
- Regular maintenance
Cons:
- Limited domain coverage
- No community contributions
- May miss newer services
Implementation guide
Here's a simple Python implementation to check emails against these blocklists:
import requests from typing import Optional class DisposableEmailChecker: def __init__(self): self.blocklist_url = "https://raw.githubusercontent.com/disposable-email-domains/disposable-email-domains/main/disposable_email_blocklist.conf" self.domains: Optional[set] = None def load_blocklist(self) -> None: """Load the blocklist from GitHub""" response = requests.get(self.blocklist_url) self.domains = set(response.text.splitlines()) def is_disposable(self, email: str) -> bool: """Check if an email uses a disposable domain""" if not self.domains: self.load_blocklist() domain = email.split('@')[-1].lower() return domain in self.domains # Usage example checker = DisposableEmailChecker() email = "test@example.com" if checker.is_disposable(email): print(f"Warning: {email} appears to be disposable") else: print(f"OK: {email} looks legitimate")
Best practices for implementation
- Cache the blocklist
- Store the list locally and update periodically
- Implement a TTL (Time To Live) for cached data
- Use a background job for updates
- Monitor false positives
- Keep logs of blocked emails
- Implement a whitelist for legitimate domains
- Create an appeal process for blocked users
- Combine multiple sources
- Aggregate multiple blocklists
- Implement weighted scoring
- Consider using API services for critical applications