Bug 1645 - Make claws-mail support GnuPG groups
Summary: Make claws-mail support GnuPG groups
Status: NEW
Alias: None
Product: Claws Mail
Classification: Unclassified
Component: Plugins/Privacy/PGP (show other bugs)
Version: 3.4.0
Hardware: PC Linux
: P3 enhancement
Assignee: users
Depends on:
Reported: 2008-06-18 13:17 CEST by Jonas
Modified: 2017-01-19 10:16 CET (History)
0 users

See Also:

Groups support patch against 3.4.0 (10.14 KB, patch)
2008-06-18 13:18 CEST, Jonas
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jonas 2008-06-18 13:17:22 CEST

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.

Comment 1 Jonas 2008-06-18 13:18:06 CEST
Created attachment 599 [details]
Groups support patch against 3.4.0
Comment 2 Colin Leroy 2008-06-18 13:59:06 CEST
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").
Comment 3 Paul 2008-06-18 18:51:45 CEST
Would it be possible for you to write a patch for gpgme rather than a patch for Claws?
Comment 4 Jonas 2008-06-18 20:18:52 CEST
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.
Comment 5 Paul 2008-06-18 20:29:06 CEST
Excellent! Thanks.
Comment 6 Ricardo Mones 2012-08-22 10:10:32 CEST
FWIW, this is also http://bugs.debian.org/685175