On Tue, Aug 04, 2009 at 10:58:32PM -0500, Kyle Wheeler wrote:
> On Tuesday, August  4 at 07:14 PM, quoth ed:
> > Today I was wondering if it would be possible to send an entire 
> > message through a filter before taking the result of that filter as 
> > the input to form a new message.
> >
> >  '| /home/$USER/bin/filter | vim -'
> 
> Sure, it can be done. Not exactly like that, though. The thing is that 
> mutt creates the temporary file for new messages; it doesn't simply 
> pass the message as standard in for the editor. So your filter has to 
> respect the fact that mutt already created the file. Try this: set 
> $editor to be a script... let's say ~/myfilter.sh. Now create the 
> script:
> 
>      #!/bin/sh
>      filename="$1"
>      /home/$USER/bin/filter <"$filename" >"$filename".tmp
>      mv "$filename".tmp "$filename"
>      exec vim "$filename"
> 
> Of course, I may have misunderstood what you're asking.

Hi Kyle,

This doesn't do quite what I'm after as I want to take the original
email as input to the script, not what mutt has created as the reply.
Mainly this is so that I can inspect the headers of the original before
generating the headers of the reply. I know it's a lot of senselses work
but I want to set the From: header to match the fist Delivered-To header
of the original...

Thanks

Best regards

Reply via email to