Skip to Content.
Sympa Menu

en - Re: [sympa-users] Users from a DB

Subject: The mailing list for listmasters using Sympa

List archive

Chronological Thread  
  • From: Daniel Cortes <address@concealed>
  • To: Olivier Salaün - CRU <address@concealed>
  • Cc: address@concealed
  • Subject: Re: [sympa-users] Users from a DB
  • Date: Mon, 11 Apr 2005 10:00:30 +0200

Thks Olivier.

My version of sympa is 5.0b1
I try this
./bin/sympa.pl --create_list --robot=linux.site --input_file=prueba.xml
and sympa show me the commands that can I do, I don't think that de method was called wrong because is the same that say in the help.

Now I go to read about families.

Can I put a sql query for specificate the editor of the lists the same manner that I specify the users of list.
for example in an XML:

<?xml version="1.0" ?>
<list>
        <listname>Prueba</listname>
        <subject>Lista de Prueba</subject>
        <status>open</status>
        <shared_edit>editor</shared_edit>
        <languaje>es</languaje>
        <owner multiple="1">
                <email>address@concealed</email>
                <gecos>Sympaecatino</gecos>
        <owner_include multiple="1">
        <sql>
                <type>mysql</type>
                <host>daniol.fib.upc.edu</host>
                <user>sympa</user>
                <pwd>apmys04</pwd>
                <name>test</name>
                <query>SELECT DISTINCT email FROM gente WHERE nombre="jhon"</query>
        </sql>
        </owner_include>
        <sql>
                <type>mysql</type>
                <host>daniol.fib.upc.edu</host>
                <user>sympa</user>
                <pwd>apmys04</pwd>
                <name>test</name>
                <query>SELECT DISTINCT email FROM gente</query>
        </sql>
</list>


Is this?






Olivier Salaün - CRU wrote:
Hi Daniel,

Daniel Cortes wrote:
First, I have a portal with a lot of groups of users, the information of users reside in a DB. I want to do every group has an email list. My idea was create an XML, and create a call in java that in every create group action in the portal, generates an XML with information for create the list of this group. My question is, can I create an XML and call  ./sympa.pl --create_list ... , if sympa.pl is not stopped?What can I do?
You can perform this with all Sympa processes running. Sympa processes adapt very well to data changes.
The --create_list is one option, another being the --instantiate_family option.
Famillies allow you to create a set of lists that have common caracteristics, with a dynamical relationship with the family templates (all its lifelong, a list is related to its family). It is well adapted is your set of DB groups is evolving in time ; Sympa would automatically create or remove groups at instanciation time, based on the XML input.
Someone can tell me the differences between user_data_source? now I trying with include 1 but I don't know if this is my option if I have all the information of my users with DB (myql).
And can I select de owners and moderators by DB?
With 5.0 versions, the default value for 'user_data_source' is 'include2' and it will become the ONLY one supported soon. The 'include2' mode provides advantages of both 'database' and 'include'.

Go for 'include2'.




Archive powered by MHonArc 2.6.19+.

Top of Page