Re: auto-move mails
On Friday, 25 July 2008, 10:25 (UTC+0200), Steve S wrote:
> On Jul 24 14:16, Ravi Uday wrote:
> > Hi,
> >
> > In mutt 1.5.17 is there a way we can setup a rule where if the number
> > of emails touches 150 move the first 50 to a specified folder ?
> > We can then map this rule witha key too ?
> >
>
> If you are also satisfied with using the message age as criterion, you could
> use something like archivemail and a cronjob to put old mail in a .gz file. To
> re-read old mail, do `mutt -f <mailbox>_archive.gz`.
If date can be used as a key I'd do something with a folder-hook and
"push" and match a "~d > X" pattern. Not sure if this is what the OP
wants.
Something like (not tested, and I'm sure others have better direct
function names where I use keyboard presses)
folder-hook . 'push "<tag-pattern>~d > 1m<enter>s\Ca\Ck=archive\n$"'
Actually, trying the line above just now it doesn't work; it just tags
but doesn't save the message to the archive mailbox, not sure why.
m.