next up previous contents index
Next: 7. Sympa and its database Up: Sympa Mailing Lists Management Software version Previous: 5. sympa.conf parameters   Contents   Index

Subsections

6. WWSympa

WWSympa is Sympa's web interface.


6.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 11.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

6.2 HTTPD setup

6.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 :

6.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 /wws /home/sympa/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 /home/sympa/bin/wwsympa.fcgi -processes 2
	<Location /wws>
   	  SetHandler fastcgi-script
	</Location>

	ScriptAlias /wws /home/sympa/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.

6.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 6.3.14, page [*]).

To run WWSympa with FastCGI, you need to install :

6.3 wwsympa.conf parameters

6.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.

6.3.2 archive_default_index thrd | mail

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

6.3.3 archived_pidfile

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

6.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.

6.3.5 bounced_pidfile

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

6.3.6 cookie_expire

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

6.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.

6.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).

6.3.9 icons_url

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

6.3.10 log_facility

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

6.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

6.3.12 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 .

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.

6.3.13 title

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


6.3.14 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.

6.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. /home/sympa/expl/mylist/mhonarc-ressources in order to create a specific archive look for a particular list

  2. or /home/sympa/etc/mhonarc-ressources

6.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 : /home/sympa/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
    

    If web_archive is defined for a list, every message distributed by this list is copied to /home/sympa/spool/outgoing/. (No need to create nonexistent subscribers to receive copies of messages)

  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 /home/sympa/spool/outgoing, and make sure that the owner of this file is Sympa.

         example : su sympa -c "touch /home/sympa/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

6.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.


next up previous contents index
Next: 7. Sympa and its database Up: Sympa Mailing Lists Management Software version Previous: 5. sympa.conf parameters   Contents   Index
root 2003-08-12