[Mailman-Users] Pending messages disappeared from admindb

Mark Sapiro mark at msapiro.net
Mon Feb 11 02:06:07 CET 2008


Matthew Saltzman wrote:
>
>I was renaming a list according to the instructions in the FAQ.  The
>last step there refers to moving pending requests in the qfiles
>directory, which doesn't appear to apply in 2.1.9.  But in trying to
>figure out if there was anything I did need to do, I renamed the
>files /var/lib/mailman/data/heldmsg-oldlist-*.pck to
>heldmsg-newlist-*.pck, then renamed them back to their original names.
>After the first rename, the messages appeared in the admindb screen, but
>only the sender addresses appeared for each message.  After the second
>rename, the messages disappeared from the admindb screen altogether.
>
>I checked another renamed list, and without renaming the held messages,
>they all appeared in the new admindb screen.  So I guess the right
>action would have been not to rename.  But now that it's done, how can I
>restore the pending messages in the first list so they appear in the
>admindb screen?


There are two (well actually three, but the third doesn't matter)
things associated with a held message.

These are:

1) The data/heldmsg-<listname>-nn.pck file which is a Python pickle
containing the raw message text.

2) An entry in lists/<listname>/request.pck which is keyed by the
message number (the nn in the data/heldmsg name) and which contains
various information about the message, see below.

3) An entry in lists/<listname>/pending.pck having to do with the
confirmation cookie that can be used to approve or discard the message.

The important thing in this case is 2). If you do

 bin/dumpdb lists/<newlistname>/request.pck

you may or may not see entries like the following:

    20: (   1,
            (   1202582349.7719331,
                'poster at example.com',
                'the message subject',
                'Post by non-member to a members-only list',
                'heldmsg-<oldlistname>-20.pck',
                {   '_parsemsg': True,
                    'lang': 'en',
                    'listname': '<listname>',
                    'pipeline': [   'Hold',
                                    'MimeDel',
                                    'Scrubber',
                                    'Emergency',
                                    'Tagger',
                                    'CalcRecips',
                                    'AvoidDuplicates',
                                    'Cleanse',
                                    'CleanseDKIM',
                                    'CookHeaders',
                                    'ToDigest',
                                    'ToArchive',
                                    'ToUsenet',
                                    'AfterDelivery',
                                    'Acknowledge',
                                    'ToOutgoing'],
                    'received_time': 1202582349.7179811,
                    'rejection_notice': 'Non-members are not allowed to
post messages to this list.',
                    'tolist': 1,
                    'version': 3})),

You will see that the sixth line of this contains the file name of the
heldmsg file with the original listname. Thus, as you discovered, the
proper action is not to rename this file.

You renamed this file, so admindb couldn't find it. Thus, it only
showed you some information and then deleted what it thought was a
residual entry in request.pck following a delete of the heldmsg file.
When you renamed the files back, it was too late. The entry in
requests.pck was gone.

At this point, all you can do is something like:

   bin/dumpdb data/heldmsg-<oldlistname>-nn.pck | sed -e 1,2d -e \$d |\
   bin/inject -l <newlistname>

to repost those messages you don't want to discard, and just remove the
rest.

-- 
Mark Sapiro <mark at msapiro.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