all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* selection of GPG key in Gnus
@ 2017-01-10  4:45 Hikaru Ichijyo
  2017-01-10 14:58 ` Teemu Likonen
  0 siblings, 1 reply; 2+ messages in thread
From: Hikaru Ichijyo @ 2017-01-10  4:45 UTC (permalink / raw)
  To: help-gnu-emacs

This is a Gnus question, but I've already asked in gnu.emacs.gnus.
Then, I noticed that no one has had a question answered in that group
for three months.  There are probably some people here who use Gnus.

I'd like to have selection of a default GPG key to use for signing and
encrypting to happen automatically depending on the group I'm in.  I'd
also like to be able to sign by default (using the correct key) in most
mail groups, and never sign/encrypt at all in newsgroups.

Basically, what I'd like is some sort of gnus-posting-styles mechanism
to control PGP behavior...or at the very least, something in the group's
customize menu.

The more I search online, the more I've gotten the impression Gnus can't
do anything like that.

I did find a message from over ten years ago that mentioned using
gnus-posting-styles to specify a X-PGP header for a group that selected
the right key.  That sounds great...but does that really work?  Is it
supposed to work, or would that qualify as a "dumb hack" (which may not
be reliable)?  Does Gnus actually invoke GPG in response to such
user-inserted SMTP headers?  I never saw any other source of information
on that.

Since Gnus aims to be a single message post/reply facility for regular
mail, mailing lists, Usenet newsgroups, Gmane style BBS's, etc...it
doesn't seem right that it would want you to have a one-size-fits-all
setting for your PGP behavior everywhere, does it?

-- 
He that would make his own liberty secure must guard even his enemy from
oppression; for if he violates this duty, he establishes a precedent
that will reach to himself.
					--Thomas Paine


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: selection of GPG key in Gnus
  2017-01-10  4:45 selection of GPG key in Gnus Hikaru Ichijyo
@ 2017-01-10 14:58 ` Teemu Likonen
  0 siblings, 0 replies; 2+ messages in thread
From: Teemu Likonen @ 2017-01-10 14:58 UTC (permalink / raw)
  To: Hikaru Ichijyo; +Cc: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 1250 bytes --]

Hikaru Ichijyo [2017-01-09 22:45:49-06] wrote:

> I'd like to have selection of a default GPG key to use for signing and
> encrypting to happen automatically depending on the group I'm in. I'd
> also like to be able to sign by default (using the correct key) in
> most mail groups, and never sign/encrypt at all in newsgroups.
>
> Basically, what I'd like is some sort of gnus-posting-styles mechanism
> to control PGP behavior...or at the very least, something in the
> group's customize menu.

With Gnus you can do anything you want. Just write code! :-) I'm not
sure how easily you can get that but here is my quick and totally
untested idea:


    (setq mml-secure-openpgp-signers nil)

    (add-hook 'gnus-message-setup-hook 'my-message-setup)

    (defun my-message-setup ()
      (when mml-secure-openpgp-signers
        (mml-secure-message-sign)))

    (setq gnus-parameters
          '(("some.group"
             (mml-secure-openpgp-signers ("0xABCD1234")))
            ("other.group"
             (mml-secure-openpgp-signers ("0xAABB1122")))
            ;; ...
            ))

-- 
/// Teemu Likonen   - .-..   <https://keybase.io/tlikonen> //
// PGP: 4E10 55DC 84E9 DFF6 13D7 8557 719D 69D3 2453 9450 ///

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 454 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-01-10 14:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-10  4:45 selection of GPG key in Gnus Hikaru Ichijyo
2017-01-10 14:58 ` Teemu Likonen

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.