WWSympa is Sympa's web interface.
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 :
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 :
~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.
(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.
(Default value: thrd)
The default index organization when entering web archives : either threaded or
chronological order.
cookie_domain cru.fr cookie is available for host 'cru.fr' cookie_domain .cru.fr cookie is available for any host within 'cru.fr' domainThe only reason for replacing the default value would be where WWSympa's authentication process is shared with an application running on another host.
WWSympa will log using this facility. Defaults to Sympa's syslog facility. Configure your syslog according to this parameter.
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
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.
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)
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.
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 :
#include <unistd.h> #define WWSYMPA "/home/sympa/bin/wwsympa.fcgi" int main(int argn, char **argv, char **envp) { execve(WWSYMPA,argv,envp); }
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
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.
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 :
user=<user_email>:<md5>
where <user_email> is the user's complete e-mail address, and <md5> is a MD5 checksum of the <user_email>+Sympa cookie configuration parameter. Your application needs to know what the cookie parameter is, so it can check the HTTP cookie validity ; this is a secret shared between WWSympa and your application. WWSympa's loginrequest page can be called to return to the referrer URL when an action is performed. Here is a sample HTML anchor :
<A HREF="/wws/loginrequest/referrer">Login page</A>