Bug 392804 - Kmail 5.7.3 does not import joined gpg key
Summary: Kmail 5.7.3 does not import joined gpg key
Status: RESOLVED FIXED
Alias: None
Product: kmail2
Classification: Applications
Component: crypto (show other bugs)
Version: unspecified
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-04-06 15:40 UTC by yves.caniou
Modified: 2023-07-10 13:14 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description yves.caniou 2018-04-06 15:40:46 UTC
Hi

Kmail version is 5.7.3, but not listed in the proposed version list (5.7.2 then git).

An OpenPGP key is present in a mail as a .asc file.
There is a menu to show details and import the key.
Clicking on show details shows details.
If the mouse is on the import hyperlink, one can see "x-kmail:/bodypart/13/1.2/pgpkey?action=import". Yet clicking on it does nothing.

Cheers.

.Y
Comment 1 Arusekk 2019-02-13 23:33:37 UTC
The bug is still present in kmail 5.10.1 using early-2019 KDE stack from mageia
Comment 2 Ingo Klöcker 2023-05-05 08:49:58 UTC
I cannot reproduce this. I get the message "The key has been successfully imported" after clicking on "Import key". Even for an encrypted message with attached OpenPGP key I get this message although the actual import fails (see bug 469383).

Since your report says that "clicking on it does nothing", I assume that your problem has been fixed because in the current version the import is at least attempted and the result is reported.

If the problem still persists for you with the latest version of KMail (currently 5.23.0 in KDE Gear release 23.04.0), then please run KMail with GpgME debugging like this `GPGME_DEBUG=8 kmail` in Konsole.
Comment 3 Arusekk 2023-05-15 09:25:49 UTC
Reproduced with latest KMail 5.23.0 (23.04.0).
Upon clicking the 'Import key' link, the following line appears in the logs:

org.kde.pim.kmail: Can't handle URL: QUrl("x-kmail:/bodypart/1/1.2/pgpkey?action=import")

All GPGME logs appear before the message gets rendered, so I think it is not the cause.

I also found that this only happens if the key is attached inside an encrypted (and signed) envelope, not as a flat top-level attachment (then it fails later as you said Ingo).

Steps to reproduce:

Export any key as .asc:
$ gpg2 --export -a your@email.example > some-pubkey.asc
Send an encrypted & signed e-mail to yourself, e.g.:
$ kmail --attach some-pubkey.asc
Open the received message in KMail.
Hover and then click on 'Import key'.  First a target URL appears, then nothing happens except the log message, respectively.
Comment 4 Ingo Klöcker 2023-05-15 13:03:55 UTC
You may be missing a plugin. Make sure that all kdepim addons are installed.
Comment 5 Arusekk 2023-07-10 13:14:32 UTC
Verified again in KMail 5.23.3 (23.04.3) and it works now, probably because of the fix for bug 469383.
Thank you a lot!