Install and Configure SquirrelMail in CentOS 7

Windows Articles

How to install WordPress with Nginx on Ubuntu 20.04?

Hi, folks. In this post, we will help you install Wordpress with Nginx on Ubuntu 20.04. It's a lot easier than you...

Electron 9.0 available

News has arrived that many developers are going to love. And that is that Electron this great cross-platform application framework has released...

How to install SQLite on Ubuntu 20.04 / 18.04?

There is a wide variety of database managers today. Of all of them, MySQL continues to be the most prominent within open source. On...

Deploy a Jitsi Meet server with Docker

Hi, folks. In this very short tutorial, I will show you how to deploy a Jitsi Meet server using Docker. This indicates...

How to Create Apache Virtual Hosts on Ubuntu 20.04 /Debian 10.4

Maybe you want to run more then1 domain on the same Server, why buying another server while its possible to run...
Muhammad Nabeel
Muhammad Nabeel
Network and System Administrator

SquirrelMail is an opensource webmail package written in PHP. It includes built-in PHP support for the IMAP and SMTP protocols . It has very few requirements and very easy to install and configure.

In this guide you will learn how to install and configure SquirrelMail step by step in Centos 7 and RHEL 7.

Step 1: First of all disable SELINUX using below command

this is not the best choice to disable the firewall because of security purposes, but we are doing this locally. in your case you allow the traffic vie the firewall-cmd rules.

# vi /etc/selinux/config

set SELINUX=disabled

save changes to file and quite

and reboot the server using below command

# reboot

Step 2: Install and Configure Postfix

You must install Epel Repository using below command

# yum install epel-release -y

Now install Postfix

# yum install postfix -y

Now make following changes to posfix file using below command at the end.

# vi /etc/postfix/main.cf
## Enter your hostname
myhostname = osradar.localhost.local

## Enter your domain name
mydomain = osradar.localhost.local

inet_interfaces = all
myorigin = $mydomain

##set your IP range
mynetworks = 192.168.130.138/24, 127.0.0.0/8

## set your mail direcotry
home_mailbox = Maildir/

## Now Go to line no 164 add $domain at the end
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain

save changes to file and quite

Restart Postfix

# systemctl restart postfix

# systemctl enable postfix

Step 3: Install and Configure Dovecot

# yum install dovecot

# systemctl start dovecot

# systemctl enable dovecot

Now modify below files one by one

make following changes at the end of file /etc/dovecot/dovecot.conf

# vi /etc/dovecot/dovecot.conf

protocols = imap pop3 lmtp

make following changes at the end of file /etc/dovecot/conf.d/10-mail.conf

# vi /etc/dovecot/conf.d/10-mail.conf

mail_location = maildir:~/Maildir

make following changes at the end of file /etc/dovecot/conf.d/10-auth.conf

# vi /etc/dovecot/conf.d/10-auth.conf

disable_plaintext_auth = yes
auth_mechanisms = plain login

make following changes to file /etc/dovecot/conf.d/10-master.conf

# vi /etc/dovecot/conf.d/10-master.conf

unix_listener auth-userdb {
#mode = 0600
user = postfix ## uncomment line 91 and enter postfix
group = postfix ## uncomment line 92 and enter postfix

Now restart Dovecot

# systemctl restart dovecot

# systemctl enable dovecot

Step 4: Install and Configure Squirrelmail

First install and start apache service

# yum install httpd -y

# systemctl start httpd

# systemctl enable httpd

Now install Squirrelmail

# yum install squirrelmail -y

Now go to squirrelmail folder and configure it according to your server

# cd /usr/share/squirrelmail/config/

# ./conf.pl

After changes press S to save settings and press Q to exit.

Now add following lines at the end of httpd.conf file.

Note: If these lines are already added at the end of file SKIP this step.
# vi /etc/httpd/conf/httpd.conf

Alias /webmail /usr/share/squirrelmail
<Directory /usr/share/squirrelmail>
Options Indexes FollowSymLinks
RewriteEngine On
AllowOverride All
DirectoryIndex index.php
Order allow,deny
Allow from all
</Directory>

save changes and quite

then restart Apache and dovecot service

# systemctl restart httpd

# systemctl restart dovecot

Step 5: Create User and Access Webmail

# adduser osradar

# passwd osradar

Finally access Webmail

http://server-ip/webmail

OR

http://yourdomainname/webmail

More articles

3 COMMENTS

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest article

How to install WordPress with Nginx on Ubuntu 20.04?

Hi, folks. In this post, we will help you install Wordpress with Nginx on Ubuntu 20.04. It's a lot easier than you...

Electron 9.0 available

News has arrived that many developers are going to love. And that is that Electron this great cross-platform application framework has released...

How to install SQLite on Ubuntu 20.04 / 18.04?

There is a wide variety of database managers today. Of all of them, MySQL continues to be the most prominent within open source. On...

Deploy a Jitsi Meet server with Docker

Hi, folks. In this very short tutorial, I will show you how to deploy a Jitsi Meet server using Docker. This indicates...

How to Create Apache Virtual Hosts on Ubuntu 20.04 /Debian 10.4

Maybe you want to run more then1 domain on the same Server, why buying another server while its possible to run...