next up previous contents index
Next: 18. List configuration parameters Up: Sympa Mailing Lists Management Software version Previous: 16. List creation, families and list   Contents   Index

Subsections


17. Lists Families

A list can have from three parameters to many tens of them. Some listmasters need to create a set of lists that have the same profile. In order to simplify the apprehension of these parameters, list families define a lists typology. Families provide a new level for defaults : in the past, defaults in Sympa were global and most sites using Sympa needed multiple defaults for different group of lists. Moreover families allow listmaster to delegate a part of configuration list to owners, in a controlled way according to family properties. Distribution will provide defaults families.


17.1 Family concept

A family provides a model for all of its lists. It is specified by the following characteristics :

Here is a list of operation performed on a family :


17.2 Using family

17.2.1 Definition

Families can be defined at the robot level, at the site level or on the distribution level (where default families are provided). So, you have to create a sub directory named after the family's name in a families directory :

Examples:

/home/sympa/etc/families/my_family
/home/sympa/etc/my_robot/families/my_family
In this directory you must provide these files :


17.2.1.1 config.tt2

This is a list creation template, this file is mandatory. It provides default values for parameters. This file is an almost complete list configuration, with a number of missing fields (such as owner e-mail) to be replaced by data obtained at the time of family instantiation. It is easy to create new list templates by modifying existing ones. See 15.8, page [*] and 14.1, page [*].

Example:

subject [% subject %]

status [% status %]

[% IF topic %]
topics [% topic %]

[% END %]
visibility noconceal

send privateoreditorkey

web_archive
  access public

subscribe open_notify

shared_doc
  d_edit [% shared_edit %]
  d_read [% shared_read %]

lang [% language %]

[% FOREACH o = owner %]
owner
  email [% o.email %]
  profile privileged
  [% IF o.gecos %] 
  gecos [% o.gecos %]
  [% END %]

[% END %]
[% IF moderator %]
   [% FOREACH m = moderator %]
editor
  email [% m.email %]

   [% END %]
[% END %]
 
[% IF sql %]
include_sql_query
  db_type [% sql.type %]
  host [% sql.host %]
  user [% sql.user %]
  passwd [% sql.pwd %]
  db_name [% sql.name %]
  sql_query [% sql.query %]
    
[% END %]
ttl 360


17.2.1.2 param_constraint.conf

This file is obligatory. It defines constraints on parameters. There are three kind of constraints : The parameters constraints will be checked at every list loading.

Example:

lang                fr,us			
archive.period      days,week,month	
visibility          conceal,noconceal	
shared_doc.d_read   public		
shared_doc.d_edit   editor

17.2.1.3 edit_list.conf

This is an optional file. It defines which parameters/files are editable by owners. See 16.4.4, page [*]. If the family does not have this file, Sympa will look for the one defined on robot level, server site level or distribution level. (This file already exists without family context)
Notes that by default parameter family_name is not writable, you should not change this edition right.

17.2.1.4 customizable files

Families provides a new level of customization for scenarios (see 12, page [*]), templates for service messages (see 14.2, page [*]) and templates for web pages (see 14.3 , page [*]). Sympa looks for these files in the following level order: list, family, robot, server site or distribution.


17.2.2 Instantiation

Instantiation permits to generate lists.You must provide an XML file that is composed of lists description, the root element is family and is only composed of list elements. List elements are described in section 16.3, page [*]. Each list is described by the set of values for affectation list parameters.

Here is an sample command to instantiate a family :

sympa.pl --instantiate\_family my_family --robot \samplerobot --input\_file my\_file.xml
This means lists that belong to family my_family will be created under the robot my_robot and these lists are described in the file my_file.xml. Sympa will split this file into several xml files describing lists. Each list XML file is put in each list directory.

Example:

<family>
  <list> ... <listname> liste1 </listname> ... </list>
  <list> ...                                   </list>
  <list> ...                                   </list>
   ...
</family>

Each instantiation describes lists. Compared to the previous instantiation, there are three cases :

After list creation or modification, parameters constraints are checked :

diagram

In case of modification (see diagram), allowed customizations can be preserved :

Notes :

17.2.3 Modification

To modify a family, you have to edit family files manually. The modification will be effective while the next instanciation.
WARNING: The family modification must be done just before an instantiation. If it is not, alive lists wouldn't respect new family properties and they would be set in status error_config immediately.

17.2.4 Closure

Closes every list (installed under the indicated robot) of this family : lists status are set to family_closed, aliases are removed and subscribers are removed from DB. (a dump is created in the list directory to allow restoration of the list).

Here is a sample command to close a family :

sympa.pl -close_family my_family -robot my.domain.org

17.2.5 Adding one list

Adds a list to the family without instantiate all the family. The list is created as if it was created during an instantiation, under the indicated robot. The XML file describes the list and the root element is <list>. List elements are described in section 16.3, page [*].

Here is a sample command to add a list to a family :

sympa.pl -add_list my_family -robot my.domain.org-input_file my_file.xml

17.2.6 Removing one list

Closes the list installed under the indicated robot : the list status is set to family_closed, aliases are removed and subscribers are removed from DB. (a dump is created in the list directory to allow restoring the list).

Here is a sample command to close a list family (same as an orphan list) :

sympa.pl -close_list my_list@my.domain.org


17.2.7 Modifying one list

Modifies a family list without instantiating the whole family. The list (installed under the indicated robot) is modified as if it was modified during an instantiation. The XML file describes the list and the root element is <list>. List elements are described in section 16.3, page [*].

Here is a sample command to modify a list to a family :

sympa.pl -modify_list my_family -robot my.domain.org-input_file my_file.xml


17.2.8 List parameters edition in a family context

According to file edit_list.conf, edition rights are controlled. See 16.4.4, page [*]. But in a family context, constraints parameters are added to edition right as it is summarized in this array :

array

Note : In order to preserve list customization for instantiation, every modified parameter (via the Web interface) is noted in the config_changes file.


next up previous contents index
Next: 18. List configuration parameters Up: Sympa Mailing Lists Management Software version Previous: 16. List creation, families and list   Contents   Index
root 2005-04-20