[Mailman-Developers] Questions in regard to the database operations

Barry Warsaw barry at list.org
Tue Jun 26 02:54:31 CEST 2012


On Jun 25, 2012, at 03:30 PM, Danci Emanuel wrote:

>As for the latter problem, I still have something in mind. If we were to
>choose the  second option (the one which implies setting the flag
>"delivery_status" to the proper value) does this not mean that we will have
>to keep the user`s preferences alive, without deleting them?

Here's how preferences work.

There is an IPreferences interface which describes the kind of things that are
"preferences".  Members, users, and addresses all can have a pointer to a
preferences record.  There are also some system default preference values.
When we look up a preference on a member, the search order goes like this:

 * member
 * address
 * user
 * system
 
meaning, if the member doesn't have a preference set, we fall back to the
subscribed address, then to the user linked to that address, and finally the
system default.  At each level, the object only has a preference record if
explicitly created.  Usually, they don't have preferences (meaning the system
default takes over).

When a member record is deleted, only that member's preferences are deleted.
If either the address and user associated with that member has a preferences
record, it *has* to stick around because an address or user can be subscribed
to many mailing lists.  E.g. You could decide that you want all your postings
to be acknowledged.  You'd set that on your user record and then all your
subscriptions would automatically inherit it.

I don't see much savings in trying not to delete a member's preferences when
being unsubscribed.  It's just a row in the database, and probably not a very
big one at that.  Plus, it'll usually be empty anyway.

Cheers,
-Barry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/mailman-developers/attachments/20120625/00de4dc0/attachment.pgp>


More information about the Mailman-Developers mailing list