Emacs: Crypto: How to get automatic encryption?

Jameson Graef Rollins jrollins at finestructure.net
Tue Jan 3 13:45:14 PST 2012


On Tue, 3 Jan 2012 20:56:51 +0100, Gregor Zattler <telegraph at gmx.net> wrote:
> I replied to a PGP/MIME signed and encrypted e-mail and was
> astonished to realise that my reply was sent unencrypted (and
> unsigened for that matter).

Yikes!  Sorry this happened, and I hope nothing too sensitive was
exposed.

Auto signing of outgoing mail can be enabled by the following [0]:

(add-hook 'message-setup-hook mml-secure-message-sign-pgpmime)

You can configure the message-setup-hook with the customization UI as
well.

Unfortunately, auto encrypting of replies to encrypted emails is not yet
implemented.  It is desperately needed, though, obviously.  So this is a
good excuse to start a discussion about how we could achieve this.

It just occurs to me that a way to do this would be to have notmuch
reply add the appropriate mml #secure tag for encryption to the output
reply template, maybe with something like a --emacs option.  That would
be pretty easy to implement, although it would obviously be very UI
specific.

Another possibility would be for notmuch reply to add some sort of
header to the reply message to indicate that the original was encrypted,
and then do something in emacs to try to read that header and add the
appropriate mml #secure tag.  That would also be easy to implement in
the notmuch CLI, and it would be more UI agnostic, but it would require
a lot more elisp.

Or maybe we could support both?

Any other suggestions?

> Actually the message buffer in which I write replies has Auto
> Encryption Mode enabled, but nothing happens.  

That's unfortunate.  Can you explain exactly how you set this up, and
how it didn't work?

> Till now I investigated customisable variables for notmuch,
> message mode, epg but did not find a way to tell Emacs to sign
> and encrypt an e-mail if the correspondent (signed and) and
> encrypted her/his e-mail.  

It's actually usually mml that is used with message-mode to
sign/encrypt message, not epg.

jamie.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20120103/48b52dd0/attachment.pgp>


More information about the notmuch mailing list