On Thu, Dec 23, 2010 at 11:37:33PM +0100, Daniel Schömer wrote:
> Hi!
> 
> seanh schrieb:
> > [...]
> > 
> > But this still saves each message to an archive folder based on the current
> > year when mutt was started, rather than on the year of the message. You 
> > can't
> > define a save-hook based on the year of the message because there isn't an
> > expando for that, only for the full date. I think it would require an 
> > external
> > script, as suggested.
> 
> I use this save-hook with mutt 1.5.21:
> 
>   save-hook . +.INBOX.%[%Y]
> 
> I get '+.INBOX.2008' when I use the save-message command on
> a message from 2008. I'm not sure if the sent-date or
> received-date is used.

Great! This works:

        set mbox="+Archives/`date +%Y`"
        save-hook . "+Archives/%[%Y]"

and seems to do exactly what I wanted.

Reply via email to