Cleaning the archive by a list-owner

Hi,
How can a list-owner clean out the archive? Delete messages? When not, can the developers program it? It would be nice.
Groetjes Danny Terweij

Straight Mailman (unmodified) won't let you do this.
I have some simple scripts that are password protected that do it for my admins. They were a piece of cake to write. Your sysadmin would have to install them for you.
For the sysadmin to modify the archives...
- edit ~mailman/archives/private/<listname>.mbox/<listname>.mbox
- delete/modify any emails you want (normally delete older mail)
- delete the old archive html files... rm -rf ~mailman/archives/private/<listname>/.*
- recreate the archive html files...
cd ~mailman
bin/arch <listname>
archives/private/<listname>.mbox/<listname>.mbox
===
The email for the list is stored in mbox format (straight text) in a file in the archive directory. You can easily edit this mailbox and then re-run the archives so that your changes are pushed out to the HTML area.
If you want to find the top of an email based on date:
F_DATE="12 May 2002"
grep -n "^From: " | grep $F_DATE | top -1
This gives you first line of an email that came in on that date - and it prints out the line number in the file for that line...
To print out a file starting at a given line and continueing on to the end: F_NAME="~mailman/archive/private/mylist.mbox/mylist.mbox START=4093 sed -n "$START, $ p" $F_NAME > $F_NAME.bak
=== There are several ways to automate this, the easiest is via email, but html is not too much harder - especially if you are willing to allow simple CGI's. I leave this up to your imagination! Take care,
Jon
--- Original Message: Sunday 12 May 2002 05:58 am ---
Hi,
How can a list-owner clean out the archive? Delete messages? When not, can the developers program it? It would be nice.
Groetjes Danny Terweij

Jon Carnes jonc@nc.rr.com Wrote a while ago:
Hi, Jon, all readers...
I did work something out, but it is for me very difficult to create. I deleted my created scripts because it looks ugly and it wont do what i want.
When editing the mbox, and there is a new message processed .. it screws up all the stuff. I'll think it is better to use MySQL for storing messages. Then it is easy to create a protected webpage in PHP to read the messages and delete/edit them. And after all doing a new bin/arch listname to read the messages from the sql database and generate the html output....
I am now not seeing any clue to create a webpage/script for deleting/editing messages. (Because i do not know where to start).
My mbox files are over 300mb in size. It is not easy to read the file in and proccess some stuff in the file .. my linux box is not fast enough and it has 96mb memory and 172mb swap size.
So i need another concept.
I am not a good programmer, so please give me more example code to play with.
Straight Mailman (unmodified) won't let you do this.
I have some simple scripts that are password protected that do it for my admins. They were a piece of cake to write. Your sysadmin would have to install them for you.
For the sysadmin to modify the archives...
- edit ~mailman/archives/private/<listname>.mbox/<listname>.mbox
- delete/modify any emails you want (normally delete older mail)
- delete the old archive html files... rm -rf ~mailman/archives/private/<listname>/.*
- recreate the archive html files... cd ~mailman bin/arch <listname>
archives/private/<listname>.mbox/<listname>.mbox
The email for the list is stored in mbox format (straight text) in a file in the archive directory. You can easily edit this mailbox and then re-run the archives so that your changes are pushed out to the HTML area.
If you want to find the top of an email based on date: F_DATE="12 May 2002" grep -n "^From: " | grep $F_DATE | top -1
This gives you first line of an email that came in on that date - and it prints out the line number in the file for that line...
To print out a file starting at a given line and continueing on to the end: F_NAME="~mailman/archive/private/mylist.mbox/mylist.mbox START=4093 sed -n "$START, $ p" $F_NAME > $F_NAME.bak
=== There are several ways to automate this, the easiest is via email, but html is not too much harder - especially if you are willing to allow simple CGI's. I leave this up to your imagination! Take care,
Jon
--- Original Message: Sunday 12 May 2002 05:58 am ---
Hi,
How can a list-owner clean out the archive? Delete messages? When not, can the developers program it? It would be nice.
Groetjes Danny Terweij
participants (2)
-
Danny Terweij
-
Jon Carnes