Next: 9. Sympa RSS channel Up: Sympa Mailing Lists Management Software version Previous: 7. Sympa and its database Contents Index
Subsections

- 8.1 Organization
- 8.2 Web server setup
  - 8.2.1 wwsympa.fcgi access permissions
  - 8.2.2 Installing wwsympa.fcgi in your Apache server
  - 8.2.3 Using FastCGI
- 8.3 wwsympa.conf parameters
  - 8.3.1 arc_path
  - 8.3.2 archive_default_index thrd | mail
  - 8.3.3 archived_pidfile
  - 8.3.4 bounce_path
  - 8.3.5 bounced_pidfile
  - 8.3.6 cookie_expire
  - 8.3.7 cookie_domain
  - 8.3.8 default_home
  - 8.3.9 icons_url
  - 8.3.10 log_facility
  - 8.3.11 mhonarc
  - 8.3.12 htmlarea_url
  - 8.3.13 password_case sensitive | insensitive
  - 8.3.14 title
  - 8.3.15 use_fast_cgi 0 | 1
- 8.4 MhOnArc
- 8.5 Archiving daemon
- 8.6 Database configuration
- 8.7 Logging in as listmaster
- 8.8 RSS channel

# 8. WWSympa, Sympa's web interface

WWSympa is Sympa's web interface.

#
8.1 Organization

WWSympa is fully integrated with Sympa. It uses `sympa.conf` and Sympa's libraries. The default Sympa installation will also install WWSympa.

Every single piece of HTML in WWSympa is generated by the CGI code using template files (See 14.1, page ). This facilitates internationalization of pages, as well as per-site customization.

The code consists of one single PERL CGI script, `WWSympa.fcgi`. To enhance performance you can configure WWSympa to use FastCGI ; the CGI will be persistent in memory.
All data will be accessed through the CGI, including web archives. This is required to allow the authentication scheme to be applied systematically.

Authentication is based on passwords stored in the database table user_table ; if the appropriate `Crypt::CipherSaber` is installed, password are encrypted in the database using reversible encryption based on RC4. Otherwise they are stored in clear text. In both cases reminding of passwords is possible. To keep track of authentication information WWSympa uses HTTP cookies stored on the client side. The HTTP cookie only indicates that a specified e-mail address has been authenticated ; permissions are evaluated when an action is requested.

The same web interface is used by the listmaster, list owners, subscribers and others. Depending on permissions, the same URL may generate a different view.

WWSympa's main loop algorithm is roughly the following :

1. Check authentication information returned by the HTTP cookie

2. Evaluate user's permissions for the requested action

3. Process the requested action

4. Set up variables resulting from the action

5. Parse the HTML template files

# 8.2 Web server setup

## 8.2.1 wwsympa.fcgi access permissions

Because Sympa and WWSympa share a lot of files, `wwsympa.fcgi`, must run with the same uid/gid as `archived.pl`, `bounced.pl` and `sympa.pl`. There are different ways to organize this :

- With some operating systems no special setup is required because wwsympa.fcgi is installed with suid and sgid bits, but this will not work if suid scripts are refused by your system.

- Run a dedicated Apache server with sympa.sympa as uid.gid (The Apache default is nobody.nobody)

- Use a Apache virtual host with sympa.sympa as uid.gid ; Apache needs to be compiled with suexec. Be aware that the Apache suexec usually define a lowest UID/GID allowed to be a target user for suEXEC. For most systems including binaries distribution of Apache, the default value 100 is common. So Sympa UID (and Sympa GID) must be higher then 100 or suexec must be tuned in order to allow lower UID/GID. Check http://httpd.apache.org/docs/suexec.html#install for details

  The User and Group directive have to be set before the FastCgiServer directive is encountered.

- Otherwise, you can overcome restrictions on the execution of suid scripts by using a short C program, owned by sympa and with the suid bit set, to start `wwsympa.fcgi`. Here is an example (with no guarantee attached) :

      #include <unistd.h>

      #define WWSYMPA "/usr/local/sympa-os/bin/wwsympa.fcgi"

      int main(int argn, char **argv, char **envp) {
          argv[0] = WWSYMPA;
          execve(WWSYMPA,argv,envp);
      }

## 8.2.2 Installing wwsympa.fcgi in your Apache server

If you chose to run `wwsympa.fcgi` as a simple CGI, you simply need to script alias it.

         Example :
           	ScriptAlias /sympa /usr/local/sympa-os/bin/wwsympa.fcgi

