next up previous contents index
Next: 6. Using Sympa with a relational Up: Sympa Mailing Lists Management Software Previous: 4. sympa.conf parameters   Contents   Index

Subsections

5. WWSympa

WWSympa is Sympa's web interface.


5.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 8.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 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

5.2 Installation

  1. Edit Sympa's main Makefile to customize destination dir, conf location,...

  2. Install Sympa

  3. cutomize your /etc/wwsympa.conf

  4. set sympa.conf parameter wwsympa_url to the base URL of your WWSympa

5.3 wwsympa.conf parameters


5.3.1 alias_manager

If this parameter is undefined, then you will have to manage your aliases manually. Provide the path to a script that will install aliases for a new list and delete aliases for closed lists. You can use the ~sympa/bin/alias_manager.pl script distributed with Sympa. The script will receive the following arguments :

  1. add | del
  2. <list name>
  3. <list domain>
Example : ~sympa/bin/alias_manager.pl add mylistcru.fr

~sympa/bin/alias_manager.pl works on the alias file as defined by the SENDMAIL_ALIASES variable in the main Makefile (see 3.3, page [*]). It runs a newaliases command (via aliaswrapper), after any changes to aliases file.

5.3.2 arc_path

(Default value: /var/www/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.

5.3.3 archive_default_index thrd | mail

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

5.3.4 archived_pidfile

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

5.3.5 bounce_path

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

5.3.6 bounced_pidfile

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

5.3.7 cookie_expire

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

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

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

5.3.10 icons_url

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

5.3.11 log_facility

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

5.3.12 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

5.3.13 title

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

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

5.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, as mhonarc is used to produce not a complete html document, but only part (to be included in a complete document starting with <HTML> and terminating with </HTML> ;-) ) The best way to start is to use the MhOnArc resource file as provided in the WWSympa distribution.

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

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

  2. or ~sympa/bin/mhonarc-ressources

5.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 : ~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 ~sympa/spool/outgoing/. (No need to create nonexistent subscribers to receive copies of messages)

  3. start archived.pl. It MUST run with the same uid/gid as 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 ~sympa/spool/outgoing, and make sure that the owner of this file is Sympa.

         example : su sympa -c "touch ~sympa/spool/outgoing/.rebuild.sympa-fr@cru.fr"
    
    You can also rebuild web archives from within the admin page of the list.

5.6 HTTPD setup

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

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

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


5.8 Sharing WWSympa authentication with other applications

You might want to make other web applications collaborate with Sympa, and share the same authentication system. Sympa uses HTTP cookies to carry users' auth information from page to page. This cookie carries no information concerning privileges. To make your application work with Sympa, you have two possibilities :


next up previous contents index
Next: 6. Using Sympa with a relational Up: Sympa Mailing Lists Management Software Previous: 4. sympa.conf parameters   Contents   Index
root 2001-06-05