Squirrelmail is a simple PHP based Webmail capability that’s very easy to install on CentOS Linux.
Installing Squirrelmail is as easy as running the following command as root on your CentOS system:
yum -y install squirrelmail
Because Squirrelmail is included in the Base distro of CentOS!
I usually install it along with the Sendmail Mail Server software, so I also do:
yum -y install sendmail
If the pre-requisites for the squirrelmail package doesn’t install sendmail anyway.
You’ll probably want to use IMAP via localhost for Squirrelmail to interact with your Mail & mailboxes, so also install Dovecot, via:
yum -y install dovecot
Then configure Dovecot by setting the ‘protocols =’ & ssl file lines in /etc/dovecot.conf to be:
protocols = imap imaps
ssl_cert_file = /etc/pki/dovecot/certs/dovecot.pem
ssl_key_file = /etc/pki/dovecot/private/dovecot.pem
Then save that update & restart Dovecot with service dovecot restart
as the install of Dovecot created those SSL Cert & Key files.
Best to restart your Apache webserver too after this, so do service httpd restart
and make sure the site(s) are running ok.
Configure Squirrelmail itself by running the command /usr/share/squirrelmail/config/conf.pl
as root (is best) and I suggest setting you own Organisation fields (press ‘1’ & then the number for each setting you’d like to change, all in a text-based window/’ncurses’ UI from a login shell on your CentOS host). Use the ‘s’ command to save your config updates, then ‘Q’ to exit the configurer.
Pretty much all the other default settings of Squirrelmail are ok in CentOS & you may need to make the conf.pl file executable with chmod a+x /usr/share/squirrelmail/config/conf.pl
In a browser, go to ‘http://your-site-name.url/webmail’ to get to Squirrelmail and try to login with the username & password of a Linux user on your CentOS host, if you are successful in logging in, create some emails & send them off, get replies, etc.
If the login failed, check the web server log files in /var/log/httpd/