Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Laravel Disposable Email Laravel Package

erag/laravel-disposable-email

Laravel package for detecting and blocking disposable email addresses. It provides a validation rule and helpers to reject throwaway domains using a configurable domain list, making it easy to keep registration, forms, and APIs free of temporary email signups.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit

  • Idiomatic Laravel integration: a service provider, a string validation rule (disposable_email), an explicit rule object, a facade (Disposable), and a Blade conditional (@disposableEmail). This maps cleanly onto the framework's existing validation and view layers, so there is no custom request pipeline or middleware to own.
  • Low coupling surface: checks are synchronous, in-process lookups against a compiled domain list, with an optional detailed result object. No database schema, no queue worker, no external service dependency at request time (unless DNS mode is enabled).
  • Config-first design (config/disposable-email.php) with sensible defaults means a team can adopt it without writing wrapper code. That is the main architectural selling point for a TPM: the integration is a validation rule, not a subsystem.

Integration feasibility

  • Two-step install (composer require + php artisan erag:install-disposable-email), plus provider registration on Laravel 10. No migrations, no published assets beyond config, no env vars required.
  • The API is broad enough to cover the realistic use cases: form requests, manual validators, JSON/API validation, service-layer guards (Disposable::email()), and view branching. A team should not need to fork or wrap it.
  • Escape hatches exist for edge cases: explicit rule object, Disposable::check() for structured results, custom .txt blacklist files, and a whitelist config for trusted domains.

Technical risk

  • List provenance and freshness. The enforcement quality depends entirely on the domain list. The built-in Email::domains() array is frozen at package release; runtime freshness depends on erag:sync-disposable-email-list pulling from a raw GitHub URL. That is a single point of both failure and trust.
  • Remote source integrity. Syncing from raw.githubusercontent.com gives no signature, checksum, or pinning. A compromised or malformed upstream list becomes an application-level denial-of-signup vector. This is the highest-severity risk for a TPM to flag.
  • False positives are a revenue risk, not just a bug. Blocking a legitimate corporate domain or a recently recycled domain directly fails user registration. Subdomain blocking (block_subdomains: true) compounds this by widening the blast radius of a single bad parent entry.
  • Optional DNS/RFC modes introduce network I/O into the request path. disposable_email:dns can add latency and a new timeout failure mode; this should be treated as an opt-in hardening step, not a default.
  • Adoption signal is weak. 283 stars and zero listed dependents means limited production battle-testing; the package has not been hardened by a wide ecosystem. Combined with a single-maintainer profile, bus factor is a real consideration.
  • Release metadata anomaly. The stated last release of 2026-10-08 is in the future relative to typical assessment dates. This may be a registry/timezone artifact, but a TPM should verify actual tag history and commit cadence before treating the project as actively maintained.
  • Default caching is off, which means per-check file reads on every validation unless explicitly enabled. That is a performance cliff at scale, and a config decision someone must own.

Key questions

  • Who curates the upstream list, how often, and what is the removal/appeal process for a wrongly listed domain?
  • What happens on a failed sync — does the package fall back to the last known-good list, or silently keep a stale one? Is that observable?
  • What is the measured false-positive rate against our actual signup traffic?
  • Is there any integrity verification on the remote list, or can we mirror and pin it internally?
  • What are the PHP/Laravel version constraints, and do they match our supported matrix?
  • Which forms are in scope — registration only, or also password reset, invites, and admin-created accounts?
  • Do we need the DNS/RFC modes, and if so, can they run outside the synchronous request path?

Integration Approach

Stack fit

  • Fits any Laravel 10+ application, monolith or API, with no new infrastructure. The only runtime prerequisites are a writable storage path for blacklist files and, if enabled, a cache store.
  • Well suited to teams already standardizing validation in Form Requests and API resources; it slots in as one additional rule rather than a new pattern.

Migration path

  • Phase 0 — install and observe: install, publish config, run php artisan disposable:stats to baseline built-in vs. custom domain counts.
  • Phase 1 — shadow mode: add the rule but log-and-allow rather than reject, so you can quantify how many real signups would have been blocked. This is the single most valuable de-risking step and should not be skipped.
  • Phase 2 — tune: populate whitelist from shadow-mode false positives, decide on block_subdomains, and enable cache_enabled with a TTL.
  • Phase 3 — enforce on the lowest-risk surface first (e.g., a secondary contact form or a trial signup), then expand to registration.
  • Phase 4 — automate: schedule erag:sync-disposable-email-list (daily is a reasonable default), with an alert on sync failure.

