Hi,

I want to change some variables (from, crypt_autosign, etc.) in a hook
depending of which address I'm writing to. But as I don't want to
write a hook-line for each possible address, I'd like to use an
external program (such as grep) to look in multiple aliases files, and
return something depending of which alias file contains the address.

Ideally, I would then just "source `external_program`", where
external_program returns the name of a mutt conf file changing all
these variables.

« send2-hook . "source `external_program`" » does not work because
what is in `` is evaluated just one time, when mutt starts. To solve
this, I could use
« send2-hook . "source source_step" », where the file 'source_step'
contains one single line : « source `external_program` ». Then
'external_program' is run each time send2-hook is evaluated.

My problem is that I need to pass this external_program the address
I'm writing to. And of course, `external_program ~t` does not work.


Things are getting complicated. Is there a way to do that in mutt, or
do I have to look for patches?

An ugly way would be to write a script that reads the aliases files
and writes all the hook-lines. Dozens of hooks lines... I don't like
it.

Reply via email to