The documentation regarding integrating GnuPG and KMail is out of date. As of version 1.7 of KMail, they've decided to ... er, break things. This leads to a rather unfortunate situation. Regardless, the steps listed in this document won't get a user working encryption/decryption. "http://kmail.kde.org/kmail-pgpmime-howto.html" "http://bugs.kde.org/show_bug.cgi?id=92619" "http://bugs.gentoo.org/show_bug.cgi?id=70811"
Okay, I've put in a note for the time being, I'll draft up a proposed update for the document and let you know; I can't test it myself though.
Created attachment 50452 [details, diff] Patch for gnupg-user.xml Please review and confirm that this is indeed how it should work. An HTML version is available at http://dev.gentoo.org/~swift/gnupg-user.html.
KDE team, is this the new way of dealing with GnuPG under KMail? When is this in effect? Do we need both instructions (those currently in CVS and those mentioned in this bugreport) available for a while? Do we provide an easier way of dealing with this? For instance, is there a USE flag that will trigger the installation of pinentry? Will the gpg-agent.conf be generated automatically?
This is a bit tricky... actually, kmail can decrypt end encrypt "Inline PGP" mails, and encrypt "OpenPGP/MIME" mails without a gpg-agent running, but it cannot decrypt "OpenPGP/MIME" mails without gpg-agent. Apart from OpenPGP/MIME decryption, all that is needed is that kdepim is compiled with gpgme support (it happens if 'crypt' is in USE). (this is true for both kde-3.3 and kde-3.4, so I think the old instructions can be safely removed) Since the new paragraph you wrote mainly explains how to set up a gpg-agent, why not turning it into a chapter of its own ("Using gpg-agent")? Something that explains why it's useful (it can keep your passphrase in memory, you can specify how long to keep it, which program to use to retrieve it (typically pinentry...)). A paragraph should also say: "If you use kde as your desktop environment, you can automatically start the gpg-agent when the session starts, by editing the config file /usr/kde/3.x/env/agent-startup.sh". This is the preferred method, better than editing ~/.xsession (which can stay for other desktop enviroments, maybe?) Then, a section specifically aimed at kmail can just be reduced to a couple paragraphs, maybe something like "You should use gpg-agent to exploit all functionalities of kmail..." and not much else. About what you wrote: > Now start KMail and go to Settings, Configure KMail, Security, Crypto > Backends. You should see a GpgME-based backend listed. If it's listed but > grayed out, click on Rescan. Select it and click on OK. This is not affected by the fact that gpg-agent is running or not, but is a good test to see if the crypto backend works well in general. About gpg-agent and pinentry, see also bug 60809.
Created attachment 50627 [details, diff] Patch for gnupg-user.xml Second try. This one adds a chapter on GPG Agent (http://dev.gentoo.org/~swift/gnupg-user.html#gpg-agent, please confirm that the information is accurate or point me in the right direction if it isn't) and a small part on KMail configuration.
Created attachment 50790 [details, diff] kmail-gnupg.patch Thanks for providing the patch. I uses that as a reference and corrected a few things. The result is another try, attached here.
Thanks for the patch. It's used verbatim in CVS now.