HOWTO:Installing Squirrelmail

From EnGardeWiki

Jump to: navigation, search

This page describes how to install and configure SquirrelMail on EnGarde Secure Linux.

NOTE: All command line executions are denoted by a preceding "#" and must be performed as the "root" user unless noted otherwise.

Contents

Introduction

SquirrelMail is a PHP based web application that is accessed via an SSL web site and allows local users to remotely login and access their mail via IMAP, and send email using their web browser. It is suggested that you run SquirrelMail on the same server as the IMAP server. This document will outline the procedures for installing, configuring and enabling SquirrelMail on an EnGarde Secure Community 3.0 server. All of the required packages are part of this distribution and the only extra code needed is the SquirrelMail source. The rest of these procedures assume that you already have Postfix and Apache configured and running. If not you will need to do so before continuing setting up SquirrelMail. For Postfix and Apache setup refer to sections "6.6. Setting up a Mail Server" and "6.7. Setting up a Web Server" found in the EnGarde Secure Linux 3.0 Quick Start Guide.

Enable SSH Access To The Server

You will need to have SSH access as the "root" user to the EnGarde server that will be running SquirrelMail. Refer to the EnGarde Secure Linux 3.0 Quick Start Guide section "6.5. Setting up Remote Access".

Setting Up an SSL Web Site on the Server

SquirrelMail needs to run on an SSL web site. To create an SSL web site refer to above Quick Start Guide's "6.7.3. Configure a Secure Web Server". If you already have an SSL web site configured you may skip this section and proceed to the next section.

NOTE: When configuring this SSL web site you need to define "index.php" as a "Directory Index File" and restart Apache.

Allow IMAP access from 127.0.0.1

In the WebTool->System->Access Control add "127.0.0.1" for SIMAP access.

Downloading and Installing the SquirrelMail Source Code

  1. All subsequent steps must be performed as the "root" user on the server. SSH into the server as "root". You should have either the password or the passphrase from section II to do this.

Download the source code

As of this writing the latest stable version of SquirrelMail is 1.4.5. Download the source tarball squirrelmail-1.4.5.tar.gz (it can be found at http://sourceforge.net) to the temporary directory /var/tmp.

    # cd /var/tmp
    # ls -l squirrelmail-1.4.5.tar.gz 
    -rw-r--r--  1 root root    591226 2005-12-08 11:53 squirrelmail-1.4.5.tar.gz

Install SquirrelMail

Now unpack this tarball and move the files to the proper directory.

    # cd /home/httpd/SSLSERVER-443/html
    # tar zxvf /var/tmp/squirrelmail-1.4.5.tar.gz
    # mv squirrelmail-1.4.5 webmail

The code is now installed.

Configuring SquirrelMail

Change ownership of the files

When defining a web site in the WebTool you are required to enter a user as the "webmaster" and assign a "group" to the web site. Those identities are needed for the folllowing. When running the following commands replace WEBMASTER with the user that has been defined as the "webmaster" and replace GROUP with the group that was used.

    # chown -R WEBMASTER.GROUP webmail
    # cd webmail
    # chgrp -R webd config data

Create config.php with proper permissions

    # cd config
    # cp -p config_default.php config.php

Edit config.php

There are many options that can be modified in this file. These are the suggested bare minimum variables to change.

  • Change this to your organization's name.
       $org_name = 'YOUR_ORGANIZATION';
  • Change this to the title you would like shown on the SquirrelMail web page.
       $org_title = 'YOUR_TITLE $version';
  • Change this to the mail domain that is being served by SquirrelMail.
       $domain = 'YOUR_MAIL_DOMAIN.com';
  • Define your SMTP server. This is the name of the server running the Postfix MTA for your mail domain. If Postfix is running on the same server as SquirrelMail then this would be 'localhost'. If it is another server then enter 'SERVERNAME.com'.
       $smtpServerAddress = 'localhost';
  • Define your IMAP server. We always have SquirrelMail running on the same server as IMAP so this will always be 'localhost'.
       $imapServerAddress = 'localhost';
  • Define the IMAP server type. The IMAP package in EnGarde Secure Community 3.0 is 'Washington University' so use 'uw' here.
       $imap_server_type = 'uw';
  • Ensure Squirrelmail is going to use TLS when communicating with the IMAP server.
       $use_imap_tls = true;
  • Leave the IMAP authentication mechanism as the default.
       $imap_auth_mech = 'login';
  • Change the default IMAP port from 143 to 993 (the default SIMAP port)
       $imapPort = 993;
  • The only PHP configuration that will be mentioned here is the maximum allowable filesize to upload. This in defined in /etc/php.ini with the variable 'upload_max_filesize' and the default is 2M. If you need to alter the allowable file size you would change this value. This setting limits the maximum mail attachment size a user can send.

Verify operation

Now access SquirrelMail by going to the URL https://SERVERNAME/webmail/ and you should be presented with a SquirrelMail login page where a user with a local IMAP mail account can login and access mail.

Personal tools