next up previous contents index
Next: 4. sympa.conf parameters Up: Sympa Mailing Lists Management Software Previous: 2. Overview, what is it made   Contents   Index

Subsections

3. Installing Sympa

Sympa is a program written in Perl language. It also calls a short program written in C to perform some tasks for which it is not reasonable to entrust an interpreted language.

3.1 Getting Sympa, related links

The Sympa distribution is available from http://listes.cru.fr/sympa/. All important resources are referenced there:

3.2 Prerequisites

Sympa installation and configuration are relatively easy tasks for an administrator who already has a good deal of experience with Unix systems and installation of tools written in Perl.

The user will note that a large part of the installation time will be devoted to installation of the prerequisites if they are not already on the system. The number of ancillary tools required is not really of great importance, but on a current Unix system, it should be possible to do this without much of a problem. We strongly advise carrying out the system installations and checks in the order listed below; these steps will be explained in detail in later sections.

3.2.1 System requirements

You should have a Unix system that is more or less recent in order to be able to use Sympa. In particular, it is necessary that your system have an ANSI C compiler (on the whole, in the case which is of interest to us, your compiler should support prototypes) as well as XPG4-standard NLS (Native Language Support, for languages other than English) extensions.

Sympa has been installed and tested on the following systems, therefore you should not have any special problems:

Anyone willing to port it on NT ? ;-)

If your Unix system has a gencat command as well as catgets(3) and catopen(3) functions, it is likely that it has NLS extensions and that these extensions comply with the XPG4 specifications.

Finally, most Unix systems are now supplied with an ANSI C compiler; if this is not the case, you can install the gcc compiler, which you will find on the nearest GNU site, for example in France.

To complete the operation, you should make sure that you have a recent enough release of the sendmail MTA, e.g. release 8.9.x or a more recent release. You may also use postfix or qmail.

3.2.2 Install Berkeley DB (NEWDB)

Unix systems often have a highly simple system to manage indexed files. This consists of extensions known under the name dbm and ndbm. For many programs, these are not sufficient, and in particular for Sympa, which uses the DB package initially developed at the University of California in Berkeley, and which is now maintained by the company Sleepycat software. Many UNIX systems like Linux, FreeBSD or Digital Unix 4.x have the DB package in the standard version. If not you should install this tool if you have not already done so.

You can retrieve DB on the Sleepycat site and read its documentation to install it in your system.

3.2.3 Install Perl and CPAN modules

To be able to use Sympa, you must have release 5.004_03 of the Perl language or a later release and several CPAN modules.

At make time, check_perl_modules.pl script is run to check required Perl and CPAN modules versions. If a CPAN module is missing or out of date, this script will install it for you.

You can also download and install CPAN modules yourself. You will find a current release of the Perl interpreter in the nearest CPAN archive. If you do not know where to find a nearby site, use the CPAN multiplexer; it will find one for you.

3.2.4 Required CPAN modules

Here are CPAN modules required by Sympa that not incuded in Perl's distribution. We'll try to keep this list uptodate ; if you have any doubt run check_perl_modules.pl script.

Since release 2, Sympa requires a DMBS to work properly. It stores users subscriptions and preferences in a database. Sympa is also able to extract user data from within an external database. These features require that you install database-related Perl libraries. This includes the generic Database interface (DBI) and a Database Driver for your RDBMS (DBD) :

If you plan to interface Sympa with an LDAP directory to build dynamical mailing lists, you need to install Perl LDAP libraries :

3.2.5 Create a Unix user

Last step before installing Sympa: create a Unix user, and preferably, a group specific to the program. Most of the installation will be carried out with this account. We suggest that you use the name sympa for both user and group. Note that UID.GID must be the same as your httpd. If you are running a dedicated httpd server, this can be sympa.sympa, else it is possible either to define a virtual httpd server setting UID GID, either to run Sympa as nobody.nobody. This last solution is not safe because the information managed by Sympa will be owned by nobody.

In the rest of this documentation, numerous files will be located in the user's login directory which you will have created in your system or in a sub-directory. We will mark this login directory with ~sympa/.

3.3 Compilation and installation

Before using Sympa, you have to customize the sources so that you can specify a few specific parameters in your installation.

