How to install Squirrelmail on CentOS

Squirrelmail is a free and open-source web based email application written in PHP. It is one of the most popular webmail package because of its speed and simplicity. With Squirrelmail you can send, receive and read your emails without an email client, just by using your web browser.

In this blog tutorial we will cover the installation of Squirrelmail on a CentOS 6 VPS.

There are few requirements for Squirrelmail:

  • A web server
  • PHP version 4.1.0 or newer
  • Access to an IMAP server

All requirements are included in our CentOS 6 full templates.

Log in to your server via SSH as user root and make sure that all packages are up-to-date.

yum -y update

Download the latest stable version of Squirrelmail from their official website. As of this writing it is version 1.4.22


Unpack the downloaded zip archive to the document root directory on your server

unzip -d /var/www/html/

This will create a ‘squirrelmail-webmail-1.4.22’ directory. We will rename the directory to a simpler name

mv /var/www/html/squirrelmail-webmail-1.4.22/ /var/www/html/squirrelmail

Set the correct permissions

chown -R apache: /var/www/html/squirrelmail/

A configuration file for Squirrelmail is not created by default, so you need to create it:

cd /var/www/html/squirrelmail/config 
cp -p config_default.php config.php

Open the configuration file with a text editor and make sure that the following settings are set up

$domain = 'YOURDOMAIN.TLD';
$data_dir = '/var/www/html/squirrelmail/data/';
$attachment_dir = '/var/www/html/squirrelmail/attach/';
$smtpServerAddress = 'localhost';
$imapServerAddress = 'localhost';

There are lots of different options in the configuration file that can be modified according to your needs, but these are mandatory.

Open your favorite web browser and access Squirrelmail at http://YOURDOMAIN.TLD/squirrelmail . If you followed this tutorial you should get the Squirrelmail login page where user with a local email account can log in and access its emails.

PS. If you liked this post please share it with your friends on the social networks or simply leave a reply below. Thanks.

Be the first to comment

Leave a Reply

Your email address will not be published.