On Fri, Sep 25, 2009 at 04:25:55PM +0100, Chris G wrote:
> On Fri, Sep 25, 2009 at 04:17:58PM +0100, Arthur Dent wrote:
> > On Fri, Sep 25, 2009 at 04:01:28PM +0100, Chris G wrote:
> > > Are there any obvious ways either within mutt or using some sort of
> > > external tool which would allow archiving and/or deletion of messages
> > > older than a certain date?
> > > 
> > > My ideal would be a tool that I could run either manually (or maybe
> > > from cron, but that might be a bit daring) which would select all
> > > messages in my ~/Mail hierarchy older than a specified date and move
> > > them to an archive area with the same hierarchy.
> > > 
> > > Second best would be a tool which would simply delete such messages as
> > > one could copy the whole hierarchy first.
> > > 
> > > It's fairly easy (?) to do such a thing for one mailbox/folder but I
> > > really need to do it for a fairly deep hierachy of messages.  Doing it
> > > folder by folder would be painful.
> > 
> > I use Archivemail (http://archivemail.sourceforge.net/) to do exactly what 
> > you
> > describe.
> > 
> > It runs from a nightly cronjob and archives mail older than (in my case) 180
> > days (roughly 6 months).
> > 
> > I use mbox format - I'm not sure about maildir but it works just fine for 
> > me!
> > 
> I looked at Archivemail but it only archives specified mailboxes
> doesn't it, it won't run down through a hierarchy of mailboxes. My
> hierarchy has 3293 mailboxes in it (even I didn't realise there are
> *that* many until I looked!), I'm not going to archive that lot by
> hand! 

Well I set it up so long ago (we're talking years!) that I've forgotten the
details...
This is my crontab entry: (mind the linewrap)
50 3 * * * archivemail -o ~/Mail/Archive/ ~/Mail/* ~/Mail/Malware/*
~/Mail/MLists/* ~/Mail/Admin/* ~/Mail/Misc/*

Now as it happens none of those top level directories go down beyond 1 level,
but each of them does have several sub-directories, each of which gets
archived as expected.

I'll have to look at, or experiment with, deeper levels - sorry I don't know
the answer of the top of my head...

Regards

Mark

Attachment: pgpAeIiN5tSBj.pgp
Description: PGP signature

Reply via email to