[Mailman-Developers]
HowTo: [Mailman-Users] Cleaning the archive by a list-owner
Jon Carnes
jonc@nc.rr.com
Sun, 12 May 2002 14:05:21 -0400
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