When opening an attachment directly from the mail, it is saved to /tmp first with a name like "messageviewer_<randomid>.pdf", and so that's the name that also will be used by the application opening the attachment. This behaviour has changed recently. Before the temporary name was the actual name of the attachment, optionally with a number appended to it if the original name already existed in the tmp folder. The new behaviour is rather inconvenient because the file name often has meaning. Some examples of the issues this generic naming brings with it: - the name of the attachment you see in the e-mail has no link any more with the name of the file that is open. So it's hard to link back the open file to an e-mail. This gets more increasingly hard as you open more attachments from different e-mails. - when opening multiple attachments it is no longer evident from the taskbar which file is which because they are all named 'messageviewer_xyz.ext' Switching files from the taskbar after several are open has become a hit and miss. - when you have opened an attachment, you may decide to resave it (to a location other than tmp) directly from the application that is used to open the attachment (libreoffice or okular for example). You typically do this by using "Save as". However the proposed name in that dialog is now 'messageviewer_xyz.ext' rather than the much more descriptive name the attachment originally had in the mail.
I confirm this, it applies at least to PDF files, plus .doc and .odt files created by Libre Office. In addition, on Wednesday I received a .doc attachment that Libre Office opened with a filename of "untitled 1". And it still does today (as do .doc/.odt attachments to older emails), when attachments sent today open as "messageviewer_<*>" As far back as I can go PDF files want to save as "messageviewer_<*>".
I'm not seeing this issue any more with more recent versions of KMail (currently running 5.7.3). So as far as I'm concerned this bug is now fixed.
Thanks for keeping us informed.