From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/75611 Path: news.gmane.org!not-for-mail From: Daniel Dehennin Newsgroups: gmane.emacs.gnus.general Subject: Configure the use of from header for epg signing. Date: Fri, 07 Jan 2011 18:29:01 +0100 Message-ID: <877heghbc2.fsf@hati.baby-gnu.org> References: <87y66wn972.fsf@broken.deisui.org> <874o9lehkl.fsf@gismo.pca.it> <87r5cpow4q.fsf@gismo.pca.it> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Trace: dough.gmane.org 1294421597 11787 80.91.229.12 (7 Jan 2011 17:33:17 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 7 Jan 2011 17:33:17 +0000 (UTC) Cc: Daiki Ueno , Luca Capello , 7797@debbugs.gnu.org, rfrancoise@debian.org, Ashish SHUKLA , To: ding@gnus.org Original-X-From: ding-owner+M23962@lists.math.uh.edu Fri Jan 07 18:33:10 2011 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1PbGBZ-00041e-ID for ding-account@gmane.org; Fri, 07 Jan 2011 18:33:09 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1PbGAT-0003lZ-Om; Fri, 07 Jan 2011 11:32:01 -0600 Original-Received: from mx1.math.uh.edu ([129.7.128.32]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1PbGAS-0003lR-HS for ding@lists.math.uh.edu; Fri, 07 Jan 2011 11:32:00 -0600 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx1.math.uh.edu with esmtp (Exim 4.72) (envelope-from ) id 1PbGAR-00072k-07 for ding@lists.math.uh.edu; Fri, 07 Jan 2011 11:32:00 -0600 Original-Received: from zion.baby-gnu.org ([82.233.222.74]) by quimby.gnus.org with esmtp (Exim 4.72) (envelope-from ) id 1PbGAP-0003Wg-1O for ding@gnus.org; Fri, 07 Jan 2011 18:31:57 +0100 Original-Received: from hati.asgardr.info ([192.168.1.2] helo=hati.baby-gnu.org) by zion.baby-gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1PbGAA-0003iA-EM; Fri, 07 Jan 2011 18:31:42 +0100 User-Agent: Gnus/5.110011 (No Gnus v0.11) Emacs/24.0.50 (gnu/linux) Organisation: Dark Church of Emacs X-Spam-Score: -1.9 (-) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:75611 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Here is a patch to make the use of from header conditional, this solve issue 1 in [1]. It can be fetched from my Gnus git repository [2]. I do not update the Changelog to avoid conflict, I think changelog can be automatically handled by hook when Lars pull in its branch ;-) This patch is tested by me. Regards. * lisp/mml2015.el (mml2015-use-from-address): New variable for optional from header use. (mml2015-epg-sign): Use it. (mml2015-epg-encrypt): Ditto. =2D-- lisp/mml2015.el | 12 ++++++++++-- 1 files changed, 10 insertions(+), 2 deletions(-) diff --git a/lisp/mml2015.el b/lisp/mml2015.el index 9831b33..dde8a08 100644 =2D-- a/lisp/mml2015.el +++ b/lisp/mml2015.el @@ -121,6 +121,12 @@ Whether the passphrase is cached at all is controlled = by :group 'mime-security :type '(repeat (string :tag "Key ID"))) =20 +(defcustom mml2015-use-from-address nil + "If t, use from header mail address before mml2015-signers when +signing." + :group 'mime-security + :type 'boolean) + (defcustom mml2015-encrypt-to-self nil "If t, add your own key ID to recipient list when encryption." :group 'mime-security @@ -960,7 +966,8 @@ Whether the passphrase is cached at all is controlled by (let* ((inhibit-redisplay t) (context (epg-make-context)) (boundary (mml-compute-boundary cont)) =2D (sender (message-options-get 'message-sender)) + (sender (if mml2015-use-from-address + (message-options-get 'message-sender))) signer-key (signers (or (message-options-get 'mml2015-epg-signers) @@ -1035,7 +1042,8 @@ If no one is selected, default secret key is used. " (let ((inhibit-redisplay t) (context (epg-make-context)) (config (epg-configuration)) =2D (sender (message-options-get 'message-sender)) + (sender (if mml2015-use-from-address + (message-options-get 'message-sender))) (recipients (message-options-get 'mml2015-epg-recipients)) cipher signers (boundary (mml-compute-boundary cont)) =2D-=20 1.7.2.3 Footnotes:=20 [1] http://lists.gnu.org/archive/html/bug-gnu-emacs/2011-01/msg00207.html [2] http://www.baby-gnu.org/~nebu/archives/gnus/gnus.git/ dad/mml2015-epg-= use-from-to-sign-if-configured =2D-=20 Daniel Dehennin R=C3=A9cup=C3=A9rer ma clef GPG: gpg --keyserver pgp.mit.edu --recv-keys 0x6A2540D1 --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (GNU/Linux) iEYEAREKAAYFAk0nTf4ACgkQb97L6l6P4Ftn6ACdEF6dZVdg+GabLxqW5opxK5rf hp0AniIRzhN09yflMd8kcI6g6Wh+BQwz =3/bh -----END PGP SIGNATURE----- --=-=-=--