On Thu, Sep 02, 2010 at 09:22:11AM -0700, Michael Elkins wrote:
> On Thu, Sep 02, 2010 at 04:02:01PM +0200, Louis-David Mitterrand wrote:
> >reply-hook '~h(X-Original-)?To:....@example.net' "set hostname='example.net'"
> 
> try this:
> 
> reply-hook '~h "(X-Original-)?To:....@example.net"' set hostname=example.net
> 
> The regexp needs to be quoted, otherwise the parenthesis are
> interpreted as part of Mutt's pattern language.

Hi Michael,

Nice to see you working on mutt again, I've been a fan since 0.41 :)

Actually my reply-hook looks like:

        reply-hook '~h(X-Original-)?To:.+(contact\|root)@example.net' \
                "set hostname=example.net; \
                my_hdr From: Example Support <cont...@example.net>"

and now it works, go figure. I probably had whitespace after the '\'.

In any case it matches contact@ and root@ without any quoting. Are your
sure it is necessary to quote the regexp?

Also I made a send-hook for when 'alt-e'dit an existing message:

        send2-hook '~...@example.net' set hostname=example.net

But is only works as a send2-hook, not a send-hook. Is that expected?

Thanks,

Reply via email to