* [sup-talk] crypto-mode hook fragment to sign if from address can be signed
@ 2011-01-29 17:31 Marc Hartstein
2011-01-29 18:50 ` Tero Tilus
0 siblings, 1 reply; 2+ messages in thread
From: Marc Hartstein @ 2011-01-29 17:31 UTC (permalink / raw)
To: sup-talk
[-- Attachment #1.1: Type: text/plain, Size: 822 bytes --]
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?
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
[-- Attachment #2: Type: text/plain, Size: 140 bytes --]
_______________________________________________
sup-talk mailing list
sup-talk@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-talk
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [sup-talk] crypto-mode hook fragment to sign if from address can be signed
2011-01-29 17:31 [sup-talk] crypto-mode hook fragment to sign if from address can be signed Marc Hartstein
@ 2011-01-29 18:50 ` Tero Tilus
0 siblings, 0 replies; 2+ messages in thread
From: Tero Tilus @ 2011-01-29 18:50 UTC (permalink / raw)
To: Sup users
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
sup-talk@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-talk
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-01-29 18:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-29 17:31 [sup-talk] crypto-mode hook fragment to sign if from address can be signed Marc Hartstein
2011-01-29 18:50 ` Tero Tilus
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox