Sync and Blacklist
This page covers the two ways to extend the package after installation:
- Sync the disposable domain list from a remote source
- Add your own blacklist domains manually
1. Sync from a remote source
Run the sync command:
php artisan erag:sync-disposable-email-listWhen the command runs, it:
- Clears the package cache
- Reads the URLs from
config('disposable-email.remote_url') - Normalizes the remote response into a clean domain list
- Stores the updated list in your configured blacklist directory
This command updates application storage. It does not rewrite the package's built-in Email::domains() array.
To update the package source array, run:
php scripts/update-built-in-domains.php2. Add your own blacklist file
Create or edit this file:
storage/app/blacklist_file/disposable_domains.txtAdd one domain per line:
abakiss.com
fakemail.org
trashbox.io3. Use multiple blacklist files if needed
You are not limited to a single file. The package reads every .txt file in the configured blacklist directory.
For example:
storage/app/blacklist_file/marketing-abuse-domains.txtcampaign-throwaway.example
promo-abuse-mail.example
referral-fraud-mail.exampleThis makes it easier to separate custom lists by use case.
4. Follow the blacklist file rules
Your custom blacklist file should follow these rules:
| Rule | Requirement |
|---|---|
| File location | Must match the configured blacklist_file path |
| File format | Plain text |
| File content | One domain per line |
| File extension | .txt |
If the file path does not match your configuration, the package will not load your custom domains.
5. Add trusted domains to the whitelist New
Use the whitelist when a domain should always pass:
'whitelist' => [
'trusted-test-domain.com',
],Whitelisted domains override the built-in and custom blacklist.
6. Block subdomains New
Subdomain blocking is enabled by default:
'block_subdomains' => true,With this option enabled, mail.tempmail.com is blocked when tempmail.com exists in the disposable list.
7. View package stats New
Use the stats command to inspect the loaded domain lists and package settings:
php artisan disposable:statsThe command shows:
- Built-in domain count
- Custom blacklist domain count
- Total domain count
- Whitelist count
- Remote source count
- Cache status
- Subdomain blocking status
- Last synced file time