Re: Changing Headers in the Compose screen - Solution (with Perl)
My problem was that by the time I realized I was using the wrong rc I
was at the compose screen, and I wanted to change my headers so that I
send from the right address. To change headers at this point requires
editing the headers, it's too late to set a my_hdr directive. Here is
the solution with Perl:
In .muttrc
macro compose <f5> ":set editor='header_edit'\n<edit-headers>:set
editor='vim -c set tw=72'<enter>"
In your path (I put it in $HOME/bin) put the executable header_edit
header_edit looks like this:
#!/usr/bin/perl -p -i
s/^From:.*$/From: Your Nic <correct_addy\@example.com>/;
s/^Reply-To:.*$/Reply-To: Your Nic <correct_addy\@example.com>/;
Thanks to David and Christoph for setting me on the right path.
PS - this is just so that anyone searching the archives has a solution
all in one message.
--
yours,
William
nerd.cx