KMail v5.6.3 Settings -> Configure KMail -> Accounts -> Sending -> Modify -> Advanced -> "Send custom hostname to server" is configured with an hostname different from my computer hostname. But still KMail sends my computer's hostname in "Message-ID" header field.
I just realized there's an option for this in the composer header settings, and now I am feeling stupid. Why is this set to use my domain name by default? Why can't I change this to my imap server domain?