[Mailman-Users] How to purge correctly old messages ?

John DeCarlo jdecarlo at mitre.org
Thu Jan 29 16:06:31 CET 2004


BERTHOLD Jean wrote:

> mailman at vanuatu # pwd
> /usr/local/mailman/archives/private/etrans-echanges.mbox
> mailman at vanuatu # ls -l
> total 1327072
> -rw-rw-r--   1 mailman  mailman  679109463 Jan 29 14:40 etrans-echanges.mbox
> mailman at vanuatu # vi etrans-echanges.mbox	
> mailman at vanuatu # vi etrans-echanges.mbox
> "etrans-echanges.mbox" Tmp file too large

>> You can also try and figure out which message in the mbox file you want 
>> to start archiving (instead of deleting them from the file) and run
>>   .../bin/arch --start=N --wipe etrans-echange
>> At least this should get you started.

I didn't pay very close attention to the size originally.

So my next guess is to try the "--start=N" option I mentioned above. 
See if you can figure out approximately how many messages you want to 
discard, by looking at the archives.

People with more Linux experience can suggest better approaches.

You can get fairly close to the number of messages in the .mbox file by 
running grep and wc:

grep "Return-Path:" etrans-echange.mbox | wc -l

This will tell you how many lines in the .mbox file have Return-Path: in 

If not, just use trial and error.  Start with some number like half of 
the number you got above and if you have too many messages left in the 
archives, go up as needed.


John DeCarlo, My Views Are My Own

More information about the Mailman-Users mailing list