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 :
- a list creation template providing a common profile for each list configuration file.
- an degree of independence between the lists and the family : list parameters edition rights and
constraints on these parameters can be free (no constraint), controlled (a set of
available values is defined for these parameters) or fixed (the value for the parameter is imposed by
the family). That prevents lists from diverging from the original and it allows list owner customizations in
a controlled way.
- a filiation kept between lists and family all along the list life : family modifications
are applied on lists while keeping listowners customizations.
Here is a list of operation performed on a family :
- definition : definition of the list creation template, the degree of independence and family customizations.
- instantiation : lists creation or modifications of existing lists while respecting family properties.
The set of data defining the lists is an XML document.
- modification : modification of family properties. The modification is effective at the next instantiation time, that have consequences on every list.
- closure : closure of each list.
- adding one list to a family.
- closing one family list.
- modifying one family list.
17.2 Using family
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 :
- config.tt2 (mandatory)
- param_constraint.conf (mandatory)
- edit_list.conf
- customizable 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 :
- free parameters : no constraint on these parameters,
they are not written in the param_constraint.conf file.
- controlled parameters : these parameters must select their values
in a set of available values indicated in the param_constraint.conf file.
- fixed parameters : these parameters must have the imposed value indicated
in the param_constraint.conf file.
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
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.
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 :
- lists creation : new lists described by the new instantiation
- lists modification : lists already existing but possibly changed because of changed parameters values in
the XML file or because of changed family's properties.
- lists removal : lists nomore described by the new instantiation. In this case, the listmaster must
valid his choice on command line. If the list is removed, it is set in status family_closed, or if the
list is recovered, the list XML file from the previous instantiation is got back to go on as a list modification then.
After list creation or modification, parameters constraints are checked :
- fixed parameter : the value must be the one imposed.
- controlled parameter : the value must be one of the set of available values.
- free parameter : there is no checking.
diagram
In case of modification (see diagram), allowed customizations can be preserved :
- (1) : for every modified parameters (via Web interface), noted in the config_changes
file, values can be collected in the old list configuration file, according to new family properties :
- fixed parameter : the value is not collected.
- controlled parameter : the value is collected only if constraints are respected.
- free parameter : the value is collected.
- (2) : a new list configuration file is made with the new family properties
- (3) : collected values are set in the new list configuration file.
Notes :
- For each list problem (as family file error, error parameter constraint, error instanciation ...),
the list is set in status error_config and the listmaster is notified. He will have to do necessary to put list in use.
- For each list closing in family context, the list is set in status family_closed and the owner is notified.
- For each overwritten list customization, the owner is notified.
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.
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
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
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: 18. List configuration parameters
Up: Sympa Mailing Lists Management Software version
Previous: 16. List creation, families and list
Contents
Index
root
2005-04-20