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

Re: how to do something automatically on sending a message to specific recipients



* On Mon, Apr 11, 2005 Chris McCraw (fool@xxxxxxxxxxxxx) muttered:
> On Sat, Apr 09, 2005 at 09:08:03AM +1000, Troy Piggins wrote:
> > * Chris McCraw <fool@xxxxxxxxxxxxx> :
> > > i need to filter messages sent to a certain recipient
> > > 
> > >   send-hook '~t recipient@xxxxxxxxxxx' filter-entry /u/fool/filter.pl
> > 
> > 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.
> 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?

why not use a macro?

macro compose ,F '<enter-command>unset 
wait_key<enter><filter-entry>/u/fool/filter.pl<enter>y<enter-command>set 
wait_key<enter>'

send-hook '~C recipient@xxxxxxxxxxx' 'push ,F'

HTH,

Michael
-- 
An elephant is a mouse with an operating system.

GPG Key ID: 0xDC1A44DD