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

Re: unable to use send2-hook / group pattern for automatic



Hi Kyle,

thank you very much for your help especially with respect to
infinite loops (I was traped in one).

* Kyle Wheeler <kyle-mutt@xxxxxxxxxxxxxx> [05. Nov. 2007]:
> Don't trigger the hook except on messages that are not already 
> signed/encrypted:
> 
>      send2-hook '!~g !~G ^%C gpg-full' 'push <pgp-menu>b'
> 
> Then, of course, you want to disable things if you have other non-pgp 
> recipients, so you need another hook:
> 
>      send2-hook '(~G|~g) !~%C gpg-full' 'push <pgp-menu>f'
                            ^                             ^
The "~" in the second hooks pattern is a typo: "^" is what I
need.  I now have:

   send-hook "." "set crypt_autosign=no"                                        
                   
   send-hook "." "set crypt_autoencrypt=no"
   send-hook "^%Cgpg-full" "set crypt_autosign=yes"
   send-hook "^%Cgpg-full" "set crypt_autoencrypt=yes"
   
   send2-hook '!~g !~G ^%C gpg-full' 'push <pgp-menu>b'
   send2-hook '(~G|~g) !^%C gpg-full' 'push <pgp-menu>c'

in my muttrc.  

> But that's relatively easy. The REALLY fancy stuff comes when you have 
> friends who are pine users and thus CANNOT use PGP-MIME and so require 
> *inline* pgp all the dang time. This is tough to do in mutt because 
> there's no pattern to match messages that use inline pgp signatures, 
> but it can be done. Any guesses how it's done? ;)
> 
> (hint: think $my_* variables)

Puh! That's over my head.  My correspondents have to cope with my
PGP/MIME formatted emails or I'll have to tweak this with
per-user settings for now.

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