To start, extract the sources from the archive file, for example from the ~sympa/ directory: the archive will create a directory named sympa-2.7/ where all the useful files and directories will be located. In particular, you will have a doc/ directory containing this documentation in various formats, a sample/ directory containing a few examples of a configuration file, nls/ directory where multi-linguage messages are stored and of course, the src/ directory for the mail robot and wwsympa for the web interface.

Example:

# su -
$ gzip -dc sympa-2.7.tar.gz | tar xf -

Before running make in the main directory, you have to edit and configure Makefile so that you can customize the first part in them. We advise against changing anything located after the STOP line.

The Makefile file contains explanations for the fields, which you may have to change. They are mainly :

Once this file has been configured, you need to run make;make install commands. This generates the binary for the queue program, and the nls and installs the Sympa and WWSympa programs in their final slot, while having propagated a few parameters in the Perl files, as for example the access path to the Perl program. The make command includes a checking of cpan modules.

If everything goes smoothly, the ~sympa/bin/ directory will contain various Perl programs as well as the queue binary. You will note that this binary has the set-uid-on-exec bit (owner is the sympa user): this is normal and indispensable for Sympa to run correctly.

3.3.1 Choosing directory location

All directories are defined in /etc/sympa.conf file which is read by Sympa at runtime. While installing Sympa, if no sympa.conf file was found, a sample one will be installed. To see the default directories organization refer to 2.1, page [*].

It is possible to disperse files and directories everywhere in the Unix system, however we recommand storing all the directories and files in the sympa user's login directory.

You also have to create these directories now. You can use restrictive authorizations if you like, since only programs running with the sympa account will have to access them.


3.4 Robot aliases

An electronic list manager such as Sympa runs in two steps:

To differentiate processing of administrative requests (subscription, unsubscription, help request, etc.) from messages sent to a list, a special mail alias is reserved for administrative requests, so that Sympa can be accessible and users can join it. Thus, the lines below must be added to the sendmail alias file (often /etc/aliases):

sympa:             "| /home/sympa/bin/queue sympa"
listmaster: 	   "| /home/sympa/bin/queue listmaster"
bounce+*:          "| /home/sympa/bin/bouncequeue sympa"
sympa-request:     postmaster
sympa-owner:       postmaster

sympa-request should be the address of the robot administrator, who is the person who takes care of Sympa management (here postmaster@cru.fr).

sympa-owner is the return address for Sympa error messages.

The alias bounce+* is dedicated to collect bounces. It is usefull only if at least one list use welcome_return_path unique or remind_return_path unique. Do not forget to run newaliases after any change to the /etc/aliases file!

Note: aliases based on listserv (in addition to those based on sympa) can be added in order to facilitate the task of users accustomed to the listserv and majordomo names. For example:

listserv:          sympa
listserv-request:  sympa-request
majordomo:         sympa
listserv-owner:    sympa-owner

Note: it will also be necessary to add entries in this alias file to create lists (see list creation section, 9.1, page [*]).

3.5 Logs

Sympa keeps traces of each of its procedures in its log file. Nevertheless, this requires configuration of the syslogd daemon. Sympa's by default is to use local1 facility (syslog parameter in sympa.conf) ,WWSympa uses (log_facility parameter in wwsympa.conf), the default is Sympa's log facility.
Thus, a line must be added in the syslogd configuration file (/etc/syslog.conf). For example:

local1.*       /var/log/sympa

Then reload syslogd.

Depending on your platform, your syslog daemon may use either UDP or Unix socket. Sympa's default is to use Unix socket ; you may change this behaviour by editing sympa.conf's log_socket_type parameter (4.3.2, page [*]).

3.6 Daemon loading

Once all files are configured, all you have to do is start Sympa. At startup, sympa.pl will change its UID to sympa (as defined in Makefile). To do this, add the following sequence or its equivalent in your /etc/rc.local:

~sympa/bin/sympa.pl
~sympa/bin/archived.pl
~sympa/bin/bounced.pl

sympa.pl recognises the following command line arguments:


next up previous contents index
Next: 4. sympa.conf parameters Up: Sympa Mailing Lists Management Software Previous: 2. Overview, what is it made   Contents   Index
root 2001-01-16