On Sun, Dec 09, 2001 at 06:26:56AM -0500, David T-G <[EMAIL PROTECTED]> wrote: > Hmmm... Not for moving stuff out; grepmail will do a good job of finding > the messages but that doesn't help you empty the big box. > > Can you guarantee that the items in this mailbox are in a sensible > received order, or would it be acceptable for a shouldn't-yet-be-moved > message to perhaps be moved anyway? It should be easy enough to read > into the file to find the first date later than your move-to-archive > window, back up to the empty line before that message's ^From_ line, > and break file in two at that point -- writing the first part to your > compressed folder and leaving [only] the second part.
I think grepmail is the tool I need, thanks. Something like: grepmail -v -d "before `date -v -2w '+%Y-%m-%d %H:%M:%S'`" mbox >new grepmail -d "before `date -v -2w '+%Y-%m-%d %H:%M:%S'`" mbox >old seems to do what I want. Now I have to do compressing, uncompressing, appending, locking and ... Nicolas