[Mailman-Users] How to manage archives

Mark Sapiro msapiro at value.net
Wed Feb 1 23:49:17 CET 2006


Paul Williams wrote:
>
>How does one go about trimming back on the older archives.
>
>Here is what I have been doing with a list with the name test
>but just realized my logic was flawed.
>
>I have a script that each month gzips the 
>./test.mbox/test.mbox file and it keeps 
>5 copies of the most recent months (it discards the oldest).
>
>But the files in ./test do not get truncated.
>
>Is there a way to tell it to retain only a certain number
>of months?

Add the following (pseudo) commands to your script.

zcat (the gziped .mbox files) > some/temp/file
bin/arch --wipe listname some/temp/file
rm some/temp/file

This will rebuild the archives using only the posts from the saved,
gziped .mbox files.

There are issues remaining. As I mentioned in another post just today,
this renumbers the archive messages and changes their URLs. This may
or may not be important to you. See
<http://mail.python.org/pipermail/mailman-users/2006-February/048966.html>
and the FAQ it refers to.

There may be issues with scrubbed attachments hanging around. You can
address this by adding

rm -r archives/private/listname/attachments/*

to the script before the bin/arch rebuild, but this will most likely
invalidate any links to scrubbed attachments in old digests (and
messages if you scrub messages) that people may have saved.

The links in the rebuilt archives will be OK.

-- 
Mark Sapiro <msapiro at value.net>       The highway is for gamblers,
San Francisco Bay Area, California    better use your sense - B. Dylan




More information about the Mailman-Users mailing list