Patrick --

...and then Patrick Colbeck said...
% 
% Hi

Hi!


% 
% Currently I am using procmail to move all my incoming mail into spool
% directories dependant on source (maillist, company etc) then letting mutt
% move it as its read from the spool directory to a "current" directory sort
% of like this

That's a pretty neat idea...  Back in the elm days before I had procmail,
I used elm's filter to put my filtered mail in =F.* where * was determined
in much the same way, and I saved my sent mail (and selected received
mail) by name.  The method has stuck through today :-)


% 
...
% 
% Well as you can guess the files in the current directory are getting huge
% after about 6 months of doing this. What I would like to do i setup another
% directory, say ~/Mail/archive and automove messages from current to archive
% after say two weeks. 

I also created a directory =Z in which I stored compressed folders for
archive purposes.  I whipped up a little shell script (before perl, too!) 
which checks the =Z directory for an "archive" file of the same name as
the "current" one it is passed on the command line, uncompresses it if
it's found, cats the temporarily renamed "current" file onto the "archive"
file, recompresses the "archive" file, and wipes the "current" file.
I'd be happy to send it out if anyone is interested; it's not a shining
example of programming, but it works and might provide some ideas :-)

If you really wanted to move things automatically, you could crank out
a little wrapper script which runs this every so often against some list
of files, and your current dir will stay clean.  Unfortunately, perhaps,
this script works only against whole files, rather than selected messages
in a mailbox (such as, say, those more than two weeks old).


% 
% What is the recommended way of doing this and can I compress these archives
% (say with gzip).

Now that the compressed folders patch is pretty stable (AFAIK -- or
even integrated into the distribution, mebbe) you might be able to set
up a little macro which sorts by reverse-time, tags everything from
message 100 down to the end/oldest (can you group-tag against a
condition such as date?), and then saves to the gzipped archive file
already defined by the necessary {open,append,close}-hook calls in your
.muttrc (as I recall)...


% 
% Oh and all my mail is in mbox format.

Same here, so the script would work...


% 
% Thanks

HTH :-)


% 
% Pat
% 
% -- 
% 
%  Patrick Colbeck        email: [EMAIL PROTECTED]          
%  Senior Analyst            tel:  you dont seriously expect me to 
%  Azlan Ltd                       give that out on the internet do you ?
-------------------->        ^^^ I love this!  It's amazing what some folks
-------------------->            *will* put in their sigs, though, ain't it?


:-D
-- 
David Thorburn-Gundlach         * It's easier to fight for one's principles
(play) [EMAIL PROTECTED]      * than to live up to them. -- fortune cookie
(work) [EMAIL PROTECTED]         Helping out at Pfizer
http://www.poboxes.com/davidtg/
Note: If poboxes.com gives you fits, try sector13.org in its place. *sigh*

PGP signature

Reply via email to