[Mailman-Users] request.pck does not match heldmsg-Listname files

Ivan Fetch ifetch at du.edu
Tue Nov 21 11:30:14 CET 2006

HI Gerardo,

On Fri, 17 Nov 2006, Gerardo Herzig wrote:

> Well, if mailman do not provide such a tool, there is lots of quick ways to 
> find such a files: Lets assume that any given .pck file must have at least 5 
> lines to be considered a `good one'. So you can find those files who have 
> less than 5 lines, then you can delete it
> Simple python oneliner for finding .pck files fewer than 5 lines:
> cd ~mailman/data
> python
>>>> import glob
>>>> '\n'.join([x[0] for x in [(open(y).name, len(open(y).readlines())) for y 
> in glob.glob('*.pck')] if x[1] < 5])
> ## the (if x[1] < 5) at the end is the total lines for each file.
> Try it and watch. If you like it, you can save it as find_orphaned_files.py 
> and do
> ./find_orphaned_files.py | xargs ~mailman/bin/discard
> Or something like this. Its just an idea, hope to be helpfull.

    Thanks for your suggestion - in this case, counting the number of lines 
in pck files residing in the Mailman data directory does not help to 
validate those files.  The issue is heldmsg pck files in the data directory which are no 
longer referenced in the list/ListName/request.pck file.

Thanks - Ivan.

More information about the Mailman-Users mailing list