# if you are one of those who REALLY REALLY enjoy applying patches that # do not really work, then do it; # otherwise you may use mutt's way of doing it, which i read about in # the manual AFTER writing the patch *grmpf* :-) -> this is how i do it fcc-hook ([^@]+)@localhost +outgoing-localhost-$1 -> this is how mutt does it fcc-hook @(longdomainname|domain) +domain/%u => %u is for 'username part of the address' ################ and now to the fun part of it ###################### this patch to mutt 1.2.4 adds a first support for backreferences to mutt for patterns applied to addresses that have to do with fcc-hook. All other hooks do not seem to work. The reason for this sure lies in the way i am doing things now. This has to be 'cleaned up' to match mutt's internal behaviours. This implementation is not more than a mere draft of what it could be, and is in no way complete. It currently supports a maximum of 9 backreferences per pattern, accessible via $# where # is the index of the backreference starting with 1. An index of 0 returns the whole matching string. CAUTION: this feature is VERY untested!!!! Apply the patch by changing into the mutt 1.2.4 source directory and calling patch: # cd mutt-1.2.4 # patch -p1 < PATH/TO/mutt-patch-file.patch Please send mail with questions, comments, bugreports to I implemented this feature, b/c i 'needed' something like this: ************************************************************* # sample VERY simple ~./muttrc demonstrating this backreference # support for mutt set folder=~/Mail/test set spoolfile=+spool fcc-hook ([^@]+)@localhost +outgoing-localhost-$1 # this fcc-hook rule takes care, that every mail sent to # the localhost is saved to a userpart-specific file # i.e. if you send to root@localhost, the mail will be Fcc'ed to # +outgoing-localhost-root # this way you dont have to specify every single 'userpart' you # want to save in a separate file ************************************************************* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details.