How to make kmail not send hostname in messageid?

Basically the title.

You can specify it when configuring outgoing mail server:

I have already enabled this option and specified the different hostname, but kmail is still sending my hostname. I have even enabled use custom message-id suffix in composer > headers but still sending hostname as part of message-id.

You are right, was my fault :innocent:

The option i mentioned changes how kmail announces itself by the dialog with SMTP server. You can see it in the header in “Received: from …” entry. It doesn’t change the Message-ID.

For me it works, when i put this in settings → composer:

And then in the mail header:

spectacle-20251203-140149

I use a quite old version of mail (22.08.1 with KDE 5.21.1)

Yeah, like I said, I did it not changing the hostname in the message-id. Why KMail can adopt sane default like thunderbird and use same hostname as email provider like <@examplel.com>, or <@whatever.com>

Well, now again retried this and this time it worked. But again this is not per mail-identity based.

If you wish to use the user defined host name from outgoing server, you need to define separate server for each mail identity, because one outgoing server can be shared by more identities. And finally, fill feature request for using user defined host name when building Messaged-ID header.

Thank you for the explanation.
I’ve been using Kontact/KMail for over a decade and only noticed today that it sends my hostname as part of the Message-ID.

Thankfully I don’t consider email a secure medium anyway, but depending on the hostname that default can surely expose potentially critical information people might not be aware they’re sending…

Is the KDE Bugtracker the only place to open feature requests? :thinking:
The privacy notice on the sign-up page makes me feel a bit uneasy:

PRIVACY NOTICE: KDE Bugtracking System is an open bug tracking system. Activity on most bugs, including email addresses, will be visible to registered users. We recommend using a secondary account or free web email service (such as Gmail, Yahoo, Hotmail, or similar) to avoid receiving spam at your primary email address.

I really don’t want to manage/monitor another mail account that’s listed (semi-)publicly somewhere, even if it’s separate that still means I’m fighting potential spam on that account.

Brainstorm Is another option, But not official way to request feature. And KMail author doesn’t think this is bug (As there was already another bug filled against it).

2 Likes

Thanks for checking. I probably wouldn’t consider it a bug either, but it’s certainly an inconvenience, especially for people with multiple domains.

Well, let’s see if changing the global option to foo.bar makes my mail more likely to end up in a spam filter. My mail provider seems to append app.mailbox.org to the Message-ID if I use the web interface, maybe I’ll just use that.

If that works the same as before I can live with it, it’s not like most people will actually look at mail headers (they sometimes should though).

Good news, we just merged changes so that it is now using the domain from the From field of the email. So there is nothing more to configure.

3 Likes

That was unexpected, thank you for fixing it, very much appreciated :slightly_smiling_face:

1 Like

New years gift arrived early. Thanks devs.

1 Like