On Thu, Aug 06, 2009 at 01:14:04PM -0500, Kyle Wheeler wrote: > On Friday, August 7 at 01:52 AM, quoth Erik Christiansen: > Consider if you were instead changing the Subject header. For example: > > send-hook '~C d...@example.com' 'my_hdr Subject: [dudemail]'
Munging that a bit, I seem to be able to achieve the desired "Reply-To:" result, after removing all the folder-hooks which had been setting it to be a list reply. Defaulting to a reply to self, each list can then instead be covered with e.g.: send-hook '~C xxx-l...@nongnu.org' 'my_hdr Reply-To: xxx-l...@nongnu.org' It's a lesson on how sometimes .muttrc benefits from pruning prior to adding new growth. > Ostensibly, the idea behind that hook is to provide a template > subject-line for all mail sent to d...@example.com; but if send-hooks > are only triggered AFTER the message is composed, that's basically > useless. At the same time, what if you add "dude" to the recipients > WHILE you edit the email - if the hook is only triggered BEFORE the > message is composed, that's basically useless too! That seems to be partly what send2-hook was intended to solve? However, it didn't work for me, at least the way I tried to use it, and now I have trialled a fix, using your example. So I'm a happy camper. > Three thoughts: > > 1. lots of people use folder-hooks to set headers like that. > Personally, I dislike this idea, because I want mutt to > recognize list messages no matter where they happen to be > stored (otherwise, what's the point of the ~l matcher?). But > you could use it for this Reply-To purpose. Thanks to procmail, list messages can be in any of only one places here, so I had been using folder-hooks. It was just undoing the "Reply-To:" setting on a non-list message which gave problems. In the case of "Reply-To:", it finally dawned on me that it's easier to match one List-Post address than a large set of non-list addresses. Turning off my folder-hooks was then the biggest step forward. > 2. You could also use a message-hook, that triggers when you > display the message, like this: > > message-hook '~C list' 'my_hdr Reply-to: foo' > > That is a little hack-like too, because it doesn't work from > the index, but combine this with a folder hook (for the index), > and you may be in business. IIUC, this would add the header to the stored copy of the received message. However, I had successfully been setting "Reply-To:" by folder-hooks. It was the attempt to negate that on composing a message which was defeating me. > 3. You could use an $editor trick, like this (assuming you use > vim): > > send-hook '~C list' 'set editor="vim '+%s/^Reply-To:/& foo/i'" Many thanks for that vim gem too. I'll file it away for tweaking to do something else when it crops up. Erik