Hi, GnuPG groups is a sometimes more unknown feature of GnuPG to allow a user to, when sending a mail to buglist@example.com, tell GnuPG that it shouldn't try to encrypt to that address, but rather to another address, or a list of addresses. This is typically used when either needing to explicitly override an encryption setting, or when encrypting to everyone on a small mailing list. You specify it in gpg.conf like so: group buglist@example.com=joeblogs@example.com 36778025 missblogs@example.com The number is a key ID, and you can specify either an email address or a key ID in the groups list. In discussions with Werner Koch on how to implement this, it turns out that the groups feature is not visible throug gpgme, and the only way of implementing it is to call the GnuPG binary explicitly to get a list of groups. I'm attaching here a patch to PGPCore which does the following: a) adds two new configuration options to Plugins/GPG: 1) use_gpg_groups: to define if groups support should be enabled or not (default: not enabled) 2) gpg_path: the path to the GPG binary. b) adds the function expand_gnupg_groups which takes a GSList ** of recipients and: 1) imports the list of groups from GnuPG 2) matches the groups to recipient addresses, and if finding a match, adding the group addresses to the list instead of the recipient address. c) adds a line to call expand_gnupg_groups from gpgmegtk_recipient_selection if use_gpg_groups is true. Jonas
Created attachment 599 [details] Groups support patch against 3.4.0
Too bad there's no way to do that using gpgme. The patch looks nice at first sight, apart for a few coding style issues. Maybe one thing that could be done to help users is to check the binary path in the plugin's init(), and if unset (empty), try to set it from g_find_program_in_path("gnupg").
Would it be possible for you to write a patch for gpgme rather than a patch for Claws?
Regarding gpgme; since it was a while since I spoke to Werner, I took the chance to catch up with him. The situation is: they should be adding the groups feature to gpgconf sometime in the future, and since gpgconf is directly supported by gpgme, it would then be possible to use gpgme to call gpgconf and get the groups information. So what we can do is to keep this ticket around as an enhancement request, so if someone needs it before, they will find it. And when there's a gpgconf with groups support, I'll rewrite the patch to use that.
Excellent! Thanks.
FWIW, this is also http://bugs.debian.org/685175