Re: consolidating old mail

1996-11-12 22:25:26
On Tue, 12 Nov 1996, benjamin grosser wrote:

Is there a method built-in to mhonarc to automatically take older
mail (say from last month or whatever) out of the current index
and thread list, and move it to another directory, file or whatever?


I could do this manually once a month, or write a script (would 
rather not if I don't have to), so I thought I'd check and see if its
built-in first.  DIdn't find anything in the documentation about it.

I wrote something that does this.  It works for my setup, I don't
know whether it will really work for anybody else's.  Here's the usage of 
the script:

Usage: <update | create | rebuild | reindex>
                [-a <archive1> [<archive2> [...]]]
                [-m <month1> [<month2> [...]]]
                [-y <year1> [<year2> [...]]]

update  - Use this hourly (or whatever) to update the archives for any new
          messages that may have come in.

create  - Use this on the first of the month to create new monthly
          archives.  Also use it after adding entries to archive.conf.

rebuild - Use this to rebuild every archive from scratch. (avoid using
          if possible).

reindex - Use this to rebuild the monthly index (if you change the header
          or footer for example).

-a      - specify archive(s) to process.  If left out, all archives assumed

-m      - specify month(s) to process.  If left out, current month assumed

-y      - specify year(s) to process.  If left out, current year assumed

When there are multiple -y and -m options, every possible combination is
used.  So, if -y = (1996, 1997) and -m = (1, 2), then you get the
following months processed (if they exist) for every archive specified:
1996-01, 1996-02, 1997-01, 1997-02.

On my system, all mail is put into mailboxes, then every 10 minutes, I
call mhonarc with the -add paramter using the script's -update option.

Once a month I call the script with -create which creates new directories
and re-directs the mail into this new directory. 

It's nowhere near perfect, but it has been working for me for the last
couple of months.

I can make it available if people think it could be of general use.
Matthew Darwin           Loran International Technologies Inc.
darwin(_at_)loran(_dot_)com         955 Green Valley Crescent, Suite 210
                         Ottawa, Ontario, CANADA K2C 3V4
                         Tel: (613) 723-7505 Fax: (613) 723-7209

<Prev in Thread] Current Thread [Next in Thread>