Subject: Re: [sup-talk] crypto-mode hook fragment to sign if from address can be signed

From: Tero Tilus <[email-masked]>
Date: Sat, 29 Jan 2011 20:50:54 +0200

Marc Hartstein, 2011-01-29 19:31:
> Posted to share if anybody else finds it useful

Throw it up to wiki

  http://sup.rubyforge.org/wiki/wiki.pl?GPG

Looks like there are other crypto-mode hook fragments at the end of
the page already.

-- 
Tero Tilus ## 050 3635 235 ## http://tero.tilus.net/
_______________________________________________
sup-talk mailing list
[email-masked]
http://rubyforge.org/mailman/listinfo/sup-talk

---

From: Marc Hartstein <[email-masked]>
Date: Sat, 29 Jan 2011 12:31:07 -0500

I wrote this crypto-mode hook fragment so sup will default to Sign when
it has selected a from address for the outgoing email for which I have a
key which can sign emails. I have an occasionally used address for
outgoing mail which is not associated with my private key and which only
posts to a mailing list which complains about signed email anyway, so
this makes my life easier.

Posted to share if anybody else finds it useful, and also to solicit
suggestions for improvements. It works as-is, but I'm neither a Ruby nor
GPG expert and wouldn't be surprised to learn there's a better way.

======================================================================
sign_addresses = `gpg -K`.grep(/<(.*)>/){$1}
crypto_selector.set_to :sign if not sign_addresses.select{|a| header["From"].include?(a) }.empty?
_______________________________________________
sup-talk mailing list
[email-masked]
http://rubyforge.org/mailman/listinfo/sup-talk