Compatibility

  • Verify PHP and Laravel version constraints against the supported matrix before committing; provider registration differs between Laravel 10 (config/app.php) and 11–13 (bootstrap/providers.php).
  • Check for overlap with any existing email-validation or anti-fraud tooling to avoid duplicate or conflicting blocklists.
  • Confirm behavior in containerized/ephemeral-filesystem environments — the blacklist directory under storage/app may not survive redeploys unless persisted.

Sequencing

  • Treat the domain list as a configuration artifact with an owner, not an implementation detail. Decide up front whether to consume the upstream URL directly or mirror it internally and point remote_url at the mirror.
  • Land the observability first (stats, sync success/failure logging, blocked-attempt counters), then enforcement. Enforcement without a false-positive feedback loop is the failure pattern to avoid.

Operational Impact

Maintenance

  • Low code maintenance, moderate data maintenance. Composer upgrades are infrequent, but the domain list needs scheduled syncing, the whitelist needs ongoing curation, and custom .txt blacklist files need a change-control process.
  • Cache invalidation is a recurring operational task: whenever the list or config changes, php artisan cache:clear (or targeted invalidation) must be part of the deploy runbook.
  • Single-maintainer risk means the team should be prepared to vendor the package or pin a version if upstream activity stalls.

Support

  • Expect user-facing appeals ("my email was rejected"). There must be a documented path to whitelist a domain quickly, ideally without a code deploy — which argues for storing the whitelist/blacklist in a runtime-editable location rather than in code.
  • Support agents need a lookup tool: Disposable::check() plus disposable:stats gives enough detail (source(), matchedDomain(), whitelisted()) to answer "why was I blocked" without engineering involvement.

Scaling

  • With caching disabled, every validation reads the blacklist directory — acceptable at low volume, wasteful under load. Enable caching before any traffic ramp.
  • In multi-instance deployments, use a shared cache (Redis) so instances agree on the compiled list, and ensure the sync command runs once (scheduled task on a single node or with an overlap lock) rather than on every instance.
  • Ephemeral filesystems will silently reset custom blacklists on redeploy; persist storage/app/blacklist_file or source it from config management.
  • DNS/RFC modes scale differently from list lookups — they add per-request network calls and should be capacity-planned separately if adopted.

Failure modes

  • Upstream URL unavailable or rate-limited → stale list → disposable signups leak through. Detect via sync-failure alerting and last-synced timestamp from disposable:stats.
  • Malformed or corrupted blacklist file → either over-blocking or silent no-op. Validate file parsing after every sync.
  • Over-aggressive list or subdomain blocking → legitimate signups rejected, direct conversion loss. Mitigate with shadow mode and a fast whitelist path.
  • Cache staleness after a list update → inconsistent enforcement across requests and nodes. Fold cache clearing into the sync job rather than a separate manual step.
  • Package abandonment or a breaking major release → unpatched integration. Mitigate by pinning versions and keeping the integration shallow (a single validation rule is cheap to replace with an in-house list check).
  • DNS mode timeouts → elevated latency or 5xx on the signup path.

Ramp-up

  • Engineering: roughly half a day for a Laravel developer to install, configure, and wire into registration and API validation; another half day to build shadow-mode logging and the sync schedule.
  • Operations: minimal but non-zero — one runbook covering sync scheduling, cache clearing on deploy, stats inspection, and the whitelist update procedure.
  • Product/Support: needs a short brief on what "disposable" means, the false-positive appeal path, and the expectation that some legitimate users will occasionally be caught. Budget ongoing whitelist curation effort; it is small but permanent.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
shitoudev/permissionmanager
johannesclimacus/laravel-tui
hocvt/seotools
vitalybaev/sypexgeo
amphibee/themosis-ignition
gito-me/fast-excel
frankyso/laravel-ipaymu
geolize-studio/laravel-chile
boomerangui/chat
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console