[Mailman-Users] plaintext interface to list members

Jim Tittsler jwt at dskk.co.jp
Tue Mar 28 10:23:10 CEST 2000


On Tue, Mar 28, 2000 at 07:44:15AM +0000, Alexander Koch wrote:
> Now, I have not looked at mailman much, but what format is
> the files? I am thinking about parsing the db files myself

The config.db of each mailing list is a marshalled Python dictionary, which
contains members and digest_members dictionaries.  The keys of those two
dictionaries are the lower case mail addresses of subscribers.  MailList
provides functions GetMembers() and GetDigestMembers() for getting the
subscriber lists (or GetDeliveryMembers(), GetDigestDeliveryMembers() to
preserve case in the usernames).

> [ I know of list_members and remove_members, but the file
>   format is not quite obvious... ]

list_members output file format is a simple list of subscribers' Email
addresses.

You might also want to investigate bin/withlist which provides a
framework for examining and modifying a list database, with optional
locking of the database to permit safe modifications.  You can use
withlist to apply a function to a list using the -r switch.

$python -i bin/withlist my-list
>>> print m.GetMembers()

-- 
Jim Tittsler, Tokyo
Python Starship     http://starship.python.net/crew/jwt/





More information about the Mailman-Users mailing list