Matching message headers in mutt hooks
Heinz Diehl
htd at fritha.org
Sun Jul 8 08:52:38 UTC 2012
On 08.07.2012, suvayu ali wrote:
> This is what I have tried:
>
> reply-hook "~h 'Delivered-To: mygmailid+keyword at gmail\.com'" \
> "set from = 'emailid at otherdomain.com'"
It's the other way 'round (look at your ' and "):
reply-hook '~h "Delivered-To: +mygmailid\\+keyword at gmail\.com"''my_hdr From: emailid at otherdomain.com'
> I have also tried the message-hook with no success. Does anyone have any
> idea what I'm doing wrong?
Your problem is the pattern-matching, which is wrong at several places. You
won't get any errormessage from mutt parsing your .muttrc, because
what you do is valid , but it doesn't do what you expect it to do.
Look at my string, which is tested with the latest mutt-1.5.21 from
the developers hg-repository (since I've rewritten small parts of the
routines in sendlib to fit my needs). You'll see what you did wrong and then
you can look up the items here:
http://www.mutt.org/doc/manual/manual-4.html
(I've been using mutt since it has been forked from ELM, and have
still some difficulties doing correct pattern-matching...)
Hope this helps!
More information about the users
mailing list