(Default value: include2, if using an RDBMS)
user_data_source file | database | include | include2
Starting with Sympa 5.3.x include is interpreted as include2. Since Sympa 5.4.x include2 is the only supported value for this parameter.
Background : In the former days Sympa did not use a RDBMS and subscribers informations were stored in flat subscribers files. We then introduced the ability to include members defined in an external data source and also the optional use of a RDBMS to store subscribers. Therefore we created the 'user_data_source' parameter. We ended up merging the 'database' and 'include' features with 'include2'. The goal was then to give up the 'user_data_source' parameter and we have almost reached this goal. Starting with Sympa 5.3.x the 'include' mode is considered a synonym for 'include2' and more recently we have removed the 'file' and 'database' modes in the development version of Sympa. This means that in Sympa 5.4 the only supported mode will be 'include2'. Note that migration process has been automated.
Sympa allows the mailing list manager to choose how Sympa loads subscriber and administrative data. User information can be stored in a text file or relational database, or included from various external sources (list, flat file, result of LDAP or SQL query).
user_data_source file subscribers parameter in sympa.conf. This is maintained for backward compatibility.user_data_source database user_data_source include include_file, include_list, include_remote_sympa_list, include_sql_query and include_ldap_query.user_data_source include2
(Default value: 3600)
ttl delay_in_seconds
Sympa caches user data extracted using the include_xx configuration parameters. Their TTL (time-to-live) within Sympa can be controlled using this parameter. The default value is 3600.
(Default: default_distribution_ttl sympa.conf parameter)
distribution_ttl delay_in_seconds
Before some actions it is useful to make sure that the user's list is up-to-date. To avoid to execute synchronization any time these actions are performed, this parameter defines the delay since the last synchronization after which the user's list will be updated before performing the action.
The actions for which this parameter is checked are :
(Default: default_sql_fetch_timeout sympa.conf parameter)
sql_fetch_timeout delay_in_seconds
Defines the timeout while running a fetch() on an include_sql_query data source.
include_list listname
All subscribers of list listname become members of the current list. You may include as many lists as required, using one include_list listname line for each included list. Any list at all may be included; the user_data_source definition of the included list is irrelevant, and you may therefore include lists which are also defined by the inclusion of other lists. Be careful, however, not to include list A in list B and then list B in list A, since this would result in an infinite loop.
Example:
include_list local-list
Other example:
include_list other-local-list@other-local-robot
include_remote_sympa_list
Sympa can contact another Sympa service using HTTPS to fetch a remote list in order to include each member of a remote list as a subscriber. You may include as many lists as required, using one include_remote_sympa_list paragraph for each included list. Be careful, however, not to give rise to an infinite loop making cross includes.
For this operation, one Sympa site acts as a server while the other acts as a client. On the server side, the only setting needed is to give permission to the remote Sympa to review the list. This is controlled by the review authorization scenario.
From the client side you must define the remote list dump URI.
remote_host remote_host_name;port port (Default 443);path absolute path (in most cases, for a list name foo /sympa/dump/foo).Because HTTPS offert an easy and secure client authentication, HTTPS is the only protocol currently supported. An additional parameter is needed: the name of the certificate (and the private key) to be used:
cert list cert robot sympa@my.domain and files are located in the virtual host etc directory if a virtual host is used; otherwise, they are located in /home/sympa/etc.
include_sql_query
It is used to start a paragraph defining the SQL query parameters:
db_type dbd_name host hostname db_port port db_name sympa_db_name user user_id passwd some secret user.sql_query a query string connect_options option1=x;option2=y
include_sql_query
db_type mysql
host sqlserv.admin.univ-x.fr
user stduser
passwd mysecret
db_name studentbody
sql_query SELECT DISTINCT email FROM student
connect_options mysql_connect_timeout=5
Connexion timeout is set to 5 seconds.
db_env list_of_var_def
db_env ORACLE_TERM=vt100;ORACLE_HOME=/var/hote/oracle/7.3.4name short name f_dir /var/csvdir Example:
include_sql_query
db_type oracle
host sqlserv.admin.univ-x.fr
user stduser
passwd mysecret
db_name studentbody
sql_query SELECT DISTINCT email FROM student
include_ldap_query
This paragraph defines parameters for a LDAP query returning a list of subscribers. This feature requires the Net::LDAP (perlldap) PERL module.
host ldap_directory_hostname host ldap.cru.fr:389,backup-ldap.cru.fr:389
port ldap_directory_port (OBSOLETE) user ldap_user_name passwd LDAP_user_password user.use_ssl yes|no yes, the LDAPS protocol is used.ssl_version sslv2|sslv3|tls (Default value: sslv3) ssl_ciphers ciphers used (Default value: ALL) ALL, which allows all ciphers, even those that do not encrypt!suffix directory name timeout delay_in_seconds filter search_filter attrs mail_attribute (Default value: mail) select first | all (Default value: first) scope base | one | sub (Default value: sub) Example:
include_ldap_query
host ldap.cru.fr
suffix dc=cru, dc=fr
timeout 10
filter (&(cn=aumont) (c=fr))
attrs mail
select first
scope one
include_ldap_2level_query
This paragraph defines parameters for a two-level LDAP query returning a list of subscribers. Usually, the first-level query returns a list of DNs and the second-level queries convert the DNs into email addresses. This paragraph is used only if user_data_source is set to include. This feature requires the Net::LDAP (perlldap) Perl module.
host ldap_directory_hostname Example:
host ldap.cru.fr:389,backup-ldap.cru.fr:389
port ldap_directory_port (OBSOLETE) user ldap_user_name passwd LDAP_user_password user.use_ssl yes|no yes, the LDAPS protocol is used.ssl_version sslv2|sslv3|tls (Default value: sslv3) ssl_ciphers ciphers used (Default value: ALL) ALL, which allows all ciphers, even those that do not encrypt!suffix1 directory name timeout1 delay_in_seconds filter1 search_filter attrs1 attribute
The attribute containing the data in the object returned, that will be used for the second-level query. This data is referenced using the syntax [attrs1].
select1 first | all | regex (Default value: first) regex1 regular_expression (Default value: ) select1 is set to regex.scope1 base | one | sub (Default value: sub) suffix2 directory name [attrs1] syntax may be used to substitute data from the first-level query into this parameter.timeout2 delay_in_seconds filter2 search_filter [attrs1] syntax may be used to substitute data from the first-level query into this parameter.attrs2 mail_attribute (Default value: mail) select2 first | all | regex (Default value: first) regex2 regular_expression (Default value: ) select2 is set to regex.scope2 base | one | sub (Default value: sub) Example:
(cn=testgroup,dc=cru,dc=fr should be a groupOfUniqueNames here)
include_ldap_2level_query
host ldap.univ.fr
port 389
suffix1 ou=Groups,dc=univ,dc=fr
scope1 one
filter1 (&(objectClass=groupOfUniqueNames) (| (cn=cri)(cn=ufrmi)))
attrs1 uniquemember
select1 all
suffix2 [attrs1]
scope2 base
filter2 (objectClass=n2pers)
attrs2 mail
select2 first
include_file path_to_file
The file should contain one email address per line with an optional user description, separated from the email address by spaces (lines beginning with a '#' are ignored).
Sample included file:
## Data for Sympa member import john.smith@sample.edu John Smith - math department sarah.hanrahan@sample.edu Sarah Hanrahan - physics department
include_remote_file
This parameter (organized as a paragraph) does the same as the include_file parameter, except that it gets a remote file. Using this method you should be able to include any exotic data source that is not supported by Sympa. The paragraph is made of the following entries:
url url_of_remote_file user user_name passwd user_passwd Example:
include_remote_file url http://www.myserver.edu/myfile user john_netid passwd john_passwd