On Thu, May 23, 2002 at 02:17:50PM -0400, Michael P. Soulier wrote:

>     What's the best way to handle setting the default save folder dynamically,
> based on the email address of the sender, or perhaps the subject of the email?
> I'm assuming a hook of some kind, but I don't know the syntax offhand to pull
> out the desired information from the message.

The hook to use is the save-hook unless you also want to save copies of
outbound messages to the same folders based on the same criteria, in
which case you should use the fcc-save-hook instead.  Here are some
examples from my .muttrc.

    save-hook '~f "bcringely"'              +Lists/cringely
    save-hook '~f "@comsoc.org"'            +comsoc
    save-hook '~s "linux today"'            +Lists/linuxtoday

Read the manual sections:

    3.14.  Specify default save filename
    3.16.  Specify default save filename and default Fcc: mailbox at once
    4.2.  Patterns

Mutt searches the hook patterns for a match in the same order that the
hooks appear in your .muttrc and stops at the first match, so it is
important to put specific patterns before more general patterns.

Gary

-- 
Gary Johnson                               | Agilent Technologies
[EMAIL PROTECTED]                   | Spokane, Washington, USA
http://www.spocom.com/users/gjohnson/mutt/ |

Reply via email to