On Thu, May 27, 2010 at 12:56:59PM +0200, hubert depesz lubaczewski wrote: > Situation: > server martin.depesz.com > shell account depesz. > > i create test.rc with following content: > my_hdr From: depesz <dep...@depesz.com> > fcc-hook @depesz.com +depesz/ > > start mutt with: > mutt -n -F test.rc > > ignore messages about missing directories, write mail to myself, and on > finish screen, i see that fcc has been correctly set to depesz/ > > Now. > > I change the my_hdr line to: > my_hdr From: Marcin Pietrzak <mar...@iworks.pl> > > and now fcc_hook is no longer applied ?! > > Why is that?
Perhaps it has something to do with the default_hook, which defaults to: "~f %s !~P | (~P ~C %s)" This would make your simple regular expression (@depesz.com) evaluate to "~f @depesz.com !~P | (~P ~C @depesz.com)" . Filling in the ~characters yields something like: from @depesz.com and not from alternates or (from alternates and (to or cc @depesz.com)) . Solving for the first case (from: depesz <dep...@depesz.com>): 1 and 1 or (0 and ?) = 1 . Solving for the second case (from: Marcin Pietrzak <mar...@iworks.pl>): 0 and 1 or (0 and ?), = 0 . Hopefully someone will jump in and point out any errors I've made in translating or evaluating the patterns. Barring any errors, I'd say the best way out is to craft a pattern from your simple regular expression. So, instead of fcc-hook @depesz.com +depesz/ you'd have fcc-hook "~C @depesz\.com" +depesz/ . I'm not sure what you want to match so I went with the ~C which would evaluate as true if the message is to or cc @depesz\.com . -- Monte