# disposable-email-domains: The Essential Blocklist for Temporary Email Domains

This repository profile is provided by osrepos.com, an open source repository discovery platform.

Source: osrepos.com
Repository profile: https://osrepos.com/repo/disposable-email-domains-disposable-email-domains
Generated for open source discovery and AI-assisted research.

The `disposable-email-domains` repository provides a crucial list of temporary and disposable email domains, widely used to prevent spam and abuse on online services. This comprehensive blocklist helps developers and administrators identify and block registrations from throw-away email addresses. Notably, it is utilized by PyPI to maintain the integrity of its user base, making it a highly reliable resource for enhancing platform security.

GitHub: https://github.com/disposable-email-domains/disposable-email-domains
OSRepos URL: https://osrepos.com/repo/disposable-email-domains-disposable-email-domains

## Summary

The `disposable-email-domains` repository provides a crucial list of temporary and disposable email domains, widely used to prevent spam and abuse on online services. This comprehensive blocklist helps developers and administrators identify and block registrations from throw-away email addresses. Notably, it is utilized by PyPI to maintain the integrity of its user base, making it a highly reliable resource for enhancing platform security.

## Topics

- disposable
- email
- blocklist
- filter
- Python
- pypi
- security
- anti-spam

## Repository Information

Last analyzed by OSRepos: Sun Oct 12 2025 13:16:30 GMT+0100 (Western European Summer Time)
Detail views: 5
GitHub clicks: 12

## Safety Notice

OSRepos shares public repositories for knowledge and discovery only. Review source code, dependencies, licenses, and security implications before running or installing anything.

## Content

## Introduction

The `disposable-email-domains` GitHub repository offers a vital resource: a meticulously maintained list of disposable and temporary email address domains. These domains are frequently exploited for creating dummy user accounts, facilitating spam, or abusing online services. By integrating this blocklist, developers can significantly enhance the security and integrity of their platforms, preventing fraudulent registrations and mitigating potential abuse.

A testament to its reliability, this list is actively used by PyPI, the Python Package Index, to block registrations from known throw-away email domains. The repository also includes an `allowlist.conf` file, which gathers email domains that might be mistakenly identified as disposable but are, in fact, legitimate.

## Installation

Integrating the `disposable-email-domains` blocklist into your project is straightforward. You can directly download the `disposable_email_blocklist.conf` file from the [GitHub repository](https://github.com/disposable-email-domains/disposable-email-domains/blob/main/disposable_email_blocklist.conf "disposable_email_blocklist.conf on GitHub" target="_blank").

For Python developers, a convenient PyPI module is available, simplifying integration:

bash
pip install disposable-email-domains


## Examples

The repository provides examples for integrating the blocklist across various programming languages. Here are a few common implementations:

### Python

Using the PyPI module:

python
from disposable_email_domains import blocklist

email_domain = 'bearsarefuzzy.com'
if email_domain in blocklist:
    print(f"'{email_domain}' is a disposable email domain.")
else:
    print(f"'{email_domain}' is not a disposable email domain.")


### PHP

php
function isDisposableEmail($email, $blocklist_path = null) {
    if (!$blocklist_path) $blocklist_path = __DIR__ . '/disposable_email_blocklist.conf';
    $disposable_domains = file($blocklist_path, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);
    $domain = mb_strtolower(explode('@', trim($email))[1]);
    return in_array($domain, $disposable_domains);
}

// Example usage:
// if (isDisposableEmail("test@example.com")) { /* ... */ }


### Go

go
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) {
    segs := strings.Split(email, "@")
    _, disposable = disposableList[strings.ToLower(segs[len(segs)-1])]
    return
}

// Example usage:
// if isDisposableEmail("test@example.com") { /* ... */ }


### Node.js

javascript
import { readFile } from 'node:fs/promises'

let blocklist

async function isDisposable(email) {
  if (!blocklist) {
    const content = await readFile('disposable_email_blocklist.conf', { encoding: 'utf-8' })
    blocklist = content.split('\r\n').slice(0, -1)
  }
  return blocklist.includes(email.split('@')[1])
}

// Example usage:
// isDisposable("test@example.com").then(result => console.log(result));


## Why Use It?

Utilizing the `disposable-email-domains` blocklist is a proactive measure for any online service or application that requires user registration. By preventing registrations from temporary email addresses, you can:

*   **Combat Spam and Abuse:** Significantly reduce the influx of spam accounts and deter users attempting to bypass restrictions or abuse services.
*   **Improve Data Quality:** Ensure that your user base consists of legitimate individuals with permanent contact information, leading to more reliable user data.
*   **Enhance Security:** Add a layer of defense against various forms of online fraud and malicious activities often associated with throw-away email accounts.
*   **Reduce Operational Costs:** Minimize the resources spent on moderating and cleaning up fake accounts or dealing with issues stemming from temporary registrations.

## Links

*   **GitHub Repository:** [disposable-email-domains](https://github.com/disposable-email-domains/disposable-email-domains "disposable-email-domains on GitHub" target="_blank")
*   **PyPI Project:** [disposable-email-domains](https://pypi.org/project/disposable-email-domains "disposable-email-domains on PyPI" target="_blank")
*   **Contributing:** [Contribution Guidelines](https://github.com/disposable-email-domains/disposable-email-domains#contributing "Contribution Guidelines" target="_blank")