From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/86338 Path: news.gmane.org!not-for-mail From: =?utf-8?Q?Peter_M=C3=BCnster?= Newsgroups: gmane.emacs.gnus.general Subject: Re: Maybe encrypt message ? Date: Tue, 24 Nov 2015 22:17:27 +0100 Message-ID: <87h9kb9jx4.fsf@roche-blanche.net> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1448399892 13392 80.91.229.3 (24 Nov 2015 21:18:12 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 24 Nov 2015 21:18:12 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M34570@lists.math.uh.edu Tue Nov 24 22:17:59 2015 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from lists1.math.uh.edu ([129.7.128.208]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1a1KyK-0000d9-HN for ding-account@gmane.org; Tue, 24 Nov 2015 22:17:56 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by lists1.math.uh.edu with smtp (Exim 4.85) (envelope-from ) id 1a1Ky8-0001gb-Vh; Tue, 24 Nov 2015 15:17:45 -0600 Original-Received: from mx1.math.uh.edu ([129.7.128.32]) by lists1.math.uh.edu with esmtps (TLSv1.2:AES128-GCM-SHA256:128) (Exim 4.85) (envelope-from ) id 1a1Ky6-0001gD-VQ for ding@lists.math.uh.edu; Tue, 24 Nov 2015 15:17:43 -0600 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx1.math.uh.edu with esmtps (TLSv1.2:DHE-RSA-AES128-SHA:128) (Exim 4.85) (envelope-from ) id 1a1Ky5-0008I7-E6 for ding@lists.math.uh.edu; Tue, 24 Nov 2015 15:17:42 -0600 Original-Received: from plane.gmane.org ([80.91.229.3]) by quimby.gnus.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1a1Ky2-0006XH-Be for ding@gnus.org; Tue, 24 Nov 2015 22:17:38 +0100 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1a1Kxy-0008NY-4C for ding@gnus.org; Tue, 24 Nov 2015 22:17:34 +0100 Original-Received: from arennes-651-1-219-238.w90-32.abo.wanadoo.fr ([90.32.94.238]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 24 Nov 2015 22:17:34 +0100 Original-Received: from pmlists by arennes-651-1-219-238.w90-32.abo.wanadoo.fr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 24 Nov 2015 22:17:34 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 54 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: arennes-651-1-219-238.w90-32.abo.wanadoo.fr User-Agent: Gnus/5.130014 (Ma Gnus v0.14) Emacs/25.1.50 (gnu/linux) Cancel-Lock: sha1:QIJm1/BSOI0VKXsZ9BqXuQlK5/Q= X-Spam-Score: -3.3 (---) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:86338 Archived-At: On Tue, Nov 24 2015, Xavier Maillard wrote: > How do you practice PGP encryption/signing in Gnus ? I use jl-encrypt and "roles". When my role is not "list", I sign the message and when public keys for all recipients are available I also encrypt it. Here some lines of my setup: --8<---------------cut here---------------start------------->8--- (require 'jl-encrypt) (defun pm/message-send () (unless (message-field-value gnus-delay-header) (unless (string-equal pm/role "list") (if (jl-epg-check-unique-keys (jl-mail-recipients)) (mml-secure-message-sign-encrypt) (mml-secure-message-sign))) (pm/spell))) (defun pm/gnus-article-receive-epg-keys () "Fetch unknown keys from a signed message. >From http://article.gmane.org/gmane.emacs.gnus.user/15894" (interactive) (goto-char (point-min)) (if (re-search-forward "\\[\\[PGP Signed Part:No public key for \\([A-F0-9]\\{16,16\\}\\) created at " nil 'noerror) (progn (epg-import-keys-from-server (epg-make-context 'OpenPGP) (list (match-string 1))) (gnus-summary-prev-article) (gnus-summary-next-article) (gnus-summary-select-article-buffer)) (message "No unknown signed parts found."))) (defun pm/update-role () "Check current buffer and update pm/role accordingly." (let* ((address (mail-strip-quoted-names (message-fetch-field "From"))) (role (pm/addr->role address))) (when role (setq pm/role role)))) (setq mm-decrypt-option 'always mm-verify-option 'always mml2015-encrypt-to-self t mml2015-sign-with-sender t) (add-hook 'gnus-message-setup-hook 'pm/message-setup) (add-hook 'message-send-hook 'pm/message-send) --8<---------------cut here---------------end--------------->8--- -- Peter