How To Install SquirrelMail in Ubuntu/Debian
To Install Mail Server using SquirrelMail in Ubuntu/Debian
Squirrel mail server is a web interface which is licensed under the GNU General Public License and is programmed in PHP language. In this tutorial we will learn how to install SquirrelMail in Ubuntu/Debian.
Features of SquirrelMail
- works with POP3 email
- Allows to create email in plain text formats
- Blocks external images by default.
Step 1: To Install PHP5 and Apache2
Install PHP5 & Apache2 , before installing ' SquirrelMail' .
user1@linuxhelp:~$ sudo apt-get update [sudo] password for user1: Get:1 http://security.ubuntu.com wily-security InRelease [65.9 kB] Hit http://in.archive.ubuntu.com wily InRelease Get:2 http://in.archive.ubuntu.com wily-updates InRelease [65.9 kB] Get:3 http://security.ubuntu.com wily-security/main Sources [46.6 kB] . . . Get:49 http://in.archive.ubuntu.com wily-backports/multiverse Translation-en [28 B] Get:50 http://in.archive.ubuntu.com wily-backports/restricted Translation-en [28 B] Get:51 http://in.archive.ubuntu.com wily-backports/universe Translation-en [1,390 B] Fetched 1,728 kB in 14s (116 kB/s) Reading package lists... Done user1@linuxhelp:~$ sudo apt-get install apache2 php5 Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: apache2-bin apache2-data apache2-utils libapache2-mod-php5 libapr1 libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap liblua5.1-0 php5-cli php5-common php5-json php5-readline . . . Setting up php5 (5.6.11+dfsg-1ubuntu3.3) ... Processing triggers for libc-bin (2.21-0ubuntu4.1) ... Processing triggers for systemd (225-1ubuntu9.1) ... Processing triggers for ureadahead (0.100.0-19) ...
Step 2: To Install Postfix Mail Server
Install Postfix Mail Server, to send and receive mails.
user1@linuxhelp:~$ sudo apt-get install postfix
Reading package lists... Done
Building dependency tree
Reading state information... Done
.
.
.
Running newaliases
Processing triggers for systemd (225-1ubuntu9.1) ...
Processing triggers for ureadahead (0.100.0-19) ...
Processing triggers for ufw (0.34-2) ...
Processing triggers for libc-bin (2.21-0ubuntu4.1) ...
Now select the default postfix configuration for your server.
Select the type of mail configuration and here we are using the ' Internet Site' option.
Enter the domain name for sending and receiving mails.
After setting FQDN, using the below command to start the Postfix mail server.
user1@linuxhelp:~$ sudo service postfix start
Step 3: To Install Dovecot
Execute the below command to install the Dovecot - a mail delivering agent.
user1@linuxhelp:~$ sudo apt-get install dovecot-imapd dovecot-pop3d
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
dovecot-core liblockfile-bin liblockfile1 lockfile-progs ntpdate
.
.
.
Processing triggers for libc-bin (2.21-0ubuntu4.1) ...
Processing triggers for systemd (225-1ubuntu9.1) ...
Processing triggers for ureadahead (0.100.0-19) ...
Processing triggers for dovecot-core (1:2.2.18-2ubuntu2) ...
Start the Dovecot service by executing the below command.
user1@linuxhelp:~$ sudo service dovecot start
Step 4: To Install SquirrelMail
Install SquirrelMail, by running the following command.
user1@linuxhelp:~$ sudo apt-get install squirrelmail
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
squirrelmail-locales squirrelmail-viewashtml
.
.
.
Setting up squirrelmail-locales (1.4.18-20090526-1) ...
Setting up squirrelmail-viewashtml (3.8-3) ...
Removing plugin view_as_html
Data saved in config.php
Activating plugin view_as_html
Data saved in config.php
To configure SquirrelMail execute the following command.
user1@linuxhelp:~$ sudo squirrelmail-configure
In the prompt window, type ' 2' to edit the server settings and type ' 1' to change the domain name.
Type ' R' to return to the main page. To configure the general options type ' 4' .
Now type ' 11' to change the setting of ' Allow server-side sorting' to ' true' by typing ' y' . Hit Enter and type ' S' to save the changes that you have made in the configuration file.
Copy the default configuration file to the apache2 directory to access the web interface, by using the following command.
user1@linuxhelp:~$ sudo cp /etc/squirrelmail/apache.conf /etc/apache2/sites-available/squirrelmail.conf
Run the following command to enable it.
user1@linuxhelp:~$ sudo a2ensite squirrelmail.conf
Enabling site squirrelmail.
To activate the new configuration, run the following command.
user1@linuxhelp:~$ service apache2 reload
Step 5: To create Mail Users
Create new user by running the following command.
user1@linuxhelp:~$ sudo useradd user2
user1@linuxhelp:~$ sudo passwd user2
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
Create a home folder for the user in ' /var/www/html/myusername' and make it as a default home directory.
user1@linuxhelp:~$ sudo mkdir -p /var/www/html/user2
user1@linuxhelp:~$ sudo usermod -m -d /var/www/html/user2 user2
usermod: directory /var/www/html/user2 exists
Provide full permission to user by running the following command.
user1@linuxhelp:~$ sudo chown -R user2.user2 /var/www/html/user2
After setting permission to the user, Login to the mail.
Squirrel mail login page
Navigate to https://192.168.5.219/squirrelmail to access the squirrelmail. Enter your credentials to Login into Squirrel mail
Compose mail page
Now start sending your mail.
Squirrel mail Options
The below screen shot shows various options available in Squirrel mail.
Comments ( 1 )