fix: remove dual-stack [::]:PORT bind (silences spurious EADDRINUSE errors) #481

Merged
guettlibot merged 5 commits from issue-478-fix-stalwart-dual-stack-bind into main 2026-06-07 02:38:22 +00:00
guettlibot commented 2026-06-06 14:56:04 +00:00 (Migrated from codeberg.org)

Summary

  • Removes the sed substitution in Stalwart() (ci/main.go) that appended [::]:PORT entries alongside each 0.0.0.0:PORT binding in the Stalwart config.
  • On Linux with IPv6 dual-stack enabled (the Docker/Dagger default), 0.0.0.0:PORT already creates a dual-stack socket covering both IPv4 and IPv6, so the subsequent [::]:PORT bind immediately hits EADDRINUSE (os error 98) on all four ports (8080, 1430, 1025, 4190).

Test plan

  • Verify CI run no longer logs Network listener error … Address already in use on Stalwart startup
  • TestBackend and TestIntegration continue to pass (Stalwart is reachable via its IPv4 0.0.0.0 binding inside Dagger's internal network)

Closes #478

## Summary - Removes the `sed` substitution in `Stalwart()` (`ci/main.go`) that appended `[::]:PORT` entries alongside each `0.0.0.0:PORT` binding in the Stalwart config. - On Linux with IPv6 dual-stack enabled (the Docker/Dagger default), `0.0.0.0:PORT` already creates a dual-stack socket covering both IPv4 and IPv6, so the subsequent `[::]:PORT` bind immediately hits `EADDRINUSE (os error 98)` on all four ports (8080, 1430, 1025, 4190). ## Test plan - Verify CI run no longer logs `Network listener error … Address already in use` on Stalwart startup - `TestBackend` and `TestIntegration` continue to pass (Stalwart is reachable via its IPv4 `0.0.0.0` binding inside Dagger's internal network) Closes #478
Sign in to join this conversation.