Installing SquirrelMail

11 Mar 2004 14:22 qmail


One requirement I listed earlier is webmail, so that I can access my email from anywhere. I’m going to take a look at SquirrelMail.

Configuring Apache

The first thing that I need to do is install Apache (since this is my test box and it’s not been installed yet). SquirrelMail also has a bunch of other requirements:

# apt-get install apache php4 php4-pear

Note that, by default, the Debian packages for php4 on woody don’t correctly enable it. You’ll need to go and tweak the /etc/apache/httpd.conf file:

# LoadModule eaccess_module /usr/lib/apache/1.3/
**LoadModule php4_module /usr/lib/apache/1.3/**
# LoadModule roaming_module /usr/lib/apache/1.3/
    # And for PHP 4.x, use:
    **AddType application/x-httpd-php .php**
    #AddType application/x-httpd-php-source .phps

Installing SquirrelMail

Once Apache and PHP are installed correctly, we can install SquirrelMail. Grab the download from here, and then follow the instructions in the INSTALL file.

The installation instructions aren’t great. Here’s what I did.

# cd /var/www
# mkdir webmail
# cp -a /usr/local/src/squirrelmail-1.4.2/* webmail/
# cd /var/www/webmail
# chown -R www-data.www-data data

Configuring SquirrelMail

The defaults are generally OK, but there’s a couple of things that need to be changed:

# config/

Server Settings:

Domain `differentpla.test`

We need to change the settings in Folder Defaults to make it compatible with IMAPdir and Outlook Express:

Trash Folder Trash
Sent Folder Sent Items
Drafts Drafts

Configuring .htaccess

In order to allow access as http://flimsy/webmail/, I need to bung a .htaccess file in the /var/www/webmail directory:

DirectoryIndex index.php

And I need to change the /etc/apache/httpd.conf file:

<Directory /var/www/webmail/>
        AllowOverride All

And it just works. I can log in by going to http://flimsy/webmail/. Cool.