How to set the domain used for messageId?

Your question

Hi,

In the admin UI, I’ve set the default hostname I want (mail.example.org) in Settings → Server → General → Default Hostname

but looking at the messageId of the sent email, I still have my server hostname servername.example.org instead of mail.example.org

is there a separate configuration I’m missing?

Actions:Reload:Server settings?

Mine is just showing the hostname of the server (i.e., <id>@stalwart-01). That does not match my default hostname setting.

yes, same issue with me, did you set up the default hostname properly?

(on 0.16)

For mail submitted over SMTP, the Message-ID domain comes from the SMTP session hostname, not from the Default Hostname setting in Server > General, which is why changing that had no effect. The session hostname defaults to the machine’s own hostname (system(‘hostname’)).

To change it, set the SMTP session/connect hostname expression for your listener to the value you want, or make sure the OS hostname resolves to the FQDN you want. One caution: there is a messageIdHostname field in the System Sieve Interpreter that looks relevant but is not actually consumed anywhere right now, so setting it will not change the Message-ID; do not rely on it.