HowTo: [Mailman-Users] Cleaning the archive by a list-owner

Jon Carnes jonc at nc.rr.com
Sat Jun 1 07:22:37 CEST 2002


Did you ever get a solution figured out for you?

The simplest of solutions is to stop cron, or at least to comment out 
qrunner in the cron for the user mailman (if you are running 2.0.x version 
- as I am... otherwise simply turn off the mailman deamon...).  Then go in 
and edit your Archive Mbox files.

Even if it takes you half a day to edit the darn things, you won't be 
getting any new messages added to the Mboxes since Mailman is not running.

Once you've got the Mboxes pared down to a managable level, delete the old 
HTML archive files and regenerate them with the ~mailman/bin/arch command 
as detailed below.

If you need more help, let me know and I'll try to generalize one of my 
scripts for your use (also let me know what version of MM you are using!)

Take care and good luck,

Jon Carnes

On Tuesday 28 May 2002 07:34 pm, Danny Terweij wrote:
> Jon Carnes <jonc at 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





More information about the Mailman-Users mailing list