On Wed, Aug 05, 2009 at 07:40:27AM -0500, Kyle Wheeler wrote: > On Wednesday, August 5 at 08:06 AM, quoth ed: > > 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... > > Ahhh, well, you may be able to work around that too. > > I would do it something like this: create a "reply" macro, so that > when you hit "r" (or whatever you use to reply to messages), it pipes > the message to a script, sources a file (generated by that script), > and then replies to the message. Like this: > > macro pager,index r > '<pipe-message>~/.myfilter.sh<enter><enter-command>source > ~/.myfilter.out<enter><reply>' > > Then your filter script can look something like this: > > #!/bin/sh > lastdt=`awk '/^$/{print lastdt;exit}/^Delivered-To: /{lastdt=$2}'` > echo "my_hdr 'From: $lastdt'" > ~/.myfilter.out > > Thus, when you reply, your filter script creates a file full of all > the commands and/or settings you want to make mutt do. The macro then > sources that file, which runs all those commands, and THEN issues the > reply.
Brilliant idea Kyle, thanks very much I'll give that a go and let you know how I get on. Thanks again
signature.asc
Description: Digital signature