Downloading and Installation

Note that this code is only Alpha quality at present; you can expect to find some rough edges. If you're happy with that, here's how to get started.

1. Prerequisites

You will need:

You'll want to be certain that these are running properly: can you serve HTML pages, and access the mail servers from another mail client?

To compile the http2email proxy program you'll need:

You'll also need:

2. Downloading

Get the source using Subversion from http://svn.decimail.org/webmail/trunk/. At present I suggest getting the latest trunk revision, but if for some reason you want to get one of the tagged releases, look under http://svn.decimail.org/webmail/tags/releases/3. For example:

$ svn co http://svn.decimail.org/webmail/trunk/ webmail

This will create a directory called webmail and put the latest code in it.

3. Building the http2email daemon

It should be possible to build the http2email daemon by typing make in its directory:

$ cd http2email $ make

4. Running http2email

If your IMAP and SMTP servers are configured on the normal ports you should be able to run http2email with its default settings as a normal user:

$ ./http2email $

Note that the prompt will return immediately when it starts as it forks itself into the background. There are various things that can be changed, as shown by --help:

$ ./http2email --help Allowed options: --help show help message -p [ --httpport ] arg (=8143) HTTP port number -i [ --imapport ] arg (=143) IMAP port number -h [ --imaphost ] arg (=localhost) IMAP hostname -s [ --smtpport ] arg (=25) SMTP port number -m [ --smtphost ] arg (=localhost) SMTP hostname -u [ --user ] arg User to run as

The daemon logs things in your syslog; if you look you should see a brief startup message.

5. Configuring Apache

You need to configure Apache to proxy requests for the http2email daemon to it on its port number. For this, mod_proxy is required; this is a standard part of Apache but you may need to do something to have it loaded when Apache starts. You'll then need to add something to your Apache configuration. If you're running http2email on its default HTTP port, 8143, something like this might work for Apache2.x:

<Location /http2email> ProxyPass http://localhost:8143/ </Location>

If you're using Apache1.x you don't need the <Location> block and you want a ProxyPass directive like this:

ProxyPass /http2email http://localhost:8143/

Important: You should add Apache directives to password-protect this directory if your machine is accessible from the internet. http2email is not a "hardened" application, and using Apache to do HTTP authentication protects it from some types of attack. You should also not make its port (e.g. 8143) accessible from outside localhost.

6. Configure the Javascript

Edit browser/common/config.js to indicate the URL that you've chosen for Apache to proxy from, above.

This file can also define an IMAP username and password. Using these hardcoded values might be appropriate in a single-user environment with HTTP AUTH. The alternative code to prompt for username and password is less well exercised. If you want you can enable this in browser/webmail/webmail.js, in function login.

7. Build the Browser Code

In the browser directory, type make:

$ cd browser $ make

This joins together the various .js files into larger lumps that are loaded by the browser. The css stylesheets are run through the m4 preprocessor.

8. Point Apache to the Browser Code

You need to set up Apache to make the contents of the browser directory accessible. Often the quickest way to do this is to put a symlink in your DocumentRoot directory.

9. Testing

Using your web browser, navigate to the content of the directory that you made accessible in the previous step. (Note: don't get confused between the place where you have put the static content, i.e. the files built in the browser directory, and the place where you have put the proxy.) Visit webmail.html in the browser directory and you should see something.

Hopefully you'll be able to select a mailbox from the list on the left of the screen and then view messages.

Feedback about how the installation process and these instructions could be improved would be appreciated.

10. Mozilla Settings

To make sending attachments and some other minor features work you need to change some Mozilla settings to reduce security. Go to about:config and set these: