SquirrelMail is a webmail package written in PHP. It supports both SMTP and IMAP protocols. SquirrelMail features cross-platform compatibility since all of its pages render in HTML 4.0. SquirrelMail requires a web server with PHP to run properly. For this guide we’ll be using Apache 2.
1-Install Package
#apt-get update#apt-get upgrade
#apt-get install apache2 php5 php-pear mysql-server php5-mysql
#apt-get install squirrelmail
2-Configuring the Virtual Host
SquirrelMail provides a default configuration file for Apache in
/etc/squirrelmail/apache.conf
. Copy this configuration file into your sites-available
folder with the command:#cp /etc/squirrelmail/apache.conf /etc/apache2/sites-available/squirrelmail.conf
#vim /etc/apache2/sites-available/squirrelmail.conf
edit as match bellow:
#Alias /squirrelmail /usr/share/squirrelmail
Alias /webmail /usr/share/squirrelmail
<Directory /usr/share/squirrelmail>
Options FollowSymLinks
Order allow,deny
allow from 10.105.0.0/16
#deny from all
AllowOverride None
<IfModule mod_php5.c>
php_flag register_globals off
</IfModule>
<IfModule mod_dir.c>
DirectoryIndex index.php
</IfModule>
# access to configtest is limited by default to prevent information leak
<Files configtest.php>
order deny,allow
deny from all
allow from 127.0.0.1
</Files>
</Directory>
# users will prefer a simple URL like http://webmail.example.com
<VirtualHost *:80>
DocumentRoot /usr/share/squirrelmail
ServerName mail.xm.shv
</VirtualHost>
# redirect to https when available (thanks omen@descolada.dartmouth.edu)
#
# Note: There are multiple ways to do this, and which one is suitable for
# your site's configuration depends. Consult the apache documentation if
# you're unsure, as this example might not work everywhere.
#
#<IfModule mod_rewrite.c>
# <IfModule mod_ssl.c>
# <Location /squirrelmail>
# RewriteEngine on
# RewriteCond %{HTTPS} !^on$ [NC]
# RewriteRule . https://%{HTTP_HOST}%{REQUEST_URI} [L]
# </Location>
# </IfModule>
#</IfModule>
Save and exit. Alias /webmail /usr/share/squirrelmail
<Directory /usr/share/squirrelmail>
Options FollowSymLinks
Order allow,deny
allow from 10.105.0.0/16
#deny from all
AllowOverride None
<IfModule mod_php5.c>
php_flag register_globals off
</IfModule>
<IfModule mod_dir.c>
DirectoryIndex index.php
</IfModule>
# access to configtest is limited by default to prevent information leak
<Files configtest.php>
order deny,allow
deny from all
allow from 127.0.0.1
</Files>
</Directory>
# users will prefer a simple URL like http://webmail.example.com
<VirtualHost *:80>
DocumentRoot /usr/share/squirrelmail
ServerName mail.xm.shv
</VirtualHost>
# redirect to https when available (thanks omen@descolada.dartmouth.edu)
#
# Note: There are multiple ways to do this, and which one is suitable for
# your site's configuration depends. Consult the apache documentation if
# you're unsure, as this example might not work everywhere.
#
#<IfModule mod_rewrite.c>
# <IfModule mod_ssl.c>
# <Location /squirrelmail>
# RewriteEngine on
# RewriteCond %{HTTPS} !^on$ [NC]
# RewriteRule . https://%{HTTP_HOST}%{REQUEST_URI} [L]
# </Location>
# </IfModule>
#</IfModule>
#a2ensite squirrelmail.conf
#service apache2 reloadYou should now be able to see SquirrelMail’s login page in your browser by: http://server-ip/webmail
3-Configuring SquirrelMail
Before using SquirrelMail for the first time, it needs to be configured to access your mail server. SquirrelMail provides a tool called
squirrelmail-configure
, which provides an interactive interface which edits the /etc/squirrelmail/config.php
file for you with the input you provide.Launch the squirrelmail-configure application with the command:
#squirrelmail-configure
This will bring up the menu shown.
There are many options to adjust here; too many for the scope of this guide. The only settings required to make SquirrelMail work are the
Server Settings
. Press 2
to bring up the Server Settings submenu:adjust the Domain, IMAP, and SMTP settings to match the mail server you want to connect to.
When done, press
S
to save your changes before exiting the menu by pressing Q to quit.after finish please check configure file /etc/squirrelmail/config.php
The interface layout follows standard email convention; all common functions should be easily accessible:
about addition of squirrelmail you can install plugin by download plugin and copy to directory /usr/share/squirrelmail/plugins
then run command:
#squirrelmail-configure
select number 8 for install plugin.
Trouble Shooting
==================================Reference:
-https://www.linode.com/docs/email/clients/installing-squirrelmail-on-debian-7