<?xml version="1.0" encoding="ISO-8859-1"?>

<!-- CVS ID: $Id: README,v 1.1.1.1 2000/02/01 12:01:11 wastl Exp $ -->

<README>
  <TITLE>WebMail v0.7.0</TITLE>
  <AUTHOR>Sebastian Schaffert, schaffer@informatik.uni-muenchen.de</AUTHOR>
  <SECTION name="Contents" id="contents"><CONTENTS/></SECTION>
  <SECTION name="What is WebMail" id="about">
    <P>
	WebMail is a server application that allows ISPs to provide a WWW interface 
	for each user to his mailbox(es) (similar to the programs YahooMail or HotMail 
	use). WebMail should scale well enough to support large userbases and 
	should be easy enough to be used in a home LAN.
    </P>

    <P>
	Features include:
	<LIST>
	  <ITEM>Gives a user full access to his/her IMAP mailbox through a simple-to-use WWW interface</ITEM>
	  <ITEM>Supports multiple folders on multiple hosts, depending on mail protocol used 
	        (IMAP supports different folders on the same host, POP doesn't)</ITEM>
	  <ITEM>100% HTML 3.2/4.0 output, no Javascript, no Java on the Client side</ITEM>
          <ITEM>supports multiple languages, configurable for each user</ITEM>
          <ITEM>Standalone HTTP-server completely written in Java</ITEM>
          <ITEM>Improved session management keeps mail connections alive</ITEM>
          <ITEM>Improved speed compared to CGI scripts (about factor 5-10, depending on usage)</ITEM>
          <ITEM>Usage of JavaMail-API ensures compatibility to many mailstandards 
                ("officially" supported and tested: IMAPv4)</ITEM>
          <ITEM>Open Source distribution allows easy customization</ITEM>
          <ITEM>webbased administration interface</ITEM>
          <ITEM>support for multiple virtual user domains</ITEM>
          <ITEM>Easily add new features through the WebMail modular plugin concept 
                (support for dependencies, hooking into URLs, etc)</ITEM>
       </LIST>
    </P>

    <P>
	Who should use WebMail:<BR/>
	WebMail's primary goal is to provide ISPs, companies and universities with a 
	simple and zero-cost solution to give WWW mailaccess to their users.<BR/>
	Users can read and write their email while they are sitting in an Internet-Cafe,
	at expositions, etc without having to carry their PC around.<BR/>
	It is not intended as a replacement for the different personal email clients, 
	but as a supplement for an existing mail solution.<BR/>
	The secondary goal is to unify a user's different email accounts under one 
	interface which is easily accomplished using WebMails folder capability.
    </P>
  </SECTION>

  <SECTION name="Installation" id="install">
    <SUBSECTION name="Introduction" id="install:introduction">
      <P>
        There are two different ways to install WebMail, the <EM>standalone installation</EM> and the
        <EM>Java Servlet installation</EM>. Which one you should choose depends on what you plan to do
	with WebMail:
        <LIST>
          <ITEM>
	    a <STRONG>standalone server</STRONG> is much easier to install and will allow you to run
	    WebMail almost immediately without much configuration. This can be used if you want to
            evaluate WebMail's capabilities or develop new features/bugfixes. It also makes sense to
            use this for small to medium installations if you don't want to set up a Java Servlet
            capable webserver
          </ITEM>
          <ITEM>
            a <STRONG>Java Servlet installation</STRONG> is recommended for production use since it 
	    allows greater performance and scalability. You will need to set up a webserver that is
            capable of serving Java Servlets, e.g. Apache. I can't give too detailed instructions here
            since this depends in large parts on your webserver, but I include a sample Apache 
            configuration (the parts relevant to WebMail) in the distribution
          </ITEM>
        </LIST>
      </P>
      <P>
         There are also several ways to store data:
         <LIST>
           <ITEM>
             You could use the simple file-based storage which stores configuration data in XML documents 
             and is very easy to set up, but perhaps not very fast.
           </ITEM>
           <ITEM>
             The performance method however is to store the configuration in a SQL database. Currently
             only MySQL is supported, but it is easy to implement storage on Oracle or PostgreSQL.
             Using a SQL database for storage has several advantages which I will describe below.
           </ITEM>
         </LIST>
      </P>
    </SUBSECTION>

    <SUBSECTION name="Standalone Server" id="install:standalone">
      <SUBSUBSECTION name="Requirements" id="install:standalone:requirements">
        <P>
	  To run WebMail properly on your server, you need to have the following software 
	  installed:
          <LIST>
	    <ITEM>Java 1.1.6 or better - see <A HREF="#java">the Java Section</A> on Java issues</ITEM>
            <ITEM>
              About 20 megs of RAM (minimum) plus additional 80 megs on high load servers
              (these are just recommendations, WebMail will run on any Java-capable server;
              if you have less than 32 MB RAM, you should try to adjust the settings in
              the startup script called webmail.sh/webmail.bat)
            </ITEM>
            <ITEM>
	      Using a JIT ("just in time compiler") is greatly recommended! The Solaris and Windows 
	      JDKs from Sun use a JIT by default (sunwjit). On Linux, the Sun/Blackdown JDK uses a JDK,
	      however it is not very fast, so you could profit from using a JIT like tya. The IBM Linux 
              JDK 1.1.8 comes with a very fast JIT (actually the fastest Java platform available).
            </ITEM>
          </LIST>
        </P>
        <P>
          WebMail has been successfully tested on:
          <LIST>
            <ITEM>Solaris x86 and SPARC, JDK 1.1.6 and JDK 1.2</ITEM>
            <ITEM>Linux x86 (tested: Debian and SuSE), IBM JDK 1.1.8 and Sun/Inprise JDK 1.2.2 (RC3)</ITEM>
            <ITEM>FreeBSD 3.4 x86, JDK 1.1.8</ITEM>
            <ITEM>Windows NT/2000 (did not do the tests myself)</ITEM>
          </LIST>
        </P>
        <P>
	  WebMail will make profit of multiprocessor machines (e.g. Sun Enterprise 450) as
	  it is multithreaded in large parts.<BR/>
        </P>
      </SUBSUBSECTION>

      <SUBSUBSECTION name="Binary Installation" id="install:standalone:binary">
        <P>
          <NLIST>
	    <ITEM>Change to the prefix where you want to install WebMail (e.g. /usr/local)</ITEM>
            <ITEM>Unpack the tar.gz or zip archive: <CODE>tar xzvf webmail-0.7.0.tar.gz</CODE></ITEM>
            <ITEM>Change to webmail/bin</ITEM>
	    <ITEM>Edit the file webmail.sh if necessary</ITEM>
            <ITEM>Start WebMail using the provided script 
                  <CODE>./webmail.sh >> stdout.log 2>&amp;1 &amp;</CODE></ITEM>
            <ITEM>See <A HREF="#config">Configuration</A> for further steps to take.</ITEM>
          </NLIST>
        </P>
      </SUBSUBSECTION>

      <SUBSUBSECTION name="Source Installation" id="install:standalone:source">
        <P>
          <NOTE>Source installation will definately only work on Unix systems!</NOTE>
          <NOTE>Source installation is only really useful for developers since you don't need to
                (and cannot) adapt the program to your specific system settings in Java and I already
                compile with optimization turned on.</NOTE>
	</P>
        <P>
	  Additional requirements:
          <LIST>
	    <ITEM>GNU make (Only GNU make will work)</ITEM>
            <ITEM>zip/unzip</ITEM>
          </LIST>
        </P>
        <P>
          To install the source distribution of WebMail you will have to take the following steps:
          <NLIST>
            <ITEM>Change to the src/ subdirectory</ITEM>
            <ITEM>Set the CLASSPATH environment variable to your classes.zip (JDK 1.1) or
                  rt.jar (JDK 1.2) archives (on Solaris: /usr/java1.1/lib/classes.zip for
                  JDK 1.1 and /usr/java1.2/jre/lib/rt.jar for JDK 1.2)
            </ITEM>
            <ITEM>Have a look at the makefile and edit it if necessary</ITEM>
            <ITEM>
              Call "make" to compile the classfiles and create the archives
	      (containing classfiles, language dependent HTML templates and images).<BR/>            
	      You will find the compiled archives in the lib/ directory when the 
              compilation was successful. 
            </ITEM>
            <ITEM>See steps 3 to 5 from binary installation then</ITEM>
          </NLIST>
        </P>
      </SUBSUBSECTION>
    </SUBSECTION>

    <SUBSECTION name="Servlet Installation" id="install:servlet">
	<P>
          Running WebMail as a Servlet has several advantages over the standalone installation (and
          also some disadvantages):
          <LIST>
            <ITEM>you can run (and integrate) WebMail on an already-running webserver</ITEM>
            <ITEM>
              you can make use of the webserver's fast connection handling and HTTP parsing routines
            </ITEM>
            <ITEM>
              you can e.g. use Apache's load-balancing feature to run WebMail on a whole server cluster
              for large installation.
            </ITEM>
            <ITEM>
              installation is however much more complicated (and so it is definately not suited for 
              webserver newbies)
            </ITEM>
          </LIST>
        </P>
        <P>
	  Before trying this, please ensure that you are familiar with your Webserver's
	  Servlet configuration. I provided a sample zone file for Apache, though (but
	  you will have to do many modifications concerning the initArgs at the end of
	  the file).
        </P>
        <P>
	  To make use of this feature you have to:
          <NLIST>
            <ITEM>Configure your webserver to run Java Servlets</ITEM>
            <ITEM>
              Add the net.wastl.webmail.servlet.WebMailServlet servlet to your servlet
              repository (and add all the jar files provided here to the classpath)
            </ITEM>
            <ITEM>
              Add the necessary initArgs to the servlet configuration for WebMail. These are:
     	      <TABLE>
                <TR>
                  <TD><CODE>webmail.plugin.path</CODE></TD>
                  <TD>Path to the plugin directory</TD>
                </TR>
                <TR>
	          <TD><CODE>webmail.auth.path</CODE></TD>
                  <TD>Path to the authenticator directory </TD>
                </TR>
                <TR>
                  <TD><CODE>webmail.data.path</CODE></TD> <TD>Path were data will be stored (this has to be 
                             writeable by the process owner of the webserver)</TD>
                </TR>
                <TR>
                  <TD><CODE>webmail.lib.path</CODE></TD>
                  <TD>Path to WebMail libraries</TD>
                </TR>
                <TR>
                  <TD><CODE>webmail.template.path</CODE></TD> 
                  <TD>Path to language dependent template files</TD>
                </TR>
                <TR>
                  <TD><CODE>webmail.storage</CODE></TD>
                  <TD>Set this to <CODE>net.wastl.webmail.storage.simple.SimpleStorage</CODE> for the simple 
                      storage and to <CODE>net.wastl.webmail.storage.mysql.MySQLStorage</CODE> for the MySQL
                      based storage</TD>
                </TR>
              </TABLE>
            </ITEM>
            <ITEM>
              Ensure that all webmail directories are readable for the WWW-user and that
              the data directory is writeable by the WWW user.
            </ITEM>
          </NLIST>
        </P>
        <P>
	  To simplify the above, I provided an Apache JServ zone file called 
	  <CODE>webmail-servlet.properties</CODE> in the root directory. You will just have to i 
	  modify this file to fit your configuration (mainly the initArgs at the bottom 
	  of the file), add a new zone to your Apache configuration and then call 
	  webmail with <CODE>http://www.yourdomain.top/[mountpoint]/webmail</CODE>
        </P>
        <P>
          Please note that I haven't tested this with a different server than Apache and
          that it is still experimental.
        </P>
    </SUBSECTION>

    <SUBSECTION name="Storage Methods" id="install:mysql">
      <P>
        By default, WebMail uses a so-called SimpleStorage to store user and system configurations, i.e.
        the data is stored in separate (XML-) files. This is a very easy but not very efficient method.
      </P>
      <P>
        A more performant method is WebMail's MySQL storage where the data is stored in a MySQL database
        instead. This has all the advantages of a standardized database management system plus a smaller
	memory footprint (per session) since data doesn't need to be cached.
      </P>

      <SUBSUBSECTION name="Why and when use WebMail with MySQL" id="install:mysql:advantages">
        <P>
	  Using MySQL to store the WebMail data has several advantages, e.g.:
          <LIST>
	    <ITEM>User configuration is compatible over different WebMail versions</ITEM>
            <ITEM>DBMS allow easy backup and management</ITEM>
	    <ITEM>DBMS might be faster than file access</ITEM>
	    <ITEM>You can change the WebMail configuration with any tool you like (you can
	          edit users even while WebMail is running, changes are active immediately)</ITEM>
	    <ITEM>you could write simple PHP3 or Perl scripts that perform some kind of user 
	          creation, perhaps asking the user for extra information like address etc and	
	          storing that separately</ITEM>
          </LIST>
        </P>
        <P>
	  Clearly, this also has some disadvantages:
          <LIST>
            <ITEM>You will have to do some extra configuration work to set up MySQL as well as
	          WebMail before you can start</ITEM>
	    <ITEM>DBMS also might be slower than file access, depending on configuration</ITEM>
          </LIST>
        </P>
        <P>
	  When you should consider using MySQL:
          <LIST>
	    <ITEM>You have a large userbase</ITEM>
	    <ITEM>You are running MySQL commercially</ITEM>
	    <ITEM>You already have a (My)SQL database that stores user data (e.g. addresses, 
	          passwords, ...) and want to give your users WebMail access</ITEM>
	    <ITEM>You use WebMail on a load balancing Apache server as servlet. Thus you can set
	          up an additional MySQL server that stores all the data.</ITEM>
            <ITEM>etc.</ITEM>
	  </LIST>
        </P>
      </SUBSUBSECTION>
      <SUBSUBSECTION name="Preparing MySQL" id="install:mysql:prepare">
	<P>
          This document assumes that you already have a running MySQL server. If you 
	  don't, please set up MySQL and consult the documents provided with it.
        </P>
        <P>
          <NLIST>
	    <ITEM>
              Set up a user/password for webmail that has access from the host WebMail 
	      will be running on (don't forget to <CODE>FLUSH PRIVILEGES</CODE> after that).
	      Give it all privileges (i.e. set everything to 'Y'=). You may change that
	      to access only the "webmail"-database after the database is set up. 
            </ITEM>
            <ITEM>
	      In the WebMail contrib directory, have a look at the file mysql_scheme.sql.
	      This file contains the DDL statements for creating a database called 
	      "webmail" and creating the necessary tables and relations. You might want
	      to change the database name to something different than "webmail"
            </ITEM>
            <ITEM>
	      Execute <CODE>mysql -u [webmailuser] -p &lt; mysql_scheme.sql</CODE>.
              Please substitute [webmailuser] with the user you configured in step 1.
              This will first ask you for the password that you gave the webmail user in 
              step 1 and then execute the DDL statements.
            </ITEM>
          </NLIST>
        </P>
        <P>
          MySQL is now set up to work with WebMail.
        </P>
      </SUBSUBSECTION>
      <SUBSUBSECTION name="Setting up WebMail for use with MySQL" id="install:mysql:webmail">
        <P>
	  Setting up WebMail is quite simple. All changes will be done in the startup
	  script <CODE>webmail.sh</CODE> (or <CODE>webmail.bat</CODE> under Windows or initArgs 
	  in case of a servlet installation) in the bin/ directory. The corresponding servlet configuration 
	  options are given in "(" and ")".
        </P>
        <P>
          <NLIST>
            <ITEM>Change the value of the <CODE>STORAGE</CODE> variable 
	         (or <CODE>webmail.storage</CODE> initArg) to 
                 <CODE>net.wastl.webmail.storage.mysql.MySQLStorage</CODE>
            </ITEM>
            <ITEM>
	      Change the variables <CODE>SQL_LOGIN</CODE> and <CODE>SQL_PASS</CODE> 
              (or <CODE>webmail.storage.sqllogin</CODE> and <CODE> webmail.storage.sqlpass</CODE> initArgs)
	      to the values you configured in section 4, step 1
            </ITEM>
            <ITEM>
	      Change the <CODE>SQL_HOST</CODE> variable (or the <CODE>webmail.storage.sqlhost</CODE> initArg)
	      to the DNS name of the MySQL server (most likely <CODE>localhost</CODE> is just fine if 
	      you only have a single server)
            </ITEM>
            <ITEM>
	     Possibly change the value of <CODE>SQL_DB</CODE> (or <CODE>webmail.storage.sqldb</CODE>) to 
	     another database name (whatever you configured in section 4, step 2)
            </ITEM>
          </NLIST>
        </P>
        <P>
	  Now you should be able to start WebMail standalone with "./webmail.sh".
        </P>
      </SUBSUBSECTION>
      <SUBSUBSECTION name="Further suggestions" id="install:mysql:suggestions">
	<P>
	  If you are also running Apache with PHP3 on the same (or a different) host:
          <LIST>
            <ITEM>
	      Consider fetching "phpMyAdmin" (see freshmeat.net). It gives you a webbased
  	      interface for changing all kinds of MySQL data, including the WebMail
   	      configuration
            </ITEM>
	    <ITEM>
	      If you want to provide some logon scheme for new users to logon, you can 
	      write that by yourself using PHP3 without too much trouble. 
            </ITEM>
          </LIST>
        </P>
        <P>
	  Also, you can write your own set of administration tools in Perl (or other 
	  languages).
        </P>
      </SUBSUBSECTION>
      <SUBSUBSECTION name="WebMail SQL Scheme" id="install:mysql:sqlscheme">
	<P>
	  The WebMail SQL scheme is not yet well documented, but not too difficult to 
	  understand. It consists of the relations "users2userdata" and "users2mailhosts"
	  that connect the data tables as well as the data tables "users", "userdata" 
	  and "mailhosts" containing the real data.
        </P>
      </SUBSUBSECTION>
    </SUBSECTION>
  </SECTION>


  <SECTION name="Configuration" id="config">
    <P>
      WebMail has an administration interface which allows you to perform 
      several runtime administration tasks, including:
      <LIST>
        <ITEM>Changing all configuration settings</ITEM>
        <ITEM>Shutting down the server properly</ITEM>
        <ITEM>Adding, deleting or editing WebMail virtual domains</ITEM>
	<ITEM>Adding, deleting or editing WebMail users</ITEM>
	<ITEM>Getting status information</ITEM>
      </LIST>
    </P>
    <SUBSECTION name="WebMail Administrator Plugin" id="config:admin">
      <SUBSUBSECTION name="Connecting" id="config:admin:connecting">
        <P>
	  You can connect to the administration interface with your browser by simply entering
	  the URL <CODE>http(s)://webmail_server:port/admin</CODE> in the address field of your browser.
	  (set http/https and replace webmail_server and port with the correct values; port
	  is usually port 6789 after the first start on a standalone server; on a servlet installation
          you will very likely have to add the WebMail mountpoint before the <CODE>/admin</CODE>).
        </P>
        <P>
	  You'll be presented the administrator's login screen then. Enter the password there
          (on first startup the password is "Secret") and click the login button. You should see 
	  the system settings form then.
        </P>
      </SUBSUBSECTION>
      <SUBSUBSECTION name="System Settings" id="config:admin:system">
        <P>
	  The first page gives you a list of WebMail system variables and their values. You can
	  change any variables you like (there is a short description for each of them) and then
	  hit the submit button on the bottom of the page.
        </P>
        <P>
	  There are basically 4 kinds of input fields (although you will probably only recognize
	  2 on first look):
          <LIST>
	    <ITEM>simple text input fields</ITEM>
	    <ITEM>drop down selects</ITEM>
	    <ITEM>integer input fields (look like text input fields)</ITEM>
	    <ITEM>password input fields (look like text input fields and show the encrypted password!)</ITEM>
          </LIST>
        </P>
        <P>
	  All of these fields will check whether the value entered is (more or less) correct if you submit 
	  the form.
        </P>
        <P>
	  <NOTE>Special note on password fields: The password is shown encrypted (Unix crypt()), but
	  if you want to change your password, please enter it in plain text. It will then show
	  up encrypted again, after you hit the submit button (but still be the password you just
	  entered).</NOTE>
        </P>
        <P>
	  To shutdown or restart the WebMail server, enter the time in seconds until the action
	  will be performed and hit the appropriate button ("SHUTDOWN" or "REBOOT").
	  <STRONG>ATTENTION</STRONG>: You will not get anything like an answer after you do this 
	  (since you are shutting down the server this is quite difficult) and you will not be asked 
	  whether you really want to do this! Most likely you will get a "connection timed out" or
	  "document contains no data" dialog.
	</P>
      </SUBSUBSECTION>
      <SUBSUBSECTION name="WebMail Virtual Domain Support" id="config:admin:vdom">
	<P>
	  Virtual Domains in WebMail are a quite new concept (thanks to Oswaldo E. Aguirre M. for
	  the idea).
        </P>
	<P>
	  They basically provide the following features:
          <LIST>
	    <ITEM>users are associated to a domain (even if you only have one domain)</ITEM>
	    <ITEM>each domain can have its own authentication host (if IMAP/POP authentication is used)</ITEM>
	    <ITEM>the administrator of WebMail can impose certain restrictions on users of a WebMail
	          domain. e.g. you can restrict the hosts where users may connect to here</ITEM>
	    <ITEM>each domain has its own default host where the user's primary folder will be found</ITEM>
	    <ITEM>the user's default email address will be set to "user@domain"</ITEM>
          </LIST>
        </P>
        <P>
	  Naturally, with this concept you will need to have at least one domain even if you don't
	  plan to use virtual domains really.
        </P>
        <P>
	  The WebMail virtual domain setup form is quite simple and self explanatory, I think.
	  There is one column where you have to enter the domain name, one where you have to
	  enter this domain's default host (user's primary folder host), one for the authenti-
	  cation host (not necessarily the same as the default host), and some fields that
	  control the restrictions for users of this domain. With the checkbox, you can turn on/off
	  host restriction completely, in the allowed hosts column, you can enter a comma-separated
	  list of domains/hosts where users may access IMAP folders (e.g. "wastl.net" would allow 
	  them to use "mail.wastl.net" and "pop.wastl.net" while setting it to "mail.wastl.net" 
	  would just allow "mail.wastl.net" (and certainly "imap.mail.watl.net") and so on (suffix 
	  is matched to say it simple)).
	</P>
      </SUBSUBSECTION>
      <SUBSUBSECTION name="Editing Users" id="config:admin:users">
        <P>
	  You can add, edit and delete users from the administration interface (Note that you don't 
	  have to create users before they may use WebMail since they get default settings when they
	  first log on authenticating against IMAP, POP or Unix).
	</P>
	<P>
	  To create a user,
	  <LIST>
	    <ITEM>enter the user name and the domain in the user field (in the form "user@domain")</ITEM>
	    <ITEM>optionally change all the other fields from the default settings</ITEM>
	    <ITEM>hit the create/edit button on the bottom of the page</ITEM>
          </LIST>
        </P>
        <P>
	  To edit a user,
          <LIST>
	    <ITEM>select the user in the drop down menu OR enter the user name (with domain) in the short
	          text field</ITEM>
	    <ITEM>edit the user settings</ITEM>
	    <ITEM>hit the create/edit button on the bottom of the page</ITEM>
          </LIST>
        </P>
        <P>
	  To delete a user,
          <LIST>
	    <ITEM>select the user in the drop down menu OR enter the user name (with domain) in the short
	          text field</ITEM>
	    <ITEM>Hit the delete button</ITEM>
          </LIST>
        </P>
      </SUBSUBSECTION>
      <SUBSUBSECTION name="Viewing WebMail Status" id="config:admin:status">
	<P>
	  Last but not least you can get an overview of currently active sessions with
	  the "view sessions" link. You will get some status information there as well as
	  the possibility to explicitly kill an active session (whatever maybe the reason).
	  Please be careful however with this feature, as you are very likely to kill a 
	  session that is currently in use and its user will probably not be very happy about
	  that. The sessions will expire after a configured time anyway.
	</P>
	<P>
	  The Administrator Interface is currently available in English only, but the 
	  templates are already prepared for translation The system's default language will then be 
	  used (determined by the LANG environment setting).
	</P>
	<P>
	  I hope the rest is quite self explanatory at the moment, but I'll add some 
	  documentation later.
	</P>
      </SUBSUBSECTION>
    </SUBSECTION>

    <SUBSECTION name="File-Based Shutdown" id="config:admin:shutdown">
      <P>
	You can initiate a WebMail shutdown when you create a file "shutdown"
	(or whatever you configured) in the data directory with only the 
	admin password in it. This option can be disabled. It is useful in
	automatic system startup/shutdown.
      </P>
    </SUBSECTION>
  </SECTION>
  

  <SECTION name="User Authentication" id="auth">
    <P>
      WebMail supports extended user authentication. At the moment, the 
      following authentication methods are supported:
      <LIST>
	<ITEM><STRONG>SIMPLE</STRONG>: Use WebMail's former authentication method. Password is only
              checked against the user's configuration. The user may change his password from within WebMail</ITEM>
	<ITEM><STRONG>IMAP</STRONG>: Check login/password on a remote IMAP host. WebMail tries to
              login on a remote IMAP host with the given login and password.<BR/>
              If login fails, WebMail doesn't allow access.</ITEM>
	<ITEM><STRONG>POP</STRONG>: Same for a POP3 server</ITEM>
	<ITEM><STRONG>UNIX</STRONG>: Check login/password using Unix's login facility.
              login/password are checked against the Unix passwd/shadow files.<BR/>
	      Note: WebMail must be run as user root to use Unix Authentication</ITEM>
      </LIST>
    </P>
    <P>
      Changing authentication method can be achieved using the Administration 
      Interface and changing the "AUTH" variable.
      For IMAP authentication there is an extra configuration variable called 
      "AUTHHOST".
    </P>
  </SECTION>


  <SECTION name="Usage" id="usage">
    <SUBSECTION name="General Usage" id="usage:general">
      <P>
	The WebMail daemon listens on whatever port you have configure. 
	Just point your browser´s URL to http://yourhost:yourport/ and see the 
	login screen.
      </P>
      <P>
	A user will get the password he logs in with the first time. Passwords
	may be changed by the user in the options dialog.
	WebMail will try to establish a default connection to the configured 
	default IMAP host with the user ID and password it was given, so it may
	be useful to use the same ID and password as on the IMAP host.
      </P>
      <P>
	For further information, just click on the "?" at the navigation bar.
      </P>
      <P>
	WebMail should also work with Proxy Servers and other Clients than 
	Netscape Communicator.
      </P>
    </SUBSECTION>

    <SUBSECTION name="Folders" id="usage:folders">
      <P>
        <NOTE>This section is deprecated and will be updated soon</NOTE>
	WebMail supports as many IMAP folders on as many different hosts you like.
	However, the WebMail administrator can configure a "default path" to 
	prepend to all pathnames entered by the user to ease usage.
	(just typing "webmail" as a folder is MUCH easier than typing 
	/mnt/users6/inst/schaffer/mail/webmail). The default path is now set to
	"/home/%user%/mail" (%user% being replaced with the username of theIMAP
	server - the one the user enters in the login field for the IMAP server),
	but can be changed by the administrator to almost anything 
	(e.g. "/var/mail/%user%/ for mail-only servers).<BR/>
	Note, that putting a "/" before the foldername still allows to specify
	absolute pathnames.
      </P>
    </SUBSECTION>
  </SECTION>


  <SECTION name="Different Languages, Translating WebMail" id="lang">
    <P>
      WebMail supports the usage of different languages on a per user basis.
      Since v0.6.0 WebMail scans for available languages automatically and adds
      the corresponding locales to the user's setup dialog ("de" will add the
      locales "de_DE", "de_AT", "de_CH", ...).<BR/>
      To translate WebMail to a new language, please read the file "Translating"
      in the developers' documentation (source only).
    </P>
  </SECTION>

  
  <SECTION name="Notes" id="notes">
    <SUBSECTION name="WebMail Status" id="notes:status">
      <P>
	WebMail v0.7 is considered BETA, as not all features I want for a "1.0" 
	are yet included.
      </P>
      <P>
	Things I think of are:
        <LIST>
	  <ITEM>Different XSL stylesheets to convert the WebMail UI to other formats than HTML 
               (perhaps WML for mobile phones)</ITEM>
	  <ITEM>PGP for users using the Cryptix JCE. (http://www.cryptix.org)</ITEM>
	  <ITEM>"Extras" like calendar and so on (will be realized as WebMail Plugins)</ITEM>
	</LIST>
      </P>
    </SUBSECTION>
    <SUBSECTION name="Changes" id="notes:changes">
      <P>
	See the file "Changes" for a list of changes in the different WebMail
	releases.
      </P>
    </SUBSECTION>
  </SECTION>

  <SECTION name="SSL Support (standalone installation)" id="ssl">
    <P>
      Since WebMail 0.7.0, there is finally a free SSL implementation available for
      Java called ITI-SSL.
    </P>
    <P>
      Installation is simple:
      <LIST>
        <ITEM>
	  Fetch the ITI-SSL library from the WebMail homepage for your platform
	  (if there is no binary for your platform, please fetch the source code at the 
	  ITI-SSL homepage at http://www-sp.iti.informatik.tu-darmstadt.de/itissl/)
	</ITEM>
	<ITEM>
	  Copy the library "libitissl.so" to the WebMail lib/ directory.
	</ITEM>
	<ITEM>
	  Start WebMail and possibly enable the SSL support in the administration 
	  interface
	</ITEM>
      </LIST>
    </P>
    <P>
      However, SSL in WebMail has some drawbacks:
      <LIST>
	<ITEM>only works with JDK >= 1.2 (:-( )</ITEM>
	<ITEM>is a native library it is no longer platform independent</ITEM>
      </LIST>
    </P>
    <P>
     If you compile ITI-SSL yourself, please ensure that you use openssl-0.9.4 for 
     compilation because Netscape and IE won't work with WebMail SSL with prior 
     versions.
    </P>
  </SECTION>

  <SECTION name="JDK Installation And Other Java Issues" id="java">
    <SUBSECTION name="What is Java" id="java:what">
     <P>
       <NOTE>I'll make it short here as Java is pretty well known and documented.</NOTE>
     </P>
     <P>
       Java is a platform independent, object-oriented (OO) programming language. 
       Java programs are compiled using the JDK Compiler (javac) or other compilers (e.g. 
       IBM jikes). The resulting bytecode is optimized for the Java Virtual Machine (JVM)
       and still platform independent.<BR/>
       The JVM interpretes the previously compiled bytecode and translates it "on the fly"
       into platform dependent system calls. Therefore a JVM must exist for your platform
       in order to run Java programs.<BR/> 
       You'll obviously recognize that Java is an interpreted language similar to Perl or 
       Python. The most sigificant difference to the former two is that Java is precompiled.<BR/>
       So Java is a kind of compromise between purely interpreted languages and languages 
       that are compiled to machine code which tries to combine the advantages of both
       (reliability and speed). As far as i know, this principle is derived from PROLOG.
     </P>
   </SUBSECTION>

   <SUBSECTION name="Where to obtain Java for your platform" id="java:obtain">
    <P>
      The main Java distribution site is http://java.sun.com.<BR/>
      You will get the "officially supported" platforms and lots of documentation and
      additions there.
    </P>
    <P>
      Java distributions for the different platforms:
      <TABLE>
        <TR>
          <TD>Solaris SPARC and x86</TD><TD>http://java.sun.com</TD>
        </TR>
        <TR>
          <TD>Windows:</TD><TD>http://java.sun.com</TD>
        </TR>
        <TR>
          <TD>Linux/x86:</TD><TD>http://www.ibm.com (recommended IBM JDK 1.1.8)</TD>
        </TR>
        <TR>
	  <TD></TD><TD>http://www.blackdown.org (Blackdown port of JDK 1.2)</TD>
        </TR>
        <TR>
          <TD></TD><TD>http://java.sun.com (Sun and Inprise port of JDK 1.2)</TD>
        </TR>
        <TR>
          <TD>Linux/PPC:</TD><TD>http://business.tyler.wm.edu/mklinux/</TD>
        </TR>
        <TR>
          <TD>Linux/Alpha:</TD><TD>http://www.voicenet.com/~gatgul/JDK/java-alpha.html</TD>
        </TR>
        <TR>
          <TD>Linux/SPARC:</TD><TD>http://tinukai.sesuadra.org/~jdk/</TD>
        </TR>
        <TR>
          <TD>AIX:</TD><TD>http://www.ibm.com</TD>
        </TR>
        <TR>
          <TD>Macintosh:</TD><TD>http://applejava.apple.com</TD>
        </TR>
        <TR>
          <TD>OS/2:</TD><TD>http://www.ibm.com</TD>
        </TR>
        <TR>
          <TD>FreeBSD:</TD><TD>http://www.freebsd.org/ports/lang.html</TD>
        </TR>
      </TABLE>
    </P>
   </SUBSECTION>

   <SUBSECTION name="How to install Java properly" id="java:install">
     <P>
       Use your system's standard facility to install the Java packages. Note
       that the Linux JDK most likely comes as "tar.gz" and not as .rpm or .deb,
       so you will have to manually install it using tar.
     </P>
     <P>
       On Solaris, the JDK will install in /usr/java1.x/ by default.
       On Linux, I prefer installing the "tar.gz" in /usr/local and renaming
       the extracted path to "java1.x". Many distributions, however, will install
       Java in /usr/lib/java1.x or /usr/lib/jdkxxx.
     </P>
     <P>
       Next, link all programs in the bin/ directory to somewhere in your path
       (e.g. /usr/local/bin) or alternativly add the bin/ directory to your
       PATH environment.
     </P>
     <P>
       Last, set your CLASSPATH environment variable (e.g. in /etc/profile) to
       <LIST> 
         <ITEM>/path/to/java/lib/classes.zip with JDK 1.1.x</ITEM>
         <ITEM>/path/to/java/jre/lib/rt.jar with JDK 1.2</ITEM>
       </LIST>
     </P>
     <P>
       You should have a running system now. Test it by typing "java -version".
     </P>
     <P>
       Special note for Linux users: There are problems with earlier versions of the
       libc6 (aka glibc). Please use glibc 2.1.2 or above to ensure a stable 
       environment for WebMail.
     </P>
   </SUBSECTION>

   <SUBSECTION name="Improving speed" id="java:speed">
     <P>
       To improve Java performance, you will most likely use an JIT (Just in time 
       compiler) that compiles bytecode to native code on-the-fly (while executing
       the program). This especially improves speed for routines that are used 
       frequently, as it is with WebMail. So I strongly recommend using a JIT
       for WebMail!
     </P>
     <P>
       If you already have Java 1.2 (aka Java 2) or the IBM JDK 1.1.8 on Linux, you 
       won't need to get a JIT as it already ships with one.
       If you still have Java 1.1, it depends on your platform. 
       <LIST>
         <ITEM>On Linux (Blackdown port) you will need to fetch an extra JIT. I recommend 
               using TYA, but you can get a list at http://www.blackdown.org</ITEM>
         <ITEM>On Solaris, a JIT is already included in the Java 1.1 releases</ITEM>
       </LIST>
     </P>
     <P>
       I don't know what it's like for other platforms. You can always try whether
       you have a JIT or not by setting JAVA_COMPILER to "NONE" and testing whether
       that affects the execution speed of WebMail. If it is considerably slower,
       than you most likely already have a JIT.
     </P>
   </SUBSECTION>

   <SUBSECTION name="Glossary" id="java:glossary">
     <P>
       <TABLE>
         <TR>
           <TD>JDK</TD><TD>Java Depelopment Kit - what you need to compile programs</TD>
         </TR>
         <TR>
	   <TD>JRE</TD><TD>Java Runtime Environment - what you need to only run programs</TD>
         </TR>
         <TR>
	   <TD>JVM</TD><TD>Java Virtual Machine - bytecode interpreter</TD>
         </TR>
         <TR>
	   <TD>JIT</TD><TD>Just In Time Compiler - improves execution speed of the JVM</TD>
         </TR>
       </TABLE>
     </P>
   </SUBSECTION>

  </SECTION>


  <SECTION name="License" id="license">
    <P>
      WebMail is (c)1998-2000 by Sebastian Schaffert, schaffer@informatik.uni-muenchen.de
    </P>
    <P>
      WebMail is distributed under the terms of the GNU Lesser General Public License
      (LGPL). You can find a copy in the file <A href="COPYING">COPYING</A>.
    </P>
    <P>
      The LGPL allows you, said in short, to add WebMail to other projects that are not
      covered by the GPL.
    </P>
  </SECTION>


  <SECTION name="Credits" id="credits">
    <P>
      I give my credits to all who reported me bugs and made suggestions to improve
      WebMail.
    </P>
    <P>
      Some, however, I want to mention explicitly:
      <LIST>
        <ITEM>Andrew D. Fernandez, andrew@cryptonym.com, for contributing the RedHat
	  packages and making some very good suggestions.</ITEM>
	<ITEM>Rafa Couto, rafa@citania.com, for doing the Spanish and Galician translations</ITEM>
	<ITEM>Homero Borgo, homero@apoyo.uson.mx, for testing WebMail under rough conditions
	  and helping much to find bugs in the product.</ITEM>
	<ITEM>My girlfriend for her patience and the cool icons for WebMail 0.5 and 0.6</ITEM>
	<ITEM>Sacha Berger, bergers@informatik.uni-muenchen.de, for the new icons in later WebMail versions 
	      and some very interesting discussions about how to do things right.:-)</ITEM>
      </LIST>
    </P>
    <P>
      <STRONG>Sebastian Schaffert, schaffer@informatik.uni-muenchen.de</STRONG>
    </P>
  </SECTION>
</README>
