[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: mutt sucks



On Wed, Sep 07, 2005 at 09:32:31AM +0100, Dave Ewart wrote:
> Alternatively, you could write a short script which reads the output
> of "gpg --list-keys" and writes out part of your ~/.muttrc with hooks
> to 'always encrypt' for those users.

That sounds like an idea - you could generate a list of send-hook
commands. Here's an example using autosign rather than encrypt:

----

# in muttrc:
send-hook . 'unset pgp_autosign'
source autosigners.muttrc

# in autosigners.muttrc.in:
send-hook REGEXP 'set pgp_autosign'

# in Makefile
autosigners.muttrc: autosigners.muttrc.in list
	sh generate.sh <list >autosigners.muttrc
list:
	gpg --list-keys | <do something useful> > list

# in generate.sh
for i in `cat list`; do cpp -DREGEXP=$i autosigners.muttrc.in; done

----

(loosely adapted from something else; will need some fixing)

> I don't think there's any reliable way to deal with the situation
> where a message sent is to multiple recipients, some of whom you have
> keys for and some of whom you do not, though.

In that situation, it'd be pointless to encrypt the message for anyone,
since it would be going out on-the-clear at some point.

-- 
Jon Dowland
http://jon.dowland.name/



Reply to: