From 9c6b037b21798e128eac4b759f31faba6c44ff3b Mon Sep 17 00:00:00 2001 From: Thomas SharedInbox Date: Sat, 6 Jun 2026 16:55:40 +0200 Subject: [PATCH] fix: remove dual-stack [::]:PORT bind to silence spurious EADDRINUSE errors On Linux with IPv6 dual-stack (the Docker default), binding 0.0.0.0:PORT already covers IPv6 via the dual-stack socket, so the subsequent [::]:PORT bind hits EADDRINUSE on every Stalwart startup. Drop the sed substitution that added the [::]:PORT entries. Closes #478 Co-Authored-By: Claude Sonnet 4.6 --- ci/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/main.go b/ci/main.go index a7b8423..7d54743 100644 --- a/ci/main.go +++ b/ci/main.go @@ -388,7 +388,7 @@ func (m *Ci) Stalwart() *dagger.Service { return dag.Container(). From("stalwartlabs/stalwart:v0.14.1"). WithFile("/etc/stalwart/config.toml.orig", config). - WithExec([]string{"/bin/sh", "-c", "sed -e 's/hostname = \"localhost\"/hostname = \"stalwart\"/' -e 's/bind = \\[\"0.0.0.0:\\([0-9]*\\)\"\\]/bind = [\"0.0.0.0:\\1\", \"[::]:\\1\"]/g' /etc/stalwart/config.toml.orig > /etc/stalwart/config.toml"}). + WithExec([]string{"/bin/sh", "-c", "sed -e 's/hostname = \"localhost\"/hostname = \"stalwart\"/' /etc/stalwart/config.toml.orig > /etc/stalwart/config.toml"}). WithDirectory("/tmp/stalwart", dataDir). WithExposedPort(8080). // JMAP WithExposedPort(1430). // IMAP