Disable Mailpit Rdns To Fix Smtp Delays (#40343) #4440
+9
−4
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Linked issue: #4451
Summary
Disable Mailpit reverse DNS lookups in the local dev stack to avoid ~8–10s SMTP delays observed on some systems. This change adds the environment variable
MP_SMTP_DISABLE_RDNS=trueto the Mailpit / Inbucket container configuration in the Supabase CLI so Mailpit will not perform reverse DNS lookups on incoming SMTP connections.Changes
internal/start/start.go(Mailpit / Inbucket containercontainer.Config) to include:(Only the Mailpit/Inbucket container config needs this change.)
Motivation & Context
See issue: #4451
On affected systems Mailpit performs a reverse DNS lookup for clients which can fail due to Docker DNS behaviour ("bad rdata") and results in a ~10 second timeout on every SMTP connection. Disabling RDNS is safe for local development, has no negative side effects, and eliminates the delay which blocks tests and slows developer workflows.
How to test
Build or run the CLI locally and start the local stack:
Ensure Mailpit/Inbucket is running (default SMTP port used by the project).
From the host, open a simple SMTP connection and observe the greeting latency:
Programmatic test (e.g. Node.js + nodemailer) — send an email and verify the operation completes quickly.
Run existing test-suite that relies on SMTP (e.g. Playwright flows) to confirm tests no longer incur the delay.
Checklist
Release Notes
fix(mailpit): disable reverse DNS lookups in local Mailpit container to eliminate SMTP delays on some systems (fixes #4451).