Ok, I know this is in the online manual but it's a bit ambiguous... it
basically says that "Hooks that act upon messages re evaluated in a
slightly different manner" (than anything else in the config file, I
guess). That statement is also followed with an incomplete sentence
making the whole thing slightly obtuse: "For the other types of hooks,
a regular expression."
What I am trying to do is use send-hooks (and the like) the set variables
with output from a pipe. Basically, it's the equivalent / rehash of the
old random signature idea... so, what we find immediately is that the
following works as a configuration parameter:
set signature="/usr/bin/cat /usr/home/russell/.signature |"
However, if you wanted to extend that to a send-hook, it barfs -- all of
the following fail:
send-hook . set signature="/usr/bin/cat /usr/home/russell/.signature |"
send-hook . set signature=`/usr/bin/cat /usr/home/russell/.signature`
send-hook . set signature='/usr/bin/cat /usr/home/russell/.signature |'
...the strangest thing about them is that they fail with errors like
"/usr/home/russell/.signature: unknown variable" and then proceed to
include the contents of /usr/bin/cat which, as you can imagine, looks
awful pretty in a text message (and is clearly not the intention nor
what one might expect).
The one that would seem most-plausible, of course, is:
send-hook . "set signature=`/usr/bin/cat /usr/home/russell/.signature`"
...which gives the error "M.: unknown variable" but does NOT try to
include the binary "cat" in the message contents. Weirder still is
that the following works fine:
send-hook . "set record=+sent-mail-`/bin/date +%Y-%m`"
It would seem that it should be possible to seed a configuration
parameter with the output of a binary pretty much with little exception.
Can someone help me understand why this is not necessarily possible?
(ie. am I just doing something profoundly "wrong" or...???)
Workaround:
Set the default in the config file and then, with send-hooks, set all
the other possibilities manually (perhaps a serious compromise).
-- begin
Mutt 0.95.4i (1999-03-03)
Copyright (C) 1996-8 Michael R. Elkins and others.
Mutt comes with ABSOLUTELY NO WARRANTY; for details type `mutt -vv'.
Mutt is free software, and you are welcome to redistribute it
under certain conditions; type `mutt -vv' for details.
System: SunOS 5.5.1
Compile options:
-DOMAIN
-HOMESPOOL -USE_SETGID +USE_DOTLOCK +USE_FCNTL -USE_FLOCK
-USE_IMAP -USE_POP +HAVE_REGCOMP -USE_GNU_REGEX +HAVE_COLOR +HAVE_PGP2
-BUFFY_SIZE
-EXACT_ADDRESS +ENABLE_NLS
SENDMAIL="/usr/lib/sendmail"
MAILPATH="/var/mail"
SHAREDIR="/usr/local/share/mutt"
SYSCONFDIR="/usr/local/etc"
ISPELL="/usr/local/bin/ispell"
_PGPPATH="/usr/local/bin/pgp"
_PGPV2PATH="/usr/local/bin/pgp"
To contact the developers, please mail to <[EMAIL PROTECTED]>.
-- end
--
Russell M. Van Tassell [EMAIL PROTECTED]
I love deadlines. I especially like the whooshing sound they make as
they go flying by.