|
|
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.
Features include:
Who should use WebMail:
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.
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.
It is not intended as a replacement for the different personal email clients,
but as a supplement for an existing mail solution.
The secondary goal is to unify a user's different email accounts under one
interface which is easily accomplished using WebMails folder capability.
|
There are two different ways to install WebMail, the standalone installation and the Java Servlet installation. Which one you should choose depends on what you plan to do with WebMail:
There are also several ways to store data:
To run WebMail properly on your server, you need to have the following software installed:
WebMail has been successfully tested on:
WebMail will make profit of multiprocessor machines (e.g. Sun Enterprise 450) as
it is multithreaded in large parts.
tar xzvf webmail-0.7.0.tar.gz
./webmail.sh >> stdout.log 2>&1 &
Note:Source installation will definately only work on Unix systems! |
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. |
Additional requirements:
To install the source distribution of WebMail you will have to take the following steps:
Running WebMail as a Servlet has several advantages over the standalone installation (and also some disadvantages):
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).
To make use of this feature you have to:
webmail.plugin.path |
Path to the plugin directory |
webmail.auth.path |
Path to the authenticator directory |
webmail.data.path | Path were data will be stored (this has to be writeable by the process owner of the webserver) |
webmail.lib.path |
Path to WebMail libraries |
webmail.template.path |
Path to language dependent template files |
webmail.storage |
Set this to net.wastl.webmail.storage.simple.SimpleStorage for the simple
storage and to net.wastl.webmail.storage.mysql.MySQLStorage for the MySQL
based storage |
To simplify the above, I provided an Apache JServ zone file called
webmail-servlet.properties
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 http://www.yourdomain.top/[mountpoint]/webmail
Please note that I haven't tested this with a different server than Apache and that it is still experimental.
Top of section "Servlet Installation"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.
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.
Using MySQL to store the WebMail data has several advantages, e.g.:
Clearly, this also has some disadvantages:
When you should consider using MySQL:
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.
FLUSH PRIVILEGES
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.
mysql -u [webmailuser] -p < mysql_scheme.sql
.
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.
MySQL is now set up to work with WebMail.
Top of section "Preparing MySQL"
Setting up WebMail is quite simple. All changes will be done in the startup
script webmail.sh
(or webmail.bat
under Windows or initArgs
in case of a servlet installation) in the bin/ directory. The corresponding servlet configuration
options are given in "(" and ")".
STORAGE
variable
(or webmail.storage
initArg) to
net.wastl.webmail.storage.mysql.MySQLStorage
SQL_LOGIN
and SQL_PASS
(or webmail.storage.sqllogin
and webmail.storage.sqlpass
initArgs)
to the values you configured in section 4, step 1
SQL_HOST
variable (or the webmail.storage.sqlhost
initArg)
to the DNS name of the MySQL server (most likely localhost
is just fine if
you only have a single server)
SQL_DB
(or webmail.storage.sqldb
) to
another database name (whatever you configured in section 4, step 2)
Now you should be able to start WebMail standalone with "./webmail.sh".
Top of section "Setting up WebMail for use with MySQL"If you are also running Apache with PHP3 on the same (or a different) host:
Also, you can write your own set of administration tools in Perl (or other languages).
Top of section "Further suggestions"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.
Top of section "WebMail SQL Scheme" Top of section "Storage Methods"
|
WebMail has an administration interface which allows you to perform several runtime administration tasks, including:
You can connect to the administration interface with your browser by simply entering
the URL http(s)://webmail_server:port/admin
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 /admin
).
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.
Top of section "Connecting"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.
There are basically 4 kinds of input fields (although you will probably only recognize 2 on first look):
All of these fields will check whether the value entered is (more or less) correct if you submit the form.
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). |
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"). ATTENTION: 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.
Top of section "System Settings"Virtual Domains in WebMail are a quite new concept (thanks to Oswaldo E. Aguirre M. for the idea).
They basically provide the following features:
Naturally, with this concept you will need to have at least one domain even if you don't plan to use virtual domains really.
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)).
Top of section "WebMail Virtual Domain Support"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).
To create a user,
To edit a user,
To delete a user,
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.
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).
I hope the rest is quite self explanatory at the moment, but I'll add some documentation later.
Top of section "Viewing WebMail Status" Top of section "WebMail Administrator Plugin"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.
Top of section "File-Based Shutdown"
|
WebMail supports extended user authentication. At the moment, the following authentication methods are supported:
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".
Top of section "User Authentication"
|
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.
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.
For further information, just click on the "?" at the navigation bar.
WebMail should also work with Proxy Servers and other Clients than Netscape Communicator.
Top of section "General Usage"
Note:This section is deprecated and will be updated soon |
|
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", ...).
To translate WebMail to a new language, please read the file "Translating"
in the developers' documentation (source only).
|
WebMail v0.7 is considered BETA, as not all features I want for a "1.0" are yet included.
Things I think of are:
See the file "Changes" for a list of changes in the different WebMail releases.
Top of section "Changes"
|
Since WebMail 0.7.0, there is finally a free SSL implementation available for Java called ITI-SSL.
Installation is simple:
However, SSL in WebMail has some drawbacks:
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.
Top of section "SSL Support (standalone installation)"
|
Note:I'll make it short here as Java is pretty well known and documented. |
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.
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.
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.
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.
The main Java distribution site is http://java.sun.com.
You will get the "officially supported" platforms and lots of documentation and
additions there.
Java distributions for the different platforms:
Solaris SPARC and x86 | http://java.sun.com |
Windows: | http://java.sun.com |
Linux/x86: | http://www.ibm.com (recommended IBM JDK 1.1.8) |
http://www.blackdown.org (Blackdown port of JDK 1.2) | |
http://java.sun.com (Sun and Inprise port of JDK 1.2) | |
Linux/PPC: | http://business.tyler.wm.edu/mklinux/ |
Linux/Alpha: | http://www.voicenet.com/~gatgul/JDK/java-alpha.html |
Linux/SPARC: | http://tinukai.sesuadra.org/~jdk/ |
AIX: | http://www.ibm.com |
Macintosh: | http://applejava.apple.com |
OS/2: | http://www.ibm.com |
FreeBSD: | http://www.freebsd.org/ports/lang.html |
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.
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.
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.
Last, set your CLASSPATH environment variable (e.g. in /etc/profile) to
You should have a running system now. Test it by typing "java -version".
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.
Top of section "How to install Java properly"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!
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.
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.
Top of section "Improving speed"
JDK | Java Depelopment Kit - what you need to compile programs |
JRE | Java Runtime Environment - what you need to only run programs |
JVM | Java Virtual Machine - bytecode interpreter |
JIT | Just In Time Compiler - improves execution speed of the JVM |
|
WebMail is (c)1998-2000 by Sebastian Schaffert, schaffer@informatik.uni-muenchen.de
WebMail is distributed under the terms of the GNU Lesser General Public License (LGPL). You can find a copy in the file COPYING.
The LGPL allows you, said in short, to add WebMail to other projects that are not covered by the GPL.
Top of section "License"
|
I give my credits to all who reported me bugs and made suggestions to improve WebMail.
Some, however, I want to mention explicitly:
Sebastian Schaffert, schaffer@informatik.uni-muenchen.de
Top of section "Credits"