next up previous contents index
Next: 6. Using Sympa with a RDBMS 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. Default Sympa installation will also install WWSympa.

Every single piece of HTML in WWSympa is out of the CGI code, in template files (See 8.1, page [*]). This eases internationalization of pages, as well as per-site customization.

The code consists of one single Perl CGI script, wwsympa.fcgi. To ensure good performences you can configure WWSympa to use FastCGI ; the CGI will be persistent in memory.
Every data will be accessed through the CGI, including web archives. This is required to allow the authentication scheme to be applied on everything.

Authentication is based on passwords stored in the database table user_table ; passwords are not crypted to allow reminding of passwords. To keep track of authentication information, WWSympa uses HTTP cookies, stored on the client side. The HTTP cookie only indicates that a specified email address has been authentified ; privileges are evaluated when an action is requested.

The web interface is unique for listmaster, list owners, subscribers, others. They may access the same URLs with a different view of it, depending of their privileges.

WWSympa's main loop's algorithm is roughly :

  1. Check of authentication informations returned by the HTTP cookie

  2. Evaluation of the privileged of the user for the requested action

  3. Processing of the requested action

  4. Setup of variables resulting from the action

  5. Parsing of the HTML template files

5.2 Installation

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

  2. Install Sympa

  3. %make installwws

  4. edit your /etc/wwsympa.conf ; here are the recognized parameters :

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

5.3 MhOnArc

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

The long mhonarc ressource file is used in a special way with WWSympa because mhonarc is used to produce not html document but only part of them that are included in a complete document starting with <HTML> and terminating with </HTML> ;-) The best way to start is to use the MhOnArc ressource file as provided in WWSympa distribution.

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

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

  2. or ~sympa/bin/mhonarc-ressources

5.4 Archiving daemon

archived.pl is intended to convert messages coming from Sympa's spools and to call mhonarc to create html version located according to the "arc_path" wwsympa parameter. You should probably install these archives out of Sympa home_dir. (we think the initial choice of Sympa to store mail archive in the ~sympa/expl/mylist directory). Note that html archive contains a text version of any message and are totaly separed from Sympa's main archive.

  1. create a directory according "arc_path" wwsympa parameter. (must be owned by sympa) do not need to be under apache space unless your server runs a chroot.

  2. foreach list, if you need web archive create a new webarchive pragraph in list config example :
         web_archive
         access public|private|owner|listmaster|closed
    

    If web_archive is define for a list any message distributed by this list is copied in ~sympa/spool/outgoing/. (No need to create crazy subscribers that receive a copy of messages)

  3. launch archived.pl. It MUST run under the same uid/gid then Sympa and Apache

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

  5. If you change mhonarc ressources, in order to rebuild all the archive using the new look define for mhonarc, just create a empty file owned by Sympa in ~sympa/spool/outgoing named ".rebuild.mylist@myhost".

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

5.5.1 wwsympa.fcgi access privilege

Because Sympa and WWsympa share a lot of files wwsympa.fcgi, must run under same uid/gid than archived.pl, bounced.pl and sympa.pl. This can be done by various configuration :

5.5.2 Instaling wwsympa.fcgi in your Apache server

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

     Example :
       	ScriptAlias /wws /home/sympa/bin/wwsympa.fcgi

Running FastCGI will provide much faster responses from your server and lower 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.6 Database configuration

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

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

User information (password and prefs) are stored in «User» table. User passwords stored in database are NOT CRYPTED since WWSympa might need to remind users with their passwords. WWSympa security relies on your database's security.


5.7 Sharing WWSympa authentication with other applications

You might want to make other web applications collaborate with Sympa. Then you need to share the same authentication system. Sympa uses HTTP cookies to carry user's auth information from page to page. This cookie carries no priviliege information. To make your application work with Sympa you have two solutions :


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