[Mailman-Users] Getting users to confirm

Mark Sapiro msapiro at value.net
Mon Apr 2 23:23:39 CEST 2007


Jeffrey Goldberg wrote:
>
>On Apr 2, 2007, at 2:39 PM, Mark Sapiro wrote:
>
>> Jeffrey Goldberg wrote:

>>> Also is there a way to get a listing of all things pending
>>> confirmation (not just subscriptions, but address changes as well)?
>>
>>
>> bin/dumpdb lists/<listname>/pending.pck
>>
>> will show them, albeit in a cryptic form.
>
>Thanks that works.
>
>> Also, it shows some that are
>> expired so you have to look at the timestamps in the 'evictions'
>> dictionary.
>
>Where do I find the evictions dictionary?  And how do I query it?


The 'evictions' dictionary is one of the attributes of the pickled
object in pending.pck.

Items you see in the dumpdb output mostly look like

 'c34dcd5ffbb70a207f4cac165fff807315aefadd': ('H', 16686),
 'c72443543da4ddd5fd2d4e13b3b33cc09d6ebb8d': ('H', 16704),
 'cbced5736c28706cf70b9106d2ab39ef02c05621': ('S', <UserDesc>)

These are key:value pairs. The key is the confirm token and the value
is a 2-tuple consisting of a request type and data. The types are

# Types of pending records
SUBSCRIPTION = 'S'
UNSUBSCRIPTION = 'U'
CHANGE_OF_ADDRESS = 'C'
HELD_MESSAGE = 'H'
RE_ENABLE = 'E'
PROBE_BOUNCE = 'P'

The data depend on the request type. For a HELD_MESSAGE data is the
message number. For a SUBSCRIPTION it's a UserDesc instance (the
details of which are removed in my example); for an UNSUBSCRIPTION,
its just the address; for a CHANGE_OF_ADDRESS, it's a tuple of (old
addr, new addr, global flag), etc.

Amongst these entries (in hashed, i.e. virtually random sequence) is
one that looks like

 'evictions': {...}

i.e., the key is 'evictions' and the value is a (multi-line)
dictionary. The entries in this dictionary look like

  '0374376b960f19345b85b41e6abd9ea3d70319b1': 1175729853.4594159,

where the key is one of the confirm tokens and the value is the
expiration time of that token in floating point seconds since the
epoch.

-- 
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