4.74. How do I manually remove held messages from the command-line?
Note: Mailman's bin/ directory is in the configured PREFIX directory and the data/ directory is in VAR_PREFIX. The following assumes both of these are ~mailman - YMMV.
Held messages are stored in ~mailman/data as heldmsg-<listname>-<#>.pck. There is a command line tool to remove held messages and clean up the associated entries in the list's request.pck file. If the number of held messages is relatively small, the heldmsg*.pck files can simply be removed, but if the number is large enough to cause problems in the admindb web interface, the problems will persist after simply removing the heldmsg*.pck files. Therefore, it is best to use the command line tool ~mailman/bin/discard for this purpose.
$ cd ~mailman $ bin/discard data/heldmsg-<listname>-*
However, for very large collections, once the shell is done expanding the wildcard this may exceed the limits of how many characters can be allowed in a single command-line. In this case, you could use something like this:
$ cd ~mailman $ find data -name heldmsg-<listname>-\* -print | xargs bin/discard
Also note http://heim.ifi.uio.no/kjetilho/hacks/#listadmin command line fontend to web backend.
Last changed on Mon Mar 24 19:42:11 2008 by Mark Sapiro
Converted from the Mailman FAQ Wizard
This is one of many Frequently Asked Questions.