From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H2 autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 13769 invoked from network); 3 Nov 2022 18:55:34 -0000 Received: from lists.gnu.org (209.51.188.17) by inbox.vuxu.org with ESMTPUTF8; 3 Nov 2022 18:55:34 -0000 Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oqfN6-0003Jp-OD; Thu, 03 Nov 2022 14:55:24 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oqfN4-0003Go-MH for info-gnus-english@gnu.org; Thu, 03 Nov 2022 14:55:22 -0400 Received: from mout-u-204.mailbox.org ([80.241.59.204]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim 4.90_1) (envelope-from ) id 1oqfMp-0000hR-Ip for info-gnus-english@gnu.org; Thu, 03 Nov 2022 14:55:22 -0400 Received: from smtp202.mailbox.org (smtp202.mailbox.org [IPv6:2001:67c:2050:b231:465::202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-u-204.mailbox.org (Postfix) with ESMTPS id 4N3CcR54m2z9sS4; Thu, 3 Nov 2022 19:55:03 +0100 (CET) From: Jens Lechtenboerger To: Angel de Vicente Cc: info-gnus-english@gnu.org Subject: Re: Signing a message with S/MIME in Gnus? References: <871qql9021.fsf@gmail.com> <87r0yl41ie.fsf@informationelle-selbstbestimmung-im-internet.de> <87leotw05b.fsf@gmail.com> <87y1ss1pls.fsf@informationelle-selbstbestimmung-im-internet.de> <87tu3gy04f.fsf@gmail.com> Mail-Followup-To: Angel de Vicente , info-gnus-english@gnu.org Date: Thu, 03 Nov 2022 19:55:02 +0100 In-Reply-To: <87tu3gy04f.fsf@gmail.com> (Angel de Vicente's message of "Thu, 03 Nov 2022 07:21:04 +0000") Message-ID: <87sfizyik9.fsf@informationelle-selbstbestimmung-im-internet.de> MIME-Version: 1.0 Content-Type: text/plain X-Rspamd-Queue-Id: 4N3CcR54m2z9sS4 Received-SPF: softfail client-ip=80.241.59.204; envelope-from=jens.lechtenboerger@fsfe.org; helo=mout-u-204.mailbox.org X-Spam_score_int: -11 X-Spam_score: -1.2 X-Spam_bar: - X-Spam_report: (-1.2 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_SOFTFAIL=0.665 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: info-gnus-english@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Announcements and discussions for GNUS, the GNU Emacs Usenet newsreader \(in English\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "info-gnus-english" Errors-To: info-gnus-english-bounces+ml=inbox.vuxu.org@gnu.org On 2022-11-03, at 07:21, Angel de Vicente wrote: > So, I was actually thinking of going for the second option: use SMIME > when I send from the address in the certificate, and use PGP when > sending from this gmail address. But now I need to figure out how to > tell Gnus to do that. Right now I have the following, which makes sure > that by default I will be always signing with SMIME. Do you know if > there is an easy way to set these depending on the "From" address? > > ,---- > | (add-hook 'gnus-message-setup-hook 'mml-secure-message-sign-smime) > | (setq mml-secure-method "smime") > `---- This might be possible with Posting Styles if your e-mails with different senders are in different groups. See variable gnus-posting-styles and the info page to which it points. To me, the following part seems promising. Note that the body string could be a function call that produces a secure tag. ((posting-from-work-p) ;; A user defined function (signature-file "~/.work-signature") (address "user@bar.foo") (body "You are fired.\n\nSincerely, your boss.") ("X-Message-SMTP-Method" "smtp smtp.example.org 587") (organization "Important Work, Inc")) Best wishes Jens