From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-2.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_MED,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.4 Received: from mx1.math.uh.edu (mx1.math.uh.edu [129.7.128.32]) by inbox.vuxu.org (Postfix) with ESMTP id E731C21406 for ; Mon, 2 Dec 2024 19:38:44 +0100 (CET) Received: from lists1.math.uh.edu ([129.7.128.208]) by mx1.math.uh.edu with esmtps (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.98) (envelope-from ) id 1tIBJj-00000007cMW-2Dn5 for ml@inbox.vuxu.org; Mon, 02 Dec 2024 12:38:43 -0600 Received: from lists1.math.uh.edu ([127.0.0.1] helo=lists.math.uh.edu) by lists1.math.uh.edu with smtp (Exim 4.97.1) (envelope-from ) id 1tIBJg-00000007ScT-45O8 for ml@inbox.vuxu.org; Mon, 02 Dec 2024 12:38:41 -0600 Received: from mx2.math.uh.edu ([129.7.128.33]) by lists1.math.uh.edu with esmtp (Exim 4.97.1) (envelope-from ) id 1tHTuO-00000007OhE-2702 for ding@lists.math.uh.edu; Sat, 30 Nov 2024 14:17:40 -0600 Received: from quimby.gnus.org ([95.216.78.240]) by mx2.math.uh.edu with esmtps (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.98) (envelope-from ) id 1tHTuJ-000000050dW-2v4p for ding@lists.math.uh.edu; Sat, 30 Nov 2024 14:17:40 -0600 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnus.org; s=20200322; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID :Date:References:In-Reply-To:Subject:Cc:To:From:Sender:Reply-To: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=VUuu2gQIEQjev9V6C65pwlwhw4NC6oKhFwEYGoyNzmA=; b=lJpye9TsnQ7tdjIxdyu0QRQ+Z2 as22IlNcQg/fOey+AQ0iqz0QWcZGeogFkgKZ+rsBsAXFp/nKu2yU9LQXksDo28hf7JJhe6RCPcQly VXAA0x+bwYG54+CwCwf60FuXWONS/QEqpFAEsXadRqGR4Q47H16c0TgLukTWX9Ic5shU=; Received: from mail-lj1-x236.google.com ([2a00:1450:4864:20::236]) by quimby.gnus.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1tHTuD-0008JD-ER for ding@gnus.org; Sat, 30 Nov 2024 21:17:31 +0100 Received: by mail-lj1-x236.google.com with SMTP id 38308e7fff4ca-2ffc1f72a5bso30022051fa.1 for ; Sat, 30 Nov 2024 12:17:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1732997848; x=1733602648; darn=gnus.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=VUuu2gQIEQjev9V6C65pwlwhw4NC6oKhFwEYGoyNzmA=; b=UdS4ZFn2M7b+IImj7dkp53Wx3Lo6E2ha7ISKvvRu+slt48xoLKwW9KNqZbeR2DrxVl HqL/HHv6HF7PcmW/3jKwWymO5ZcqN3vRVAnxqKf5kBHh69s8wkFGS0zPrzJFR6N4HJm1 u4FATp+JafvlBpIslksSCF6Uqn0/RbcQJzLW8B1f5tVCjH5iOeoCcrJ27GPf326XC1Dy XvgZCee3kwbX7xojuhBWTeswP5dZm7oBiY7klYI/H2C/6Gcno6vmXNk6Y8jaSIRM7s6F fQMZxuLYOjqhLLiMLr+bDiZCVPX+7RtGZhiahIQnSMrNfASz0gF3I1oZ4Z+d7vxDd4DY THxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732997848; x=1733602648; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=VUuu2gQIEQjev9V6C65pwlwhw4NC6oKhFwEYGoyNzmA=; b=Cle3OSep3Y3gFxg6FpYK56e8YoT8xNbBxrxFE+RvNK2RFNO8sY935Qh5Lpk04i+E9G 3Up7viFYkmiUKbQJ8hMa75YCtcsdDt7+lbGNZgi+OHBJQkRQKM5bcvquC+Ixd265NirN E9h4pGDCTE0OxBeCqRS6Ymyen9nPLISp9JtJenT7Y5ElR40Fqs4e3IQsdkF2b3k2ZSwP cAgW6v2qE0jJHKT4M+MtLcGO3MNL2NHoZoKgcpG7FgFUS6OJrGUv9GRfFUjDVtMc60PB QGhyowSJlo9vbY/EzXpdPOJ/jOeg9MKOfXfMXnQqtPBWzoSodp5ISBwoAlEy+ke/MoY0 s6PA== X-Gm-Message-State: AOJu0YyJoaGas/OLWdqpU4ubNR4PHNLmNPHlGm+6Lxr+sV2sNX0nQE9R z+Bz6xNzKaz8LlGid/F+fsObs/o3c1Jrd2zo2AqSaVqAikrhPmUkB5PCQS3ErP8= X-Gm-Gg: ASbGncvXNlIdjQy5T7uJ68VMUyB/fjibE10/XGE3pTJ5R/OSUClo7OoeRhuVllf7ahY cyNUePjBpucd5BXOOxdHmFF7BBrntBea/uUCzjpVC4cy4tzbqZQqG3mRG361VyWx2CFxLlTsQd/ LFwZ8M1Y0SPGbyCHunGl9/RIWDNWiRn/QPsJQLHBrBGjcGE081ME18eu1DwX+zNzg8zJHKXHw9Z TV6TFyjPS4KJsOrnSdvDs89X2TAf8KaJQgNTQ+e0GqTSRPtqfOk8jC48knZNQfA6+Zu7cDDeSg= X-Google-Smtp-Source: AGHT+IHWiTRFesXwIAUZDMMej62ezczJjumRbb182Wt8r8Jjrj86oi+f5otr3oZ7BeJ0n/7e4W/1vQ== X-Received: by 2002:a2e:a98a:0:b0:2fb:5a42:da45 with SMTP id 38308e7fff4ca-2ffde23e531mr42664831fa.16.1732997846988; Sat, 30 Nov 2024 12:17:26 -0800 (PST) Received: from trevarch (109-252-33-82.nat.spd-mgts.ru. [109.252.33.82]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-2ffdfccdab3sm7703721fa.124.2024.11.30.12.17.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 30 Nov 2024 12:17:25 -0800 (PST) From: Trevor Arjeski To: =?utf-8?Q?Bj=C3=B8rn?= Mork Cc: ding@gnus.org Subject: Re: What's the best way to auto-sign some emails but not all? In-Reply-To: <87o71wikra.fsf@miraculix.mork.no> (=?utf-8?Q?=22Bj=C3=B8rn?= Mork"'s message of "Sat, 30 Nov 2024 20:28:41 +0100") References: <871pyuksd7.fsf@miraculix.mork.no> <87jzckmv6k.fsf@gmail.com> <87o71wikra.fsf@miraculix.mork.no> Date: Sat, 30 Nov 2024 23:17:23 +0300 Message-ID: <87frn8mq7g.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable List-ID: Precedence: bulk Bj=C3=B8rn Mork writes: > Trevor Arjeski writes: >> Bj=C3=B8rn Mork writes: >> >>> Is there a nice way to always sign emails based on e.g. the current From >>> address? I don't want to sign everything, but I would like to sign all >>> emails I send from one specific address. >> >> Hi Bj=C3=B8rn, >> >> For me, I am signing all messages and just removing the "secure" tag >> when I am writing on a mailing list or something. > > Yes, that's a possibilty. But do hate manual procedures for anything > that can be automated. And knowing myself, I am going to forget this > 47% of the time. I'll remember it if the passphrase box shows up. But > I don't want to disable caching, and I am sure that will result in some > emails going out with an unwanted gpg signature. Not a big problem, > maybe. But we're looking for the perfect solution here :-) Of course! I wasn't suggesting it for you, just leading up to the hook. > >> I do this by adding a hook on `message-setup-hook' that calls >> `mml-secure-message-encrypt'. >> >> Therefore, you can add a similar hook with the help of a function (or >> just lambda), for example: >> >> #+BEGIN_SRC emacs-lisp >> (defun my/mml-secure-message-encrypt () >> "Encrypt all messages when we are sending as bjorn@mork.no. Do nothing >> for all other From addresses." >> (when (string=3D message-sendmail-envelope-from >> "bjorn@mork.no") >> (mml-secure-message-encrypt))) >> >> (add-hook 'message-setup-hook #'my/mml-secure-message-encrypt) >> #+END_SRC >> >> Let me know if that is what you want or helps at all. > > Thanks a lot! It does not work any better, but at least it shows me how > easy adding a hook would be. > > And it also made me look at how the gnus posting styles are implemented. > > I tried your suggestion with message-sendmail-envelope-from replaced by > user-mail-address, since SPF prevents me from changing the envelope > along with the from address. > > Unfortunately, this works exacly like using "body" or "eval" in a > posting style. It's fine with an empty buffer, but not when replying > with quoted text. Which isn't surprising after having looked at > gnus-configure-posting-styles in gnus-msg.el. My mistake, I completely missed that you only want to sign certain parts of the message. (also I wrote -encrypt instead of -sign in the function) Ignore me! Trevor