Skip to content. | Skip to navigation

Navigation

Personal tools

Mail Applications

Building a mail system

SquirrelMail

Webmail for nuts!

SquirrelMail is the poor man's Hotmail/Yahoo!/whatever. You can read your email through a website.

Underneath the hood, SquirrelMail will be talking to your IMAP server in a normal IMAP client kind of fashion. All we probably want to do it set the webserver up to push any http connections to SquirrelMail over to an https connection.

Installing

SquirrelMail is a PHP application and installs in-situ. All you need do is point your webserver at it.

Configuring

Configuring SquirrelMail is a bit more fun! We're going to configure SquirrelMail itself and the webserver that points to it.

SquirrelMail Setup

We need to create some directories for SquirrelMail to manage user preferences and outgoing attachments. These should be outside of the SquirrelMail tree and owned by the web server user:

cd /var
mkdir -p squirrelmail/{data,attachments}
chown -R webservd:webservd squirrelmail
chmod 0730 squirrelmail/attachments

Either run:

./configure

which is just a wrapper to:

config/conf.pl

In either case, choose D (to setup IMAP server defaults) then cyrus (assuming you're using Cyrus).

The walk through the configuration settings, the most likely you'll need to change are in

  • Server Settings where you'll want to chnage your Domain to your default domain (see the discussion in Mail Applications for more on default (mail) domains).
  • General Options where you'll need to change Data Directory and Attachment Directory to /var/squirrelmail/data and /var/squirrelmail/attachments

Then Save and Quit.

Apache2

In both your non-https and https Apache config sections for whatever virtual host you are using, you'll need something like:

Alias /squirrelmail/ /usr/local/squirrelmail-1.4.5/
<Directory /usr/local/squirrelmail-1.4.5>
   AllowOverride AuthConfig
   Order allow,deny
   Allow from all
</Directory>

Plus a little redirection glue in the non-https section:

RewriteEngine on
RewriteRule     ^/squirrelmail/(.*)       https://www.example.com/squirrelmail/$1  [R]

Document Actions