<<< Date Index >>>     <<< Thread Index >>>

Re: Conditionally removing signature



Hi,

* Kyle Wheeler wrote:

> Actually, I do something slightly different:

>      send-hook .             'set crypt_autoencrypt=no'
>      send-hook '!~G ^%C pgp' 'set crypt_autoencrypt=yes'

> Then, in my aliases file, I tag people that I want to encrypt things 
> to, like so:

>      alias -group pgp john <joe@xxxxxxxxxxx> (John Doe)

> Thus, if the only recipients of a message are those who I know can 
> handle encryption, I use encryption.

Nice. Toying with this leads me to:

      send-hook .             'set crypt_autoencrypt=no'
      send-hook '!~G ^%C gpg' 'set crypt_autoencrypt=yes'
      source ~/gpg.py|

where gpg.py is the attached script (in case anyone finds it useful). It
adds a line like to this to the config:

      alias -group gpg user1@xxxxxxxxxxx user1@xxxxxxxxxxx \
                       user1@xxxxxxxxxxx user1@xxxxxxxxxxx \
                       ...

for all email addresses in the user's keyring. Though it may get a
little slow with many mail addresses, this a working way to implement
"automatically encrypt if all recipients have a public key" that many
people ask for.

Rocco

Attachment: pgpTf8Evs2KAD.pgp
Description: PGP signature