Running FastCGI will provide much faster responses from your server and reduce load (to understand why, read http://www.fastcgi.com/fcgi-devkit-2.1/doc/fcgi-perf.htm)

         Example :
    	FastCgiServer /usr/local/sympa-os/bin/wwsympa.fcgi -processes 2
    	<Location /sympa>
       	  SetHandler fastcgi-script
    	</Location>

    	ScriptAlias /sympa /usr/local/sympa-os/bin/wwsympa.fcgi

If you run Virtual robots, then the FastCgiServer(s) can serve multiple robots. Therefore you need to define it in the common section of your Apache configuration file.

## 8.2.3 Using FastCGI

FastCGI is an extention to CGI that provides persistency for CGI programs. It is extemely useful with WWSympa since source code interpretation and all initialisation tasks are performed only once, at server startup ; then file wwsympa.fcgi instances are waiting for clients requests.

WWSympa can also work without FastCGI, depending on the use_fast_cgi parameter (see 8.3.15, page ).

To run WWSympa with FastCGI, you need to install :

- mod_fastcgi : the Apache module that provides FastCGI features

- `FCGI` : the Perl module used by WWSympa

# 8.3 wwsympa.conf parameters

## 8.3.1 arc_path

(Default value: `/home/httpd/html/arc`)
Where to store html archives. This parameter is used by the `archived.pl` daemon. It is a good idea to install the archive outside the web hierarchy to prevent possible back doors in the access control powered by WWSympa. However, if Apache is configured with a chroot, you may have to install the archive in the Apache directory tree.

## 8.3.2 archive_default_index thrd | mail

(Default value: `thrd`)
The default index organization when entering web archives : either threaded or chronological order.

## 8.3.3 archived_pidfile

(Default value: `archived.pid`)
The file containing the PID of `archived.pl`.

## 8.3.4 bounce_path

(Default value: `/var/bounce`)
Root directory for storing bounces (non-delivery reports). This parameter is used mainly by the `bounced.pl` daemon.

## 8.3.5 bounced_pidfile

(Default value: `bounced.pid`)
The file containing the PID of `bounced.pl`.

## 8.3.6 cookie_expire

(Default value: `0`) Lifetime (in minutes) of HTTP cookies. This is the default value when not set explicitly by users.

## 8.3.7 cookie_domain

(Default value: `localhost`)
Domain for the HTTP cookies. If beginning with a dot ('.'), the cookie is available within the specified internet domain. Otherwise, for the specified host. Example :

    		   cookie_domain cru.fr
    		   cookie is available for host 'cru.fr'

    		   cookie_domain .cru.fr
    		   cookie is available for any host within 'cru.fr' domain

The only reason for replacing the default value would be where WWSympa's authentication process is shared with an application running on another host.

## 8.3.8 default_home

(Default value: `home`)
Organization of the WWSympa home page. If you have only a few lists, the default value `home' (presenting a list of lists organized by topic) should be replaced by `lists' (a simple alphabetical list of lists).

## 8.3.9 icons_url

(Default value: `/icons`)
URL of WWSympa's icons directory.

## 8.3.10 log_facility

WWSympa will log using this facility. Defaults to Sympa's syslog facility. Configure your syslog according to this parameter.

## 8.3.11 mhonarc

(Default value: `/usr/bin/mhonarc`)
Path to the (superb) MhOnArc program. Required for html archives http://www.oac.uci.edu/indiv/ehood/mhonarc.html

## 8.3.12 htmlarea_url

(Default value: `undefined`)
Relative URL to the (superb) online html editor HTMLarea. If you have installed javascript application you can use it when editing html document in the shared document repository. In order to activate this pluggin the value of this parameter should point to the root directory where HTMLarea is installed. HTMLarea is a free opensource software you can download here : http://sf.net/projects/itools-htmlarea/

## 8.3.13 password_case sensitive | insensitive

(Default value: `insensitive`)
If set to insensitive, WWSympa's password check will be insensitive. This only concerns passwords stored in Sympa database, not the ones in LDAP.

Be careful : in previous 3.xx versions of Sympa, passwords were lowercased before database insertion. Therefore changing to case-sensitive password checking could bring you some password checking problems.

## 8.3.14 title

(Default value: `Mailing List Service`)
The name of your mailing list service. It will appear in the Title section of WWSympa.

##
8.3.15 use_fast_cgi 0 | 1

(Default value: `1`)
Choice of whether or not to use FastCGI. On listes.cru.fr, using FastCGI increases WWSympa performance by as much as a factor of 10. Refer to http://www.fastcgi.com/ and the Apache config section of this document for details about FastCGI.

# 8.4 MhOnArc

MhOnArc is a neat little converter from mime messages to html. Refer to http://www.oac.uci.edu/indiv/ehood/mhonarc.html.

The long mhonarc resource file is used by WWSympa in a particular way. MhOnArc is called to produce not a complete html document, but only a part of it to be included in a complete document (starting with `<`HTML`>` and terminating with `<`/HTML`>` ;-) ). The best way is to use the MhOnArc resource file provided in the WWSympa distribution and to modify it for your needs.

