Hi,
All campaign emails sent from the listmonk app leave with a
Message-ID header pointing at localhost.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/smtppool library. 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 hardcoded localhost.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
--hostname at run time, or hostname "$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!
