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

unable to use send2-hook / group pattern for automatic encryption



Dear Mutt users,

I configured a group "gpg-full" which matches all emailaddresses
to which a valid gpg key exists in my keyring.  I'm able for
instance to search for emails matching %Cgpg-full in the index
and the scroll bar jumps to the next message which is addressed
to somebody who's gpg key I trust.

I want to use this group feature to switch encryption on and off
depending on emailaddresses:

send2-hook "." "set crypt_autosign=no"
send2-hook "." "set crypt_autoencrypt=no"
send2-hook "^%Cgpg-full" "set crypt_autosign=yes"
send2-hook "^%Cgpg-full" "set crypt_autoencrypt=yes"

Accroding to the fine manual "[...] patterns matching 'lists' of
addresses (notably c,C,p,P and t) match if there is at least one
match in the whole list. If you want to make sure that all
elements of that list match, you need to prefix your pattern with
^."  Therefore the pattern should only match emails which are
adressed only to fully trusted recipients.

The manual states: "send2-hook is matched every time a
message is changed, either by editing it, or by using the compose
menu to change its recipients or subject."  Therefore the
encryption status should be evaluated every time I edit the email.

But this does not happen: When I compose a new email with this
configuration encryption is enabled when I enter a adress which
is a member of the group gpg-full at the prompt.  But it is *not*
disabled when I add the address of a non-member later.  It is
also not enabled when I address an email to a non-member and
later exchange this non-member with the address of a member.

Could someone please enlight me what's wrong with this
send2-hooks?

Ciao, Gregor
-- 
 -... --- .-. . -.. ..--.. ...-.-