How to automatically obtain keys in Evolution for e-mail recipients? (key discovery)

0

I am using the PIM Evolution 3.22.6 for e-mail and contacts. For encrypting e-mails gpg (GnuPG 2.1.18) is used by Evolution.

How can I configure my system such as when I compose an e-mail the PGP key for the recipients are automatically retrieved from key servers and added to my keyring?

For example when I try to send an e-mail to a recipient, which is not in my keyring I get the following error message: gpg: <edward-en@fsf.org>: skipped: No public key

In case I run - outside of Evolution - gpg --search-keys edward-en@fsf.org a key is successfully found. Is there any way to tell Evolution to deal with the search?

user5534993

Posted 2019-10-06T13:54:13.163

Reputation: 11

I have reported an issue to request that feature.

– user5534993 – 2019-10-26T18:39:37.947

Answers

1

That interoperability issue has been resolved since GnuPG 2.2.19. You still need to configure GnuPG to automatically retrieve keys for encryption. This can be done in a configuration file (~/.gnupg/gpg.conf):

keyserver hkp://keyserver.ubuntu.com:80
auto-key-locate keyserver

In order to use that version with the current Debian stable distribution, Debian Backports can be used.

user5534993

Posted 2019-10-06T13:54:13.163

Reputation: 11

0

It should be working solely by setting up GnuPG (to use auto-key-locate keyserver). There seems to be an interoperability issue with Evolution 3.22.6 and GnuPG (tested with 2.1.18, 2.2.12, 2.2.17).

As a workaround an adapter can installed to intercept Evolution's call of GnuPG. There is a small script for this purpose. The quintessence is:

temporaryFile=`mktemp` 
trap "rm $temporaryFile" EXIT # remove file when finished
printf " %q" "$@" | sed -E 's| -r \\<(\S+@\S+)\\>| -r \1|' > $temporaryFile
xargs --arg-file=$temporaryFile gpg # Run GnuPG with modified arguments

To install, use dconf-editor to set org.gnome.evolution-data-server.camel-gpg-binary to the absolute path of that script.

user5534993

Posted 2019-10-06T13:54:13.163

Reputation: 11