From: James Thomas <jimjoe@gmx.net>
To: ding@gnus.org
Subject: Re: What's the best way to auto-sign some emails but not all?
Date: Sun, 08 Dec 2024 10:35:45 +0530 [thread overview]
Message-ID: <86frmyvk5y.fsf@gmx.net> (raw)
In-Reply-To: <871pyuksd7.fsf@miraculix.mork.no> (=?utf-8?Q?=22Bj=C3=B8rn?= Mork"'s message of "Fri, 29 Nov 2024 15:49:08 +0100")
Bjørn Mork <bjorn@mork.no> 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.
>
> I'm using gnus-posting-styles to automatically set up things like from
> address, default headers and signature based on context. But I can't
> figure out how to enable automatic signing. A simple approach like
> adding
>
> (body "<#secure method=pgpmime mode=sign>")
>
> to an existing posting style rule sort of works. But it fails on
> replies with quoted original text. The body text end up between the
> quoted text and the signature, which obviously makes sense for any
> real
> body. But the mml tag is not recognised and is sent verbatim.
>
> I tried adding the tag in more complicated ways, using posting style
> eval and a function inserting the mml tag on the first line of the
> body.
> But the message buffer is always empty when this runs, so that doesn't
> work any better. The tag still ends up the same place.
>
> I guess I'm looking at this the wrong way. But I'm stuck.
>
> (My elisp skills are extremely limited, so I didn't want to
> re-implement
> the posting style context matching in a sending hook or similar.
> That's
> way out of my league)
This seems to work:
(setq gnus-posting-styles
'((t
(eval (setq-local message-cite-reply-position 'above))
(body "<#secure method=pgpmime mode=sign>"))))
Regards,
James
next prev parent reply other threads:[~2024-12-08 5:06 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-29 14:49 Bjørn Mork
2024-11-30 18:29 ` Trevor Arjeski
2024-11-30 19:28 ` Bjørn Mork
2024-11-30 20:17 ` Trevor Arjeski
2024-12-02 15:11 ` Bjørn Mork
2024-12-03 10:35 ` Björn Bidar
2024-12-03 11:36 ` Bjørn Mork
2024-12-03 20:38 ` Björn Bidar
2024-12-01 3:58 ` Sean Whitton
2024-12-01 23:04 ` Björn Bidar
2024-12-01 23:43 ` Bob Newell
2024-12-08 5:05 ` James Thomas [this message]
2024-12-08 13:22 ` Bjørn Mork
2024-12-08 21:03 ` James Thomas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=86frmyvk5y.fsf@gmx.net \
--to=jimjoe@gmx.net \
--cc=ding@gnus.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).