On Wed, May 17, 2000 at 01:45:48PM +0100, Chris Green wrote:
> On Wed, May 17, 2000 at 03:32:36PM +0300, Mikko H?nninen wrote:
> > Chris Green <[EMAIL PROTECTED]> wrote on Wed, 17 May 2000:
> > > Can anyone point me at any tools for extracting mail by date (e.g. all
> > > mail for a given year) from a mailbox folder hierarchy and saving it
> > > in a similar hierarchy under another directory ready for compression,
> > > backup, whatever?
> > 
> > Shell scripts + Mutt?  Should be doable, even easily, just might take
> > a little work to get perfected.  The only catch is the situation in
> > which a folder doesn't contain any emails matching the given
> > tag-pattern, but if you know you don't have to worry about that, then
> > you should be all set. :-)
> > 
> and Suresh said:
> > cat, grep, sed and awk are your friends :)
> 
> I get the message - it's a "do it myself" job then!  :-)
> 
OK, a little think and look at the mutt manual has come up with
reasonable ways of doing this.  The initial 'design' (hack would be
more like it!) would be as follows:-

    Use find to run down through the folder hierarchy
    Execute mutt for each mailbox/maildir found
        tag messages for a date range with T~r dd/mm/yy-dd/mm/yy
        save the tagged messages somewhere
        delete the tagged messages (optional)

Now the only way I can see to execute the "T~r dd/mm/yy-dd/mm/yy", the
save command and the delete command is by using mutt's -e command line
paramter and a 'push' command.  Does this seem a possible approach,
and are there any significant limitations on the command line and
'push'?

-- 
Chris Green ([EMAIL PROTECTED])
  Home: [EMAIL PROTECTED]           Work: [EMAIL PROTECTED]
  WWW: http://www.isbd.co.uk/

Reply via email to