[Mailman-Users] Digest "flag" in membership list? ...

Mark Sapiro msapiro at value.net
Wed Sep 7 17:41:50 CEST 2005


Jason LaMar wrote:
>
>OK, so here's the kicker. Based on a somewhat transient user population (we
>regularly lose and add a small fraction of students, and sometimes even
>employees), we've developed an external script to regularly cross-check the
>current subscriber list and then update it with subscriber additions and
>removals as necessary.
>
>Unfortunately, when the lists are "refreshed," all individual subscriber
>parameters (like digest mode) are wiped out to their defaults. So my
>question is: Is there some sort of flag associated with each subscriber
>entry that indicates digest usage, that we should be sure not to touch
>during the list refresh? Or, to put it more broadly, how would you suggest
>doing backend (non-subscriber) list maintenance that doesn't impact
>individual subscriber preferences?

Are you scripting the web interface and doing mass adds and removals or
are you directly calling the Python methods?

If the former, any mass subscribed users will get digests or not
depending on the value of the list attribute digest_is_default at the
time.

If the latter, look at Mailman/OldStyleMemberships.py. In particular,
the methods getRegularMemberKeys() and getDigestMemberKeys() for
getting non-digest and digest member lists, and the addNewMember()
method which takes arguments of the form 'digest=yes|no'. Also see the
setMemberOption() method.

Note that if existing members have their digest setting changed by your
script, I think you must be deleting and readding them.

Note also, that unlike other user settings, 'digests' is not a flag -
it's implemented internally via separate lists for regular and digest
members.

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