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

Danci Emanuel danci_emanuel at yahoo.com
Mon Jun 25 17:02:10 CEST 2012


Thanks for the clarifications, Barry!

I still want to ask you something. As far as I am aware, I also have to implement
the aliases feature as Systers see it, meaning that a user, after gets registered can
post messages to a mailing list from more than one address. So, just to make sure,
do you think that these addresses could be added directly to the address table and 
then all the addresses (aliases) linked to the same user? 
This - http://systers.org/systers-dev/doku.php/systers_database_in_postgresql?s[]=database 
is the current database schema implemented by Systes, so basically I am looking a solution 
to replace the 'alias' table.

Furthermore, in regard to the user removal, if the address and the user records remain
in the database, how can we know if a user has been unsubscribed from the list?
I am asking this, because in order to successfully implement the dlists, we need to
keep account of the unsubscribed users, so that we won`t send any unwanted emails 
to them. In the aforementioned Systers` schema, this is done by setting the 'deleted' flag
to true.

Thanks again,
Emanuel

________________________________
 From: Barry Warsaw <barry at list.org>
To: mailman-developers at python.org 
Cc: Danci Emanuel <danci_emanuel at yahoo.com> 
Sent: Monday, June 25, 2012 4:42 PM
Subject: Re: [Mailman-Developers] Questions in regard to the database operations
 
Hi Emanuel,

On Jun 25, 2012, at 04:51 AM, Danci Emanuel wrote:

>First of all, how is the aliases set populated in time?

I'm guessing you mean the mailing list's "acceptable aliases", i.e. addresses
which are not the list's posting address, but will still be accepted if it
appears in a recipient header (To or CC) instead of being rejected as
"implicitly addressed".

At the lowest level, you adapt a mailing list into an IAcceptableAliasSet, and
then you .add() or .remove() addresses from that object.

Of course, all this is plumbed through the REST API.  A good description of
how this works is available here:

http://packages.python.org/mailman/src/mailman/rest/docs/configuration.html#acceptable-aliases

>Second of all, when a user is unsubscribed, is all the data related to
>him/her deleted (his/hers preferences, the info related to the address etc)
>?

In order to understand what happens when a user is unsubscribed, it's
important to review the data model.  Mailman has "addresses", "users", and
"members".  An address is essentially a known email address, which may be
verified or not, and which may or may not be linked to a user.  Users aren't
much more than a user id, but may have various other pieces of information
associated with it (e.g. a password).  Both addresses and users may have
"display names" and preferences.  Neither of these objects are directly
associated with a mailing list.

Addresses can be subscribed to mailing lists.  This "subscription" is
represented by member objects.  Or put another way, a member is an address
associated with a mailing list with a given role.  Because addresses can be
linked to users, this is how a user gets subscribed to a mailing list.  Note
that if a user has a "preferred address", the user record can be associated
with the mailing list as well, but this is a convenience shortcut.  Members
also have preferences.

So what happens when someone unsubscribes from a mailing list?  All that
happens is that the relevant member record gets deleted.  The member's
preferences also get deleted, but that's it.  Neither the address nor the user
is touched.

Hope that helps!
-Barry


More information about the Mailman-Developers mailing list