The mhonarc resource file is named `mhonarc-ressources`. You may locate this file either in

1. `/usr/local/sympa-os/expl/mylist/mhonarc-ressources` in order to create a specific archive look for a particular list

2. or `/usr/local/sympa-os/etc/mhonarc-ressources`

# 8.5 Archiving daemon

`archived.pl` converts messages from Sympa's spools and calls `mhonarc` to create html versions (whose location is defined by the "arc_path" WWSympa parameter). You should probably install these archives outside the Sympa home_dir (Sympa's initial choice for storing mail archives : `/usr/local/sympa-os/expl/mylist`). Note that the html archive contains a text version of each message and is totally separate from Sympa's main archive.

1. create a directory according to the WWSympa "arc_path" parameter (must be owned by sympa, does not have to be in Apache space unless your server uses chroot)

2. for each list, if you need a web archive, create a new web archive paragraph in the list configuration. Example :

            web_archive
            access public|private|owner|listmaster|closed
            quota 10000

   If web_archive is defined for a list, every message distributed by this list is copied to `/usr/local/sympa-os/spool/outgoing/`. (No need to create nonexistent subscribers to receive copies of messages). In this example disk quota for the archive is limited to 10 Mo.

3. start `archived.pl`. Sympa and Apache

4. check WWSympa logs, or alternatively, start `archived.pl` in debug mode (-d).

5. If you change mhonarc resources and wish to rebuild the entire archive using the new look defined for mhonarc, simply create an empty file named ".rebuild.mylist@myhost" in `/usr/local/sympa-os/spool/outgoing`, and make sure that the owner of this file is Sympa.

            example : su sympa -c "touch /usr/local/sympa-os/spool/outgoing/.rebuild.sympa-fr@cru.fr"

   You can also rebuild web archives from within the admin page of the list.

   Furthermore, if you want to get list's archives, you can do it via the `List-admin menu-> Archive Management`

# 8.6 Database configuration

WWSympa needs an RDBMS (Relational Database Management System) in order to run. All database access is performed via the Sympa API. Sympa currently interfaces with MySQL, PostgreSQL, Oracle and Sybase.

A database is needed to store user passwords and preferences. The database structure is documented in the Sympa documentation ; scripts for creating it are also provided with the Sympa distribution (in `script`).

User information (password and preferences) are stored in the «User» table. User passwords stored in the database are encrypted using reversible RC4 encryption controlled with the `cookie` parameter, since WWSympa might need to remind users of their passwords. The security of WWSympa rests on the security of your database.

# 8.7 Logging in as listmaster

Once Sympa is running you should log in on the web interface as a privileged user (listmaster) to explore the admin interface, create mailing lists.

Multiple email addresses can be declared as listmaster via the `sympa.conf` (or `robot.conf`) `listmaster` configuration parameter (see 6, page ). Note that listmasters on the main robot (declared in `sympa.conf`) also have listmaster privileges on the virtual robots but they will not receive the various mail notifications (list creation, warnings,...) regarding these virtual robots.

The listmasters should log in with their canonical email address as an identifier (not listmaster@my.host). The associated password is not declared in sympa.conf ; it will be allocated by Sympa when first hitting the Send me a password button on the web interface. As for any user, the password can then be modified via the Preferenced menu.

Note that you must start the `sympa.pl` process with the web interface ; it is in responsible for delivering mail messages including password reminders.

# 8.8 RSS channel

See 9, page .

Next: 9. Sympa RSS channel Up: Sympa Mailing Lists Management Software version Previous: 7. Sympa and its database Contents Index