Install and Configure SquirrelMail in CentOS 7

Windows Articles

How to get Google Opinion Rewards in any Country

Greetings! Google Opinion Rewards is a cool app, which will allow you to earn credit, to spend it on the Google Play...

How to change the hostname on Ubuntu?

This simple tutorial will teach you how to change the hostname on Ubuntu. The steps we will tell you here will work...

How to install Screaming Frog SEO Spider on Ubuntu 20.04 / 18.04?

If you are working with blogs and content creation then you should know about SEO. Or in the best case, you have...

How to Configure a Firewall in Ubuntu 20.04 / Debian 10?

There is nothing safe from hackers on the Internet, however, we can implement security measures to be more protected against an attack. With this...

Gnome 3.38 available

Gnome OS is a Linux-based operating system, which has a huge domain in the Linux forums. On September 16, 2020, developers announced...
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 get Google Opinion Rewards in any Country

Greetings! Google Opinion Rewards is a cool app, which will allow you to earn credit, to spend it on the Google Play...

How to change the hostname on Ubuntu?

This simple tutorial will teach you how to change the hostname on Ubuntu. The steps we will tell you here will work...

How to install Screaming Frog SEO Spider on Ubuntu 20.04 / 18.04?

If you are working with blogs and content creation then you should know about SEO. Or in the best case, you have...

How to Configure a Firewall in Ubuntu 20.04 / Debian 10?

There is nothing safe from hackers on the Internet, however, we can implement security measures to be more protected against an attack. With this...

Gnome 3.38 available

Gnome OS is a Linux-based operating system, which has a huge domain in the Linux forums. On September 16, 2020, developers announced...
x