How to Install SquirrelMail on an Ubuntu 18.04 VPS or Dedicated Server

SquirrelMail is a web-based email client that supplements desktop software for sending and retrieving emails from an SMTP (Simple Mail Transfer Protocol) and IMAP (Internet Message Access) Protocol.

SquirrelMail is written in PHP and works pretty well in an Apache server running on Ubuntu 18.04 VPS. It is a complete solution for managing emails in a multi-user environment.

For instance, if you have a domain name (e.g. www.example.com) and separate emails accounts for your employees, they can check and send emails from a browser through SquirrelMail.

In this guide, we focus on the steps for installing SquirrelMail on your Ubuntu 18.04 server

Special Note: you may want to inquire on email hosting options as well. Visit HostAdvice’s Best email hosting services page for reviews, prices and features.

Prerequisites

  • A domain name(e.g. www.example.com)
  • A fully working SMTP server(e.g. Postfix)
  • A fully working IMAP server (e.g. Dovecot)
  • A non root-user with sudo privileges
  • Apache web server

Step 1: Download the latest version of SquirrelMail

By the time of writing this guide, the latest version of squirrelmail was version 1.4.22. We need to download this using the ‘wget’ command.

First, cd to the ‘/tmp’ folder by typing the command below:

$ cd /tmp

Next, enter the command below to download SquirrelMail

$ wget http://downloads.sourceforge.net/project/squirrelmail/stable/1.4.22/squirrelmail-webmail-1.4.22.zip

Step 2: Unzip the archive file and copy it to the root of your website

First, let us install the unzip tool on our Ubuntu 18.04 server:

$ sudo apt-get install unzip

Then, we need to unzip the SquirrelMail archive file using the command below:

$ sudo unzip squirrelmail-webmail-1.4.22.zip

We then move the content of the ‘squirrelmail-webmail-1.4.22’ directory to the root of our website:

$ sudo mv squirrelmail-webmail-1.4.22/ /var/www/html/mail

Step 3: Set the right directory permissions

In order for Apache to be able to interact with SquirrelMail without read/write problems, we should set the right directory and file ownership permissions using the command below:

$ sudo chown -R www-data:www-data /var/www/html/mail

Step 4: Configure SquirrelMail

SquirrelMail has a default configuration file (‘config_default.php’). We need to copy this file to config.php using the command below:

$ sudo cp /var/www/html/mail/config/config_default.php  /var/www/html/mail/config/config.php

Next we need to edit the file using nano editor to make a few changes:

$ sudo nano /var/www/html/mail/config/config.php

We need to set the values below:

$domain = 'yourwebsite.com';
$data_dir = '/var/www/html/mail/data/';
$attachment_dir = '/var/www/html/mail/attach/';

Remember to replace ‘yourwebsite.com’ with the domain name of your website. Once you are done, press CTRL + X, Y and Enter to save the changes

The data directory is created by default once you install SquirrelMail but we need to create the attachments directory using the command below:

$ sudo /var/www/html/mail/attach/

We can run the command below one more time to ensure the permissions are updated on the directory:

$ sudo chown -R www-data:www-data /var/www/html/mail

Step 5: Open SquirrelMail on your browser

You can visit your SquirrelMail application using the address ‘www.example.com/mail’. If the setup was completed without a problem, you should see this login page:

Then, just enter your username and password associated with your email account and you will be able to login to the SquirrelMail dashboard.

You can then send or check emails from that interface just like you would do from an email client like Ms Outlook or Thunderbird. SquirrelMail presents a simple, intuitive and a feature-rich interface for managing your emails.

Conclusion

Those are the basic steps that you need to install SquirrelMail on your Ubuntu 18.04 VPS. Remember, you can send and read emails with SquirrelMail client and since it is accessible via a web browser, it means you can check your emails on the go without having to login to your Ubuntu server. I hope you enjoyed reading the guide.

  • If you’re ready to get started with a virtual private server for hosting your websites, visit our VPS Hosting page to find the best VPS hosting providers that’s right for you.

Check out these top 3 Email hosting services:

HostArmada
$2.49 /mo
Starting price
Visit HostArmada
Rating based on expert review
  • User Friendly
    4.5
  • Support
    4.5
  • Features
    4.5
  • Reliability
    4.5
  • Pricing
    4.0
Kamatera
$4.00 /mo
Starting price
Visit Kamatera
Rating based on expert review
  • User Friendly
    3.5
  • Support
    3.0
  • Features
    3.9
  • Reliability
    4.0
  • Pricing
    4.3
Hostens
$2.00 /mo
Starting price
Visit Hostens
Rating based on expert review
  • User Friendly
    4.5
  • Support
    3.8
  • Features
    4.3
  • Reliability
    4.5
  • Pricing
    4.8

* Read more about the best email services and which one is the right one for you

How to Install Own Cloud On an an Ubuntu 18.04 Dedicated Server or VPS

You can create your own self-hosted cloud storage services by installing the ope
3 min read
Idan Cohen
Idan Cohen
Marketing Expert

How to Enable Two-Factor Authentication on an Ubuntu 18.04 VPS or Dedicated Server

This guide will show you how you enable two-factor authentication to improve the
4 min read
Max Ostryzhko
Max Ostryzhko
Senior Web Developer, HostAdvice CTO

How to Install a Let’s Encrypt Certificate on your Ubuntu 18.04 Dedicated Server or VPS

If you are hosting your website on a VPS server running Ubuntu 18.04, we will sh
3 min read
Michael Levanduski
Michael Levanduski
Expert Hosting Writer & Tester

How to install OpenLiteSpeed on an Ubuntu 18.04 VPS or Dedicated Server

OpenLiteSpeed is an open source web server characterized by high-performance, li
3 min read
Kennedy Mbuvi
Kennedy Mbuvi
Author
HostAdvice.com provides professional web hosting reviews fully independent of any other entity. Our reviews are unbiased, honest, and apply the same evaluation standards to all those reviewed. While monetary compensation is received from a few of the companies listed on this site, compensation of services and products have no influence on the direction or conclusions of our reviews. Nor does the compensation influence our rankings for certain host companies. This compensation covers account purchasing costs, testing costs and royalties paid to reviewers.