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

Vexim Web Plugin Dns Core Laravel Package

mrsleeps/vexim-web-plugin-dns-core

Core DNS plugin for the Vexim web interface, providing shared plumbing that Vexim add-ons use to read, validate, and manage DNS records from PHP. A small building block for developers extending Vexim's mail-hosting admin with custom DNS behavior.

View on GitHub
Deep Wiki
Context7

Getting Started

  • Install with composer require mrsleeps/vexim-web-plugin-dns-core (or add it to the existing Vexim/Laravel app's composer.json). v1.2.2 is a patch release — safe drop-in over v1.2.1.
  • Register the service provider/plugin if you don't use package auto-discovery, then publish config: php artisan vendor:publish --tag=vexim-dns-config (tag may differ — check the package's README/src/Providers).
  • First place to look: the package's DNS client class and the Artisan command that runs the CLI sync. That command is the primary entry point most developers will touch day-to-day.
  • First practical use case: run the CLI sync against a single test domain before wiring it into a schedule, e.g. php artisan vexim:dns:sync --domain=example.com (confirm the exact signature with php artisan list). Compare the result to dig output on the same host.
  • If you're on ≤ v1.2.1 and your CLI sync fails to resolve records, upgrade to v1.2.2 first — that's exactly what this release fixes.

Implementation Patterns

  • Service-level usage. Inject the DNS client contract/service rather than calling dns_get_record() directly. This keeps lookups testable and lets the package own resolver config, timeouts, and record normalization.
  • Command + scheduler pattern. Do interactive/debug runs from the CLI command, then schedule the same command for real work:
    $schedule->command('vexim:dns:sync')->hourly()->withoutOverlapping();
    
    withoutOverlapping() matters here — overlapping syncs against the same zones are a common source of confusing state.
  • Per-domain iteration. Loop domains from your Vexim model/repository and reconcile each zone individually so one bad domain doesn't abort the whole run; catch and log per-domain failures.
  • Record-type segmentation. Treat A/AAAA, MX, TXT (SPF/DKIM/DMARC), and CNAME as separate reconcile steps. Mail-related records are the ones that break silently and matter most in a Vexim context.
  • Dry-run first. If the command supports --dry-run, make it the default in local/staging and require an explicit flag in production CI/deploy scripts.
  • Testing. Bind a fake/stub resolver in the container during tests so no real DNS traffic is emitted; assert on the normalized record arrays rather than raw dns_get_record() output.
  • Wrapping in jobs. For larger zone counts, dispatch a queued job per domain. Note the CLI/queue worker shares the same resolution problem this release fixes — so the fix benefits queued syncs too.

Gotchas and Tips

  • CLI vs FPM resolution differs. The v1.2.2 fix ("DNS client resolution in CLI sync") is the classic symptom: lookups work in the web UI but fail under php artisan or a queue worker, because the CLI process resolves nameservers differently (different resolv.conf, missing dns extension config, container network namespace, or a chrooted/user-context difference). Upgrade, then verify resolution from the CLI user/host — not from your browser.
  • Re-run composer update mrsleeps/vexim-web-plugin-dns-core explicitly if you pin versions; ^1.2.1 won't always pull the patch in locked environments. Check composer.lock after deploying.
  • Clear caches after upgrade: php artisan config:clear && php artisan cache:clear, and restart queue workers (php artisan queue:restart) so long-lived processes pick up the fixed client.
  • Nameserver config is config, not code. Prefer setting explicit nameservers/timeouts in the published config over relying on the host's resolver — this makes behavior identical between web, CLI, and container contexts and prevents regressions of this same class of bug.
  • Timeouts and retries. DNS failures are often slow, not loud. Set a short per-query timeout and log the domain + record type on failure, otherwise a single unresponsive resolver stalls the whole sync.
  • Trailing dots and case. FQDNs in DNS records (mail.example.com.) and mixed-case hostnames cause false "changed" diffs in reconcile logic. Normalize before comparing.
  • Don't trust TTL-0 propagation. After writing records, verify with an external resolver, not just your local cache — you may be reading stale answers and concluding the sync failed.
  • Debugging kit: reproduce with dig +short <type> <name> @<nameserver> as the same OS user the CLI runs as. If dig works but the command doesn't, it's config/context, not the package.
  • Extension points: the resolver/client binding and the published config are the intended seams — bind your own client implementation for custom nameservers, logging, or a mock in tests rather than forking the package.
  • Upgrade risk: v1.2.2 is a patch with a single bug fix; no breaking changes or deprecations reported. Safe to roll forward, but re-run your DNS sync in a staging environment once to confirm resolution behaves as expected in your network setup.
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.
skyraptor/chatter
edlugz/sasapay
abbasudo/artisan-route
mirvan/ippanel
ignibyte/aic-framework
glavweb/data-schema-bundle
glavweb/datagrid-bundle
tacticmedia/scim-server
uni-method/frame
neika-ai/sdk
adachsoft/php-code-style
pharaonic/laravel-notification-dependencies
beautinow/translug
dev-brainiac/bot-cloaked
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
adachsoft/api-version-bundle
cgv/localized-resource