Why does the File Picker render a non-specific Media Type for e-mail files?

For diagnosis, Proton AG has asked me to provide a duplicate of the .eml content in ⪅:

However, despite file -b --mime-type "$HOME/Downloads/Your April 2026 in review is here! 👀 2026-05-01T13_14_36+01_00.eml" [1] providing the undermentioned:

message/rfc822

…Plasma’s QFileDialog returns a more generic Media Type:

Why?

My Environment

Operating System: Fedora Linux 44
KDE Plasma Version: 6.6.4
KDE Frameworks Version: 6.26.0
Qt Version: 6.10.3
Kernel Version: 7.0.4-200.fc44.x86_64 (64-bit)
Graphics Platform: Wayland

  1. stackoverflow.com/revisions/2227201/2 ↩︎

What do xdg-mime query filetype <file> give you?

Or kmimetypefinder <file> (which, I think, is what xdg-mime will call internally)

@krake, the correct value: message/rfc822. [1]


  1. app.warp.dev/session/e6fe0215-4204-4a60-94cf-0da47fd25c7e?preview=true ↩︎

Then I wonder if the file dialog goes for the generic type on purpose

@krake, why would it? (Most people wouldn’t know what a Media Type is, nor be familiar with the data URI schema, so it’s not as if it would be simpler for the non-technical.)

Yeah, just guessing.

Do you also see this in a native app, e.g. KWrite or only when using the portal?

@krake, I do not believe so:

That is with fedora/linux/updates/44/Everything/x86_64/Packages/k/kwrite-26.04.0-1.fc44.x86_64.rpm:

Name: kwrite
Version: 26.04.0
Release: 1.fc44
Architecture: x86_64
Install Date: Fri 01 May 2026 15:43:18 BST
Size: 3225247
Signature: (none)
Source RPM: kate-26.04.0-1.fc44.src.rpm
Build Date: Wed 15 Apr 2026 02:49:18 BST
Build Host: buildvm-x86-06.rdu3.fedoraproject.org
Packager: Fedora Project
Vendor: Fedora Project

I just realized his is the “Save File” dialog.
Now I am wondering if the host program, in your case Firefox, provides the filter types.
The Portals API for this has such an option.

There might also be differences in how the file dialogs are used from non-KDE programs.
My assumption is currently that Firefox uses the Portals API but there could be other way (both Qt and GTK have plugin options for this).

If your Firefox is running as a Flatpak/Snap this would almost certainly mean Portals but Firefox can also be told to use Portals when running as a host app.

@krake, thank you. I have confirmed that this solely appears to affect ProtonMail, and in Firefox’s GTK and Qt implementations, but not in Chromium’s, so I have filed: