Kudos! Also: +1 PGP!

Sebastian Spaeth Sebastian at SSpaeth.de
Mon Apr 26 06:52:37 PDT 2010


We were discussing on IRC whether decryption should be handled in
notmuch show --decrypt or in emacs and I had a quick look at what it
would take for emacs. Here is a snippet of code that outputs
"Good signature from 5585F58CC827A062 Sebastian Spaeth (Private
Communication) <Sebastian at SSpaeth.de> (trust ultimate) created at
2010-04-26T14:27:07+0200 using DSA" in the minibuffer. I guess something
based on this could be used to parse the email and try to decrypt via gpg
and mark the signature status in the summary line:

(save-excursion 
  (let ((context (epg-make-context))
        (signature "-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iEYEARECAAYFAkvVhpsACgkQVYX1jMgnoGJx4wCfXYKGdlc6HixqGwvWL4E+9t+M
QusAnA97NGdSLBFH6LeS3F8x3tAMd8td
=2nbO
-----END PGP SIGNATURE-----")
                (signed-text "
teste
"))
    (epg-verify-string context signature signed-text)
    (let ((result (epg-context-result context)))
      (message (epg-verify-result-to-string (cdr (car result))))
      )))
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20100426/80d94497/attachment.pgp>


More information about the notmuch mailing list