amieiro/disposable-email-domains
GitHub: amieiro/disposable-email-domains
一次性邮箱域名黑名单与白名单数据源,每 15 分钟自动更新,支持 txt 和 JSON 格式,可直接用于拦截临时邮箱注册。
Stars: 88 | Forks: 6
## 一次性邮箱域名
一次性邮箱域名列表,用于一次性邮箱服务,每 15 分钟生成一次,提供 txt 和 JSON 格式。
你可以在[这里](https://github.com/amieiro/disposable-email-domains/blob/master/creator/app/Console/Commands/CreateDisposableEmailDomainsFilesCommand.php#L16)找到本项目用于获取被屏蔽和允许域名的列表。本项目维护此[安全域名](https://github.com/amieiro/disposable-email-domains/blob/master/secureDomains.txt)列表。
## 环境要求
本项目需要:
- **PHP 8.3 或 8.4**
- **Composer 2.x**
- **Laravel 12.x**
## 联系方式
如果你发现某些域名不应在拒绝列表中,或者你想添加其他列表,或者你想建议一些更改、改进等,你可以通过[项目 Issues](https://github.com/amieiro/disposable-email-domains/issues)或我的[个人博客](https://www.jesusamieiro.com/contactaconmigo/)联系我。
## 文件说明
- **denyDomains**。已知用于一次性邮箱服务的邮箱域名列表,应被屏蔽。提供 [txt](https://raw.githubusercontent.com/amieiro/disposable-email-domains/master/denyDomains.txt) 和 [json](https://raw.githubusercontent.com/amieiro/disposable-email-domains/master/denyDomains.json) 格式。
- **allowDomains**。知名的非一次性邮箱域名列表,应被允许。提供 [txt](https://raw.githubusercontent.com/amieiro/disposable-email-domains/master/allowDomains.txt) 和 [json](https://raw.githubusercontent.com/amieiro/disposable-email-domains/master/allowDomains.json) 格式。
- **secureDomains**。已知安全邮箱域名的内部列表。用于生成 denyDomains 文件。
## 用法
你可以在项目中使用这些文件来屏蔽一次性邮箱域名。
- 首先,你应该使用 allowDomains 文件检查域名是否在允许列表中。
- 如果不在,你应该使用 denyDomains 文件检查域名是否在拒绝列表中。
例如,在 PHP 中:
```
$emailDomain = 'gmail.com';
$allowDomains = file_get_contents('https://raw.githubusercontent.com/amieiro/disposable-email-domains/master/allowDomains.json');
$allowDomains = json_decode($allowDomains, true);
if (in_array($emailDomain, $allowDomains)) {
echo 'This domain is allowed.';
}
$emailDomain = 'temp-mail.org';
$denyDomains = file_get_contents('https://raw.githubusercontent.com/amieiro/disposable-email-domains/master/denyDomains.json');
$denyDomains = json_decode($denyDomains, true);
if (in_array($emailDomain, $denyDomains)) {
echo 'This domain is disposable.';
}
```
## 许可证
本项目及其文件是根据 [MIT 许可证](https://opensource.org/licenses/MIT)授权的开源软件。
标签:ffuf, Homebrew安装, JSON, Laravel, Linux安全, OpenVAS, PHP, SOC Prime, 一次性邮箱, 临时邮箱, 反欺诈, 垃圾注册防护, 垃圾邮件拦截, 域名白名单, 域名黑名单, 开发工具, 网络安全, 邮箱过滤, 邮箱验证, 隐私保护