Gnus development mailing list
 help / color / mirror / Atom feed
From: "Bjørn Mork" <bjorn@mork.no>
To: ding@gnus.org
Subject: What's the best way to auto-sign some emails but not all?
Date: Fri, 29 Nov 2024 15:49:08 +0100	[thread overview]
Message-ID: <871pyuksd7.fsf@miraculix.mork.no> (raw)

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)


Bjørn


             reply	other threads:[~2024-11-29 14:49 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-11-29 14:49 Bjørn Mork [this message]
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
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=871pyuksd7.fsf@miraculix.mork.no \
    --to=bjorn@mork.no \
    --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).