listmonk: outgoing Message-ID uses localhost.localdomain
-
Hi,
All campaign emails sent from the listmonk app leave with a
Message-ID header pointing atlocalhost.localdomain, e.g.:Message-ID: <1776433035469678859.1.4025817209405639301@localhost.localdomain>This is a minor but real deliverability smell — some spam filters
have heuristics against it, and it's unambiguously a misconfiguration.Root cause
listmonk uses the
knadh/smtppoollibrary. In
smtppool/email.go :: generateMessageID():h, err := os.Hostname() if err != nil || !strings.Contains(h, ".") { h = defaultHostname // = "localhost.localdomain" }https://github.com/knadh/smtppool/blob/master/email.go
app UUID (e.g.
9983cd4c-e53c-436e-af86-84bdbc749178) — no dot,
so smtppool falls back to the hardcodedlocalhost.localdomain.The "EHLO hostname" setting in listmonk admin does not help —
smtppool uses it only for the SMTP handshake, not for Message-ID
generation (two separate fields in the library).Proposed fix (Cloudron package, one-liner)
Set the container hostname to
CLOUDRON_APP_DOMAIN— either via
--hostnameat run time, orhostname "$CLOUDRON_APP_DOMAIN"at
the top of the start script. Message-ID then becomes
<…@listen.example.com>instead of@localhost.localdomain.An upstream config option in listmonk/smtppool would be the proper
fix, but the Cloudron-side workaround resolves it immediately for
all Cloudron listmonk users.Environment
- Cloudron: 9.0.0
- listmonk app image:
cloudron/app.listmonk.cloudronapp:202603300219460000
Happy to test a patched build. Thanks!
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login