[Mailman-Users] held-messages and discard

Mark Sapiro msapiro at value.net
Thu Jul 27 02:39:34 CEST 2006


Dave Stern wrote:

>I have a several thousand files in $MM/data/held-msg-LISTNAME-XXX.pck
>I presume these are spam or messages that have otherwise ended up 
>queued, perhaps waiting for admin approval.


Not 'perhaps', definitely they are (or at least once were) held
messages waiting for admin action.


>I want to delete them so I
>
>> $MM/bin/discard $MM/data/heldmsg-somelist-4586.pck
>Discarded held msg #4586 for list somelist
>
>And often it works as indicated above. In some cases, I get a traceback
>
>> $MM/bin/discard $MM/data/heldmsg-anotherlist-2466.pck
>Traceback (most recent call last):
>   File "/export/mailman/bin/discard", line 120, in ?
>     main()
>   File "/export/mailman/bin/discard", line 106, in main
>     mlist = MailList(listname)
>   File "/export/mailman/Mailman/MailList.py", line 126, in __init__
>     self.Lock()
>   File "/export/mailman/Mailman/MailList.py", line 163, in Lock
>     self.Load()
>   File "/export/mailman/Mailman/MailList.py", line 580, in Load
>     raise Errors.MMUnknownListError
>Mailman.Errors.MMUnknownListError
>
>I presume this is simply from a list that no longer exists.


Exactly.


>So why do I have so many?


You're in a University environment and your list owners are clueless.
Or to put it more kindly, you have a lot of list owners who don't
understand the responsibility of running a list or don't understand
how to set a list up to work in a way that is good for them.


>Or to put it another way, is there some way I can
>sanely determine which should be removed. As a first go round, I'm thinking
>of just saying, anything providing traceback, delete and anything older
>than one month delete as the admin is obviously ignoring the list.
>
>Does this sound reasonable?


It sounds too lenient to me.

What mailman version are you running? If it is 2.1.6 or later, each
list has a max_days_to_hold setting with a default set im mm_cfg.py
via DEFAULT_MAX_DAYS_TO_HOLD which in turn defaults to zero meaning
unlimited. In your case, I would suggest that setting

DEFAULT_MAX_DAYS_TO_HOLD = 7

might be appropriate. Also, in any case, as the list name is part of
the heldmsg file name, you can see if only a few lists are offenders
or if there are many lists. I would consider coercing the offending
list owners to set their lists for some reasonably short
max_days_to_hold if that is available.

Also, it might be worthwhile to actually visit the admindb interface
for some offending lists and see if all the held messages are visible.
It is possible that some of these are orphans. If they aren't visible
in the admindb interface, they definitely should be deleted. At first
pass, simply counting the heldmsg files for a list and the admindb
held messages for the list will tell you if there are orphans. Beyond
that, you'd probably have to use bin/dumpdb on the heldmsg*.pck to see
the message to know if that specific one is in the admindb or not. Or
you could look directly at the list's request.pck.

-- 
Mark Sapiro <msapiro at value.net>       The highway is for gamblers,
San Francisco Bay Area, California    better use your sense - B. Dylan




More information about the Mailman-Users mailing list