On 02Mar2017 12:49, Bill Starrs <[email protected]> wrote:
So you'd write a script that accepted a filename argument (the temp file mutt
offers up for editing), prompts for the custom Outlook flag, applies it,
quits. [...]
macro index ,F ':set my_old_editor=$editor<enter>:set
editor=adjust-outlook-flag.sh<enter><edit-message>:set editor=$my_old_editor<enter>'
thank you, this is what I was looking for. I did manually edit the headers a
few times and confirmed that the flag would show up on the message in outlook.
I wasnt't sure how to execute it without a lot of keystrokes though.
I am more comfortable with python than sed but I guess whatever script
I write just needs to make the edit and then save (write over) the file it is
provided and then close?
Python would work well; its email message parser gives you far more flexible
access to loading and reading the headers than sed does.
Yes, the easy thing is read the whole message into a Message, adjust the
headers, write it back out.
Cheers,
Cameron Simpson <[email protected]>