From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 06 19:11:39 2020 Received: (at submit) by debbugs.gnu.org; 7 Mar 2020 00:11:39 +0000 Received: from localhost ([127.0.0.1]:46027 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jAN47-0007FI-DB for submit@debbugs.gnu.org; Fri, 06 Mar 2020 19:11:39 -0500 Received: from lists.gnu.org ([209.51.188.17]:38997) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jAN46-0007FA-FT for submit@debbugs.gnu.org; Fri, 06 Mar 2020 19:11:38 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:42693) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jAN44-00013S-VM for bug-gnu-emacs@gnu.org; Fri, 06 Mar 2020 19:11:38 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.7 required=5.0 tests=BAYES_40,FREEMAIL_FROM, RCVD_IN_DNSWL_LOW,SPOOFED_FREEMAIL,URIBL_BLOCKED autolearn=disabled version=3.3.2 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jAN43-0006BA-Ms for bug-gnu-emacs@gnu.org; Fri, 06 Mar 2020 19:11:36 -0500 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:57437) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jAN43-00060u-Dp for bug-gnu-emacs@gnu.org; Fri, 06 Mar 2020 19:11:35 -0500 Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id 488592235E; Fri, 6 Mar 2020 19:11:33 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Fri, 06 Mar 2020 19:11:33 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=warpmail.net; h= from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; s=fm2; bh=oAF2W58xPnpiGZEhjt7JqWOh9s Gnsnvy6yqoSRwqSg0=; b=CxgilP0Z138G5HAEFxxcignuBg+0xQCMvNLTMoZVZU v3QyWBlcsDrLAB94VX+fk82FslNJyVPK3dS494ZaBuceKm/SS2bMUb/8AiuMTbYe dlg1xtToX7QNhYN/XJw161igE6gzD+RoBupiYIUQO8qKdWgoTTw9GG880RY874+U x/PH9G/+41TKofGV3FAPRbBcJsJCxTaWAxWH0kACaGbRWMdCBqBxDLn4pX5k8fN4 1leGkIQebGUGfB9c8HAx3JOnmJ45nphq5g5vQmQFEsCeSxJtZTiiPEDyuCGOO+Ce lbGOhQmwmLkUAvvA9LkSmQkMzWSb1jviD2LdCmGetTUw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :message-id:mime-version:subject:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=oAF2W58xPnpiGZEhj t7JqWOh9sGnsnvy6yqoSRwqSg0=; b=XJcEcQQliScikhfDijownKDM+MiRagdT6 QZEVWoAr3/cyyC/djWvBrqfWfxaO5nhXjw1Nk6vrPOjkYwUoWjD2+YGGcDL8myqS d0cgytdAxuaVGnWvmWnjOhDpnlLY3vaO22wzLHIeagSeL8EQ3OB3vDngWHqJR1fo 4/SfTVae8tvoG5UlBhDLar6jixB+oFAJJdiyeJLwiCfLwH89F7HacPN8r42t9HFk BVHv6WPO6Lo5rTEZZXZtBl8A56koCTnyuNNl5GcRMkZHNG41TB8QH9YWqpScTfo3 85I7alfnjqYElihXA505kz05k4203fiCw4HaghbGhx2mb7/wWirZg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedugedruddufedgvddtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkofgggfestdekredtre dttdenucfhrhhomheprfhhihhlihhpucfmuceophhhihhlihhpseifrghrphhmrghilhdr nhgvtheqnecuffhomhgrihhnpehivghtfhdrohhrghenucfkphepjeelrddvudelrddule efrddukeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhm pehphhhilhhiphesfigrrhhpmhgrihhlrdhnvght X-ME-Proxy: Received: from localhost (p4fdbc112.dip0.t-ipconnect.de [79.219.193.18]) by mail.messagingengine.com (Postfix) with ESMTPA id 3DDCE30612AF; Fri, 6 Mar 2020 19:11:32 -0500 (EST) From: Philip K To: bug-gnu-emacs@gnu.org Subject: [PATCH] Add support for creating OpenPGP header Date: Sat, 7 Mar 2020 01:11:28 +0100 Message-Id: <20200307001128.10698-1-philip@warpmail.net> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 66.111.4.28 X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: submit Cc: Philip K X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) From: Philip K See [0] for more details on it's usage and interpretation. [0]: https://tools.ietf.org/html/draft-josefsson-openpgp-mailnews-header --- lisp/gnus/message.el | 57 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index adefa0efd6..1c9c99afbe 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el @@ -2730,6 +2730,63 @@ message-sign-encrypt-if-all-keys-available (when (message-all-epg-keys-available-p) (mml-secure-message-sign-encrypt))) +(defcustom message-openpgp-header nil + "Specification for \"OpenPGP\" header. + +Otherwise, the variable must be a +list with three elements, all strings: +- Key ID, in hexadecimal form +- Key URL or ASCII armoured key. +- Protection preference, one of: \"unprotected\", \"sign\", + \"encrypt\" or \"signencrypt\". + +Each value may be nil, in which case it won't be inserted. If all +the values are nil, or `message-openpgp-header' is nil itself, +don't insert any header." + :type '(choice + (const nil :tag "Don't add OpenPGP header") + (list (choice (string :tag "ID") + (const nil :tag "No ID")) + (choice (string :tag "Key") + (const nil :tag "No Key")) + (choice (other nil :tag "None") + (const "unprotected" :tag "Unprotected") + (const "sign" :tag "Sign") + (const "encrypt" :tag "Encrypt") + (const "signencrypt" :tag "Sign and Encrypt"))))) + +(defun messasge-add-openpgp-header () + "Add OpenPGP header to point to public key. + +Header will be constructed as specified in `message-openpgp-header'. + +Consider adding this function to `message-send-hook'." + ;; See https://tools.ietf.org/html/draft-josefsson-openpgp-mailnews-header + (when (and message-openpgp-header + (or (nth 0 message-openpgp-header) + (nth 1 message-openpgp-header) + (nth 2 message-openpgp-header))) + (with-temp-buffer + (insert "OpenPGP: ") + ;; add ID + (let (need-sep) + (when (nth 0 message-openpgp-header) + (insert "id=" (nth 0 message-openpgp-header)) + (setq need-sep t)) + ;; add URL + (when (nth 1 message-openpgp-header) + (when need-sep (insert "; ")) + (if (string-match-p ";") + (insert "url=\"" (nth 1 message-openpgp-header) "\"") + (insert "url=\"" (nth 1 message-openpgp-header) "\"")) + (setq need-sep t)) + ;; add preference + (when (nth 2 message-openpgp-header) + (when need-sep (insert "; ")) + (insert "preference=" (nth 2 message-openpgp-header)))) + ;; insert header + (message-add-header (buffer-string))))) + ;;; -- 2.20.1 From debbugs-submit-bounces@debbugs.gnu.org Sat Mar 07 02:53:20 2020 Received: (at 39964) by debbugs.gnu.org; 7 Mar 2020 07:53:20 +0000 Received: from localhost ([127.0.0.1]:46198 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jAUGu-0001Di-3u for submit@debbugs.gnu.org; Sat, 07 Mar 2020 02:53:20 -0500 Received: from eggs.gnu.org ([209.51.188.92]:49268) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jAUGs-0001DV-Ff for 39964@debbugs.gnu.org; Sat, 07 Mar 2020 02:53:18 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:35954) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1jAUGn-0002in-9u; Sat, 07 Mar 2020 02:53:13 -0500 Received: from [176.228.60.248] (port=3102 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1jAUGm-00006t-Ph; Sat, 07 Mar 2020 02:53:13 -0500 Date: Sat, 07 Mar 2020 09:53:12 +0200 Message-Id: <8336akbnyv.fsf@gnu.org> From: Eli Zaretskii To: Philip K In-Reply-To: <20200307001128.10698-1-philip@warpmail.net> (message from Philip K on Sat, 7 Mar 2020 01:11:28 +0100) Subject: Re: bug#39964: [PATCH] Add support for creating OpenPGP header References: <20200307001128.10698-1-philip@warpmail.net> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 39964 Cc: philip.kaludercic@fau.de, 39964@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) > From: Philip K > Date: Sat, 7 Mar 2020 01:11:28 +0100 > Cc: Philip K > > +(defcustom message-openpgp-header nil > + "Specification for \"OpenPGP\" header. This defcustom lacks the :version tag. Also, please always accompany user-visible changes with a suitable NEWS entry and changes for the relevant Info manual. Thanks. From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 08 09:50:51 2020 Received: (at 39964) by debbugs.gnu.org; 8 Aug 2020 13:50:51 +0000 Received: from localhost ([127.0.0.1]:58537 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k4PFH-0004Mm-NV for submit@debbugs.gnu.org; Sat, 08 Aug 2020 09:50:51 -0400 Received: from quimby.gnus.org ([95.216.78.240]:52210) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k4PFE-0004MW-Sa for 39964@debbugs.gnu.org; Sat, 08 Aug 2020 09:50:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=eh+akPvtn+VPJDlLRjuf3or9162pfK7asi0CoxKBWzA=; b=bttFptax17RGCXOWj9754V+pzS d0S63Xuy4m49+yAURyZuYU75lgegieZPHjsjNeM2FGKjf85P95mNppqlWBfEpXXLGZ8k/ikg1bj/x wxFjAS55VMgdMej9oErYiZtsIwVWUnRPp9IFByfBZJy1QAiQsJpzslZhL13LWkUh9UA8=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1k4PF5-000560-C9; Sat, 08 Aug 2020 15:50:38 +0200 From: Lars Ingebrigtsen To: Philip K Subject: Re: bug#39964: [PATCH] Add support for creating OpenPGP header References: <20200307001128.10698-1-philip@warpmail.net> Date: Sat, 08 Aug 2020 15:50:33 +0200 In-Reply-To: <20200307001128.10698-1-philip@warpmail.net> (Philip K.'s message of "Sat, 7 Mar 2020 01:11:28 +0100") Message-ID: <87imdtz1p2.fsf@gnus.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: Philip K writes: > From: Philip K > > See [0] for more details on it's usage and interpretation. > > [0]: https://tools.ietf.org/html/draft-josefsson-openpgp-mailnews-header Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 39964 Cc: Philip K , 39964@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Philip K writes: > From: Philip K > > See [0] for more details on it's usage and interpretation. > > [0]: https://tools.ietf.org/html/draft-josefsson-openpgp-mailnews-header [...] > +(defcustom message-openpgp-header nil > + "Specification for \"OpenPGP\" header. Thanks; I've applied your patch to Emacs 28 (along with additions suggested by Eli). -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no From debbugs-submit-bounces@debbugs.gnu.org Sat Aug 08 09:50:52 2020 Received: (at control) by debbugs.gnu.org; 8 Aug 2020 13:50:52 +0000 Received: from localhost ([127.0.0.1]:58540 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k4PFM-0004N5-DA for submit@debbugs.gnu.org; Sat, 08 Aug 2020 09:50:52 -0400 Received: from quimby.gnus.org ([95.216.78.240]:52222) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1k4PFL-0004Mf-CY for control@debbugs.gnu.org; Sat, 08 Aug 2020 09:50:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Subject:From:To:Message-Id:Date:Sender:Reply-To:Cc: MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=JE5I9AiSVQUnr2W7NB103IEut+VkudbYWshEqP6kY5A=; b=mVlA+1haCLrnB8D4Y2vstwlpb2 HYPSlISrwJGSViY3zYyTXAjdTciu2UmVYckUp5d4U+wV1TSTd4cTeGNSejdDgC9FMn5Ndo+ZBim5f 6knMqdMid0AJ4MslUm02LbveFz4lLrJfUcMTUMLCkxUx1tIUcoCwzj7mlHwumT4g9mH4=; Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=xo) by quimby with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1k4PFD-000569-Lb for control@debbugs.gnu.org; Sat, 08 Aug 2020 15:50:45 +0200 Date: Sat, 08 Aug 2020 15:50:42 +0200 Message-Id: <87h7tdz1ot.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #39964 X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see @@CONTACT_ADDRESS@@ for details. Content preview: tags 39964 fixed close 39964 28.1 quit Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) tags 39964 fixed close 39964 28.1 quit From unknown Mon Aug 18 11:16:56 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 06 Sep 2020 11:24:07 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator