Re: how to do something automatically on sending a message to specific recipients
On Sat, Apr 09, 2005 at 09:08:03AM +1000, Troy Piggins wrote:
> * Chris McCraw <fool@xxxxxxxxxxxxx> :
> <snip>
> > i need to filter messages sent to a certain recipient--she has a significant
> > amount of difficulty in reading my messages unless they are perfectly
> > capitalized and punctuated. i do not wish to filter every message i send,
> > though. my ideal solution to this appeared to be (in my .muttrc):
> >
> > send-hook '~t recipient@xxxxxxxxxxx' filter-entry /u/fool/filter.pl
> <snip>
> > i have verified the correct functioning of filter.pl when invoked via
> > 'F' from the compose context, but i need this to work just in the context
> > of that one recipient (it would be nice if it caught cc:'s to her, but if
> > it doesn't, that's life).
>
> According to the muttrc man page, the pattern ~C matches To: or Cc:,
> and have you tried quotation marks around the command part of the
> send-hook?
>
> send-hook '~C recipient@xxxxxxxxxxx' 'filter-entry /u/fool/filter.pl'
>
> I do not use this filter.pl you talk of, but I have send-hooks of
> similar format and this works for me.
(i changed mine to use ~C and quote the command, but even so...)
unfortunately, this is what happens:
after entering the recipient@xxxxxxxxxxx and subject of a message, as
mutt is invoking my editor, it reports:
filter-entry: unknown command
in the status bar and then goes on to send the message without filtering
my mail. filter.pl is just a fairly simple perl script that behaves as
such:
% echo "testing this. and that." | /u/fool/filter.pl
Testing this. And that.
%
filter.pl is world-readable/executable, and i am trying this with mutt-1.5.6i
can you show me an actual example of filter-entry (or whatever the correct
equivalent turns out to be) usage with send